maropu commented on a change in pull request #24903: [SPARK-28084][SQL] 
Resolving the partition column name based on the resolver in sql load command 
URL: https://github.com/apache/spark/pull/24903#discussion_r305609568
 
 

 ##########
 File path: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveExternalCatalog.scala
 ##########
 @@ -879,7 +879,11 @@ private[spark] class HiveExternalCatalog(conf: SparkConf, 
hadoopConf: Configurat
       // columns. Here we Lowercase the column names before passing the 
partition spec to Hive
       // client, to satisfy Hive.
       // scalastyle:off caselocale
-      orderedPartitionSpec.put(colName.toLowerCase, partition(colName))
+      partition.keys.foreach { partColName =>
+        if (partColName.toLowerCase == colName.toLowerCase()) {
 
 Review comment:
   Is this part not related to the issue in a LOAD command? If so, I thinks it 
would be better to split this fix into two prs.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to