hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Dere (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-3745) Hive does improper "=" based string comparisons for strings with trailing whitespaces
Date Fri, 12 Jul 2013 00:31:49 GMT

    [ https://issues.apache.org/jira/browse/HIVE-3745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13706519#comment-13706519
] 

Jason Dere commented on HIVE-3745:
----------------------------------

Would it make more sense to support the SQL comparison semantics using new char data types,
so that we don't break existing behavior for strings? I've created HIVE-4844.
                
> Hive does improper "=" based string comparisons for strings with trailing whitespaces
> -------------------------------------------------------------------------------------
>
>                 Key: HIVE-3745
>                 URL: https://issues.apache.org/jira/browse/HIVE-3745
>             Project: Hive
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 0.9.0
>            Reporter: Harsh J
>            Assignee: Gang Tim Liu
>
> Compared to other systems such as DB2, MySQL, etc., which disregard trailing whitespaces
in a string used when comparing two strings with the "{{=}}" relational operator, Hive does
not do this.
> For example, note the following line from the MySQL manual: http://dev.mysql.com/doc/refman/5.1/en/char.html
> {quote}
> All MySQL collations are of type PADSPACE. This means that all CHAR and VARCHAR values
in MySQL are compared without regard to any trailing spaces. 
> {quote}
> Hive still is whitespace sensitive and regards trailing spaces of a string as worthy
elements when comparing. Ideally {{LIKE}} should consider this strongly, but {{=}} should
not.
> Is there a specific reason behind this difference of implementation in Hive's SQL?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message