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

    https://github.com/apache/spark/pull/20140#discussion_r184870380
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/CSVInferSchema.scala
 ---
    @@ -216,6 +226,8 @@ private[csv] object CSVInferSchema {
           } else {
             Some(DecimalType(range + scale, scale))
           }
    +    // By design 'TimestampType' (8 bytes) is larger than 'DateType' (4 
bytes).
    +    case (t1: DateType, t2: TimestampType) => Some(TimestampType)
    --- End diff --
    
    I think we should do the opposite case too
    
    ```
    case (t1: TimestampType, t2: DateType) => Some(TimestampType)
    ```


---

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

Reply via email to