Description
When comparing a DATE type with a TIMESTAMP type, the planner promotes both sides to string. But since the DATE value does not include the hh:mm:ss[.nnnnnnnnn] the comparison produces wrong results.
Thanks to Jason Dere for observing this.
Here is a portion of an EXPLAIN output:
Map Join Operator condition map: Inner Join 0 to 1 keys: 0 UDFToString(some_timestamp) (type: string) 1 UDFToString(some_date) (type: string)
Workaround is to cast the DATE to a TIMESTAMP.
Attachments
Issue Links
- duplicates
-
HIVE-15236 timestamp and date comparison should happen in timestamp
- Closed