Yang Jie created SPARK-39388:
--------------------------------

             Summary: Reuse orcScheam when push down Orc predicates
                 Key: SPARK-39388
                 URL: https://issues.apache.org/jira/browse/SPARK-39388
             Project: Spark
          Issue Type: Improvement
          Components: SQL
    Affects Versions: 3.4.0
            Reporter: Yang Jie


`OrcUtils.readCatalystSchema` method will trigger a file IO to read `orcSchema` 
when Orc pushes down predicates.

After SPARK-37463:

-  For `OrcFileFormat`, we can reuse [a read 
`orcSchema`](https://github.com/apache/spark/blob/cc0bf563b8caea21da5692f05e34b5f77e002ab9/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFileFormat.scala#L146)
 to save this file read IO when Orc pushes down predicates

- For `OrcPartitionReaderFactory`  we can achieve the same goal by moving 
`OrcFile.createReader` before `pushDownPredicates`.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

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

Reply via email to