cloud-fan commented on a change in pull request #29457:
URL: https://github.com/apache/spark/pull/29457#discussion_r473813402



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFileFormat.scala
##########
@@ -186,6 +183,15 @@ class OrcFileFormat
       if (resultedColPruneInfo.isEmpty) {
         Iterator.empty
       } else {
+        // ORC predicate pushdown
+        if (orcFilterPushDown) {
+          OrcUtils.readCatalystSchema(filePath, conf, ignoreCorruptFiles).map 
{ fileSchema =>
+            OrcFilters.createFilter(fileSchema, filters).foreach { f =>

Review comment:
       AFAIK the input `schema` is only used to build the `dataTypeMap`, can we 
directly pass the physical ORC schema here? Then we don't need to convert the 
ORC schema to catalyst schema which is consistent with the parquet side.




----------------------------------------------------------------
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:
[email protected]



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

Reply via email to