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

    https://github.com/apache/spark/pull/23165#discussion_r237510736
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/PartitioningUtils.scala
 ---
    @@ -250,7 +276,13 @@ object PartitioningUtils {
           val rawColumnValue = columnSpec.drop(equalSignIndex + 1)
           assert(rawColumnValue.nonEmpty, s"Empty partition column value in 
'$columnSpec'")
     
    -      val literal = inferPartitionColumnValue(rawColumnValue, 
typeInference, timeZone)
    +      val literal = if (userSpecifiedDataTypes.contains(columnName)) {
    +        // SPARK-26188: if user provides corresponding column schema, 
process the column as String
    +        //              type and cast it as user specified data type later.
    +        inferPartitionColumnValue(rawColumnValue, false, timeZone)
    --- End diff --
    
    can't we add the cast here?


---

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

Reply via email to