You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/08/12 05:37:33 UTC

[GitHub] [spark] viirya commented on a change in pull request #29412: [SPARK-25557][SQL][Followup] Remove CaseInsensitiveMap in OrcFiltersBase

viirya commented on a change in pull request #29412:
URL: https://github.com/apache/spark/pull/29412#discussion_r469015649



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFiltersBase.scala
##########
@@ -67,18 +65,12 @@ trait OrcFiltersBase {
       }
     }
 
-    val primitiveFields = getPrimitiveFields(schema.fields)
-    if (caseSensitive) {
-      primitiveFields.toMap
-    } else {
-      // Don't consider ambiguity here, i.e. more than one field are matched in case insensitive
-      // mode, just skip pushdown for these fields, they will trigger Exception when reading,
-      // See: SPARK-25175.
-      val dedupPrimitiveFields = primitiveFields
-        .groupBy(_._1.toLowerCase(Locale.ROOT))
-        .filter(_._2.size == 1)
-        .mapValues(_.head._2)
-      CaseInsensitiveMap(dedupPrimitiveFields)
-    }
+    // Different with Parquet case, for case insensitive analysis, we will set
+    // `OrcConf.IS_SCHEMA_EVOLUTION_CASE_SENSITIVE`. So we don't need to worry about

Review comment:
       We don't have case sensitivity test for ORC filter pushdown. Because the case-insensitive column resolution is done inside ORC library and this is not for a bug, I'm not able to add a regression test.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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