Github user yhuai commented on a diff in the pull request:
https://github.com/apache/spark/pull/13766#discussion_r67610425
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/rules.scala
---
@@ -84,7 +84,13 @@ private[sql] object PreprocessTableInsertion extends
Rule[LogicalPlan] {
if (insert.partition.nonEmpty) {
// the query's partitioning must match the table's partitioning
// this is set for queries like: insert into ... partition (one =
"a", two = <expr>)
- if (insert.partition.keySet != partColNames.toSet) {
+ val samePartitionColumns =
+ if (conf.caseSensitiveAnalysis) {
+ insert.partition.keySet == partColNames.toSet
+ } else {
+ insert.partition.keySet.map(_.toLowerCase) ==
partColNames.map(_.toLowerCase).toSet
+ }
--- End diff --
Actually, since the parser already turn column names in partition to their
lower case form, this change does not really affect anything when we use case
insensitive resolution.
---
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]