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

    https://github.com/apache/spark/pull/14750#discussion_r78129508
  
    --- 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 --
    
    We can combine the above two lines into a single line?
    ```Scala
        val partitionColumnNames = 
table.catalogTable.partitionColumnNames.map(_.toLowerCase)
    ```


---
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