Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20774#discussion_r173701347
  
    --- 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
    +    case (TimestampType, DateType) => Some(TimestampType)
    --- End diff --
    
    Although this PR makes sense, we still need a SQLConf. Also add this into 
the migration guide in the SQL doc


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to