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

    https://github.com/apache/spark/pull/23186#discussion_r237889346
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/PartitioningUtils.scala
 ---
    @@ -345,15 +346,18 @@ object PartitioningUtils {
        */
       def resolvePartitions(
           pathsWithPartitionValues: Seq[(Path, PartitionValues)],
    +      caseSensitive: Boolean,
           timeZone: TimeZone): Seq[PartitionValues] = {
         if (pathsWithPartitionValues.isEmpty) {
           Seq.empty
         } else {
    -      // TODO: Selective case sensitivity.
    -      val distinctPartColNames =
    -        
pathsWithPartitionValues.map(_._2.columnNames.map(_.toLowerCase())).distinct
    +      val distinctPartColNames = if (caseSensitive) {
    +        pathsWithPartitionValues.map(_._2.columnNames)
    +      } else {
    +        pathsWithPartitionValues.map(_._2.columnNames.map(_.toLowerCase()))
    +      }
           assert(
    -        distinctPartColNames.size == 1,
    +        distinctPartColNames.distinct.size == 1,
             listConflictingPartitionColumns(pathsWithPartitionValues))
    --- End diff --
    
    why don't we use `distinctPartColNames` as parameter here? Moreover, is 
that method working fine according to case sensitivity?


---

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

Reply via email to