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

    https://github.com/apache/spark/pull/13766#discussion_r67610340
  
    --- 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 --
    
    Partitioning columns are special since we use them to create directories in 
the file system. Once directories are created, case sensitivity setting will 
not affect anything. 


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to