Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/20774#discussion_r173718706
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala
---
@@ -135,11 +135,14 @@ object TypeCoercion {
case (DateType, StringType) => Some(StringType)
case (StringType, TimestampType) => Some(StringType)
case (TimestampType, StringType) => Some(StringType)
- case (TimestampType, DateType) => Some(StringType)
- case (DateType, TimestampType) => Some(StringType)
case (StringType, NullType) => Some(StringType)
case (NullType, StringType) => Some(StringType)
+ // Cast to TimestampType when we compare DateType with TimestampType
+ // i.e. TimeStamp('2017-03-01 00:00:00') eq Date('2017-03-01') = true
--- End diff --
Seems it's fixed in Hive 2.2.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]