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

    https://github.com/apache/spark/pull/20621#discussion_r168680397
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/PartitioningUtils.scala
 ---
    @@ -407,6 +407,29 @@ object PartitioningUtils {
           Literal(bigDecimal)
         }
     
    +    val dateTry = Try {
    +      // try and parse the date, if no exception occurs this is a 
candidate to be resolved as
    +      // DateType
    +      DateTimeUtils.getThreadLocalDateFormat.parse(raw)
    --- End diff --
    
    Ah, so the root cause is more specific to `SimpleDateFormat` because it 
allows invalid dates like `2018-01-01-04` to be parsed fine ..


---

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

Reply via email to