[
https://issues.apache.org/jira/browse/HIVE-14189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15674900#comment-15674900
]
Sergey Shelukhin commented on HIVE-14189:
-----------------------------------------
It still doesn't address type precedence in this case. On one hand, it doesn't
look like values of numeric and string types are comparable (since it's not
described in any of the corresponding sections). Then, "The result of
evaluating whether or not two values that are not comparable (for example,
values of a user-defined type that has no comparison type) are distinct is not
defined.". Distinct is how comparison works for greater and less (via ordering
operations section...).
On the other hand, casting number to string (and reverse) is valid and it
mentions that implicit casts "can occur in expressions", without specifying any
details. Type precedence also doesn't address strings vs numbers in this case.
9.5 seems to indicate that combining strings with non-strings makes things into
strings, but it doesn't apply anywhere in cast and compare sections - it's used
for things like having a common type for case, union, arrays, etc.
I guess we'll go with master, this patch would need to be modified to convert
to string.
> backport HIVE-13945 to branch-1
> -------------------------------
>
> Key: HIVE-14189
> URL: https://issues.apache.org/jira/browse/HIVE-14189
> Project: Hive
> Issue Type: Bug
> Reporter: Sergey Shelukhin
> Assignee: Sergey Shelukhin
> Labels: TODOC1.3
> Attachments: HIVE-14189-branch-1.patch, HIVE-14189.01-branch-1.patch,
> HIVE-14189.02-branch-1.patch, HIVE-14189.03-branch-1.patch,
> HIVE-14189.04-branch-1.patch, HIVE-14189.05-branch-1.patch,
> HIVE-14189.06-branch-1.patch, HIVE-14189.07-branch-1.patch,
> HIVE-14189.08-branch-1.patch
>
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)