Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/14750#discussion_r78124662
--- Diff:
sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/InsertIntoHiveTable.scala
---
@@ -169,7 +169,10 @@ case class InsertIntoHiveTable(
// All partition column names in the format of "<column name
1>/<column name 2>/..."
val partitionColumns =
fileSinkConf.getTableInfo.getProperties.getProperty("partition_columns")
- val partitionColumnNames =
Option(partitionColumns).map(_.split("/")).getOrElse(Array.empty)
+ // As the keys of partition spec `partition` is always lowercase, we
should also lowercase the
+ // partition column names of the table here.
+ val partitionColumnNames =
+
Option(partitionColumns).map(_.split("/").map(_.toLowerCase)).getOrElse(Array.empty)
--- End diff --
After more investigation,
[`fileSinkConf.getTableInfo`](https://github.com/apache/spark/blob/master/sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/InsertIntoHiveTable.scala#L171)
is
[`table.tableDesc`](https://github.com/apache/spark/blob/master/sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/InsertIntoHiveTable.scala#L145).
That means, we do not need to convert it to lower case.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]