Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/23165#discussion_r237510162
--- 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.
--- End diff --
can we do the cast here? It's a good practise to put related code together
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]