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 2022/06/06 08:18:51 UTC

[GitHub] [spark] LuciferYang opened a new pull request, #36774: [DON'T MERGE] Reuse `orcScheam` when push down Orc predicates

LuciferYang opened a new pull request, #36774:
URL: https://github.com/apache/spark/pull/36774

   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
     2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
     4. Be sure to keep the PR description updated to reflect all changes.
     5. Please write your PR title to summarize what this PR proposes.
     6. If possible, provide a concise example to reproduce the issue for a faster review.
     7. If you want to add a new configuration, please read the guideline first for naming configurations in
        'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
     8. If you want to add or modify an error type or message, please read the guideline first in
        'core/src/main/resources/error/README.md'.
   -->
   
   ### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   If benchmark tests were added, please run the benchmarks in GitHub Actions for the consistent environment, and the instructions could accord to: https://spark.apache.org/developer-tools.html#github-workflow-benchmarks.
   -->
   


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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


[GitHub] [spark] LuciferYang commented on a diff in pull request #36774: [WIP][SPARK-39388][SQL] Reuse `orcScheam` when push down Orc predicates

Posted by GitBox <gi...@apache.org>.
LuciferYang commented on code in PR #36774:
URL: https://github.com/apache/spark/pull/36774#discussion_r890028863


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFileFormat.scala:
##########
@@ -153,10 +152,9 @@ class OrcFileFormat
       } else {
         // ORC predicate pushdown
         if (orcFilterPushDown && filters.nonEmpty) {
-          OrcUtils.readCatalystSchema(filePath, conf, ignoreCorruptFiles).foreach { fileSchema =>

Review Comment:
   `FileFormatException` will be thrown on line 146 because it also create a orc `reader`
   
   For example, run `Enabling/disabling ignoreCorruptFiles` of `OrcV1QuerySuite`, the log as folows:
   
   ```
   17:47:49.865 WARN org.apache.spark.sql.execution.datasources.FileScanRDD: Skipped the rest of the content in the corrupted file: path: file:///private/var/folders/0x/xj61_dbd0dldn793s6cyb7rr0000gp/T/spark-3da6c142-804c-4735-9323-9acbc032be2f/third/part-00001-73ff50ec-30b5-4c6f-a49c-3a0bed19960f-c000.json, range: 0-8, partition values: [empty row]
   org.apache.orc.FileFormatException: Malformed ORC file file:/private/var/folders/0x/xj61_dbd0dldn793s6cyb7rr0000gp/T/spark-3da6c142-804c-4735-9323-9acbc032be2f/third/part-00001-73ff50ec-30b5-4c6f-a49c-3a0bed19960f-c000.json. Invalid postscript.
   	at org.apache.orc.impl.ReaderImpl.ensureOrcFooter(ReaderImpl.java:463)
   	at org.apache.orc.impl.ReaderImpl.extractFileTail(ReaderImpl.java:799)
   	at org.apache.orc.impl.ReaderImpl.<init>(ReaderImpl.java:566)
   	at org.apache.orc.OrcFile.createReader(OrcFile.java:385)
   	at org.apache.spark.sql.execution.datasources.orc.OrcFileFormat.$anonfun$buildReaderWithPartitionValues$2(OrcFileFormat.scala:147)
   	at org.apache.spark.util.Utils$.tryWithResource(Utils.scala:2740)
   	at org.apache.spark.sql.execution.datasources.orc.OrcFileFormat.$anonfun$buildReaderWithPartitionValues$1(OrcFileFormat.scala:147)
   	at org.apache.spark.sql.execution.datasources.FileScanRDD$$anon$1.org$apache$spark$sql$execution$datasources$FileScanRDD$$anon$$readCurrentFile(FileScanRDD.scala:211)
   	at org.apache.spark.sql.execution.datasources.FileScanRDD$$anon$1$$anon$2.getNext(FileScanRDD.scala:239)
   	at org.apache.spark.util.NextIterator.hasNext(NextIterator.scala:73)
   	at org.apache.spark.sql.execution.datasources.FileScanRDD$$anon$1.hasNext(FileScanRDD.scala:118)
   	at org.apache.spark.sql.execution.datasources.FileScanRDD$$anon$1.nextIterator(FileScanRDD.scala:276)
   	at org.apache.spark.sql.execution.datasources.FileScanRDD$$anon$1.hasNext(FileScanRDD.scala:118)
   	at org.apache.spark.sql.execution.datasources.FileScanRDD$$anon$1.nextIterator(FileScanRDD.scala:276)
   	at org.apache.spark.sql.execution.datasources.FileScanRDD$$anon$1.hasNext(FileScanRDD.scala:118)
   	at org.apache.spark.sql.execution.FileSourceScanExec$$anon$1.hasNext(DataSourceScanExec.scala:580)
   	at org.apache.spark.sql.catalyst.expressions.GeneratedClass$GeneratedIteratorForCodegenStage1.columnartorow_nextBatch_0$(Unknown Source)
   	at org.apache.spark.sql.catalyst.expressions.GeneratedClass$GeneratedIteratorForCodegenStage1.processNext(Unknown Source)
   	at org.apache.spark.sql.execution.BufferedRowIterator.hasNext(BufferedRowIterator.java:43)
   	at org.apache.spark.sql.execution.WholeStageCodegenExec$$anon$1.hasNext(WholeStageCodegenExec.scala:760)
   	at scala.collection.Iterator$$anon$10.hasNext(Iterator.scala:460)
   	at scala.collection.Iterator$$anon$10.hasNext(Iterator.scala:460)
   	at org.apache.spark.util.Utils$.getIteratorSize(Utils.scala:1908)
   	at org.apache.spark.rdd.RDD.$anonfun$count$1(RDD.scala:1274)
   	at org.apache.spark.rdd.RDD.$anonfun$count$1$adapted(RDD.scala:1274)
   	at org.apache.spark.SparkContext.$anonfun$runJob$5(SparkContext.scala:2267)
   	at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:92)
   	at org.apache.spark.scheduler.Task.run(Task.scala:139)
   	at org.apache.spark.executor.Executor$TaskRunner.$anonfun$run$3(Executor.scala:548)
   	at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1481)
   	at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:551)
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   	at java.lang.Thread.run(Thread.java:750)
   ```



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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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


[GitHub] [spark] LuciferYang commented on a diff in pull request #36774: [WIP][SPARK-39388][SQL] Reuse `orcScheam` when push down Orc predicates

Posted by GitBox <gi...@apache.org>.
LuciferYang commented on code in PR #36774:
URL: https://github.com/apache/spark/pull/36774#discussion_r890285150


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFileFormat.scala:
##########
@@ -153,10 +152,9 @@ class OrcFileFormat
       } else {
         // ORC predicate pushdown
         if (orcFilterPushDown && filters.nonEmpty) {
-          OrcUtils.readCatalystSchema(filePath, conf, ignoreCorruptFiles).foreach { fileSchema =>

Review Comment:
   Thanks for your review @beliefer , you are right, `OrcUtils.readCatalystSchema` catch the `FileFormatException`. But if `OrcUtils.readCatalystSchema` catches an `FileFormatException`, it should have been thrown on line 147.
   
   https://github.com/apache/spark/blob/18ca369f01905b421a658144e23b5a4e60702655/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFileFormat.scala#L146-L161
   
   
   https://github.com/apache/spark/blob/18ca369f01905b421a658144e23b5a4e60702655/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcUtils.scala#L72-L94



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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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


[GitHub] [spark] LuciferYang commented on pull request #36774: [SPARK-39388][SQL] Reuse `orcSchema` when push down Orc predicates

Posted by GitBox <gi...@apache.org>.
LuciferYang commented on PR #36774:
URL: https://github.com/apache/spark/pull/36774#issuecomment-1167015535

   > readCatalystSchema
   
   Yes, it's useless. [05707f2](https://github.com/apache/spark/pull/36774/commits/05707f2654e20d191c7e8ba8b5640eedc685bf17) deleted it
   
   


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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


[GitHub] [spark] LuciferYang commented on a diff in pull request #36774: [WIP][SPARK-39388][SQL] Reuse `orcScheam` when push down Orc predicates

Posted by GitBox <gi...@apache.org>.
LuciferYang commented on code in PR #36774:
URL: https://github.com/apache/spark/pull/36774#discussion_r890291383


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFileFormat.scala:
##########
@@ -153,10 +152,9 @@ class OrcFileFormat
       } else {
         // ORC predicate pushdown
         if (orcFilterPushDown && filters.nonEmpty) {
-          OrcUtils.readCatalystSchema(filePath, conf, ignoreCorruptFiles).foreach { fileSchema =>

Review Comment:
   In what scenario does line 147 in `OrcFileFormat` (`Utils.tryWithResource(OrcFile.createReader(filePath, readerOptions))(_.getSchema) `) not throw an `FileFormatException`,  but line 77 in `OrcUtils`(`Utils.tryWithResource(OrcFile.createReader(file, readerOptions)) { reader => reader.getSchema } `) does?
   
   



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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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


[GitHub] [spark] LuciferYang commented on a diff in pull request #36774: [WIP][SPARK-39388][SQL] Reuse `orcScheam` when push down Orc predicates

Posted by GitBox <gi...@apache.org>.
LuciferYang commented on code in PR #36774:
URL: https://github.com/apache/spark/pull/36774#discussion_r890291383


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFileFormat.scala:
##########
@@ -153,10 +152,9 @@ class OrcFileFormat
       } else {
         // ORC predicate pushdown
         if (orcFilterPushDown && filters.nonEmpty) {
-          OrcUtils.readCatalystSchema(filePath, conf, ignoreCorruptFiles).foreach { fileSchema =>

Review Comment:
   Or in what scenario does line 147 in `OrcFileFormat` (`Utils.tryWithResource(OrcFile.createReader(filePath, readerOptions))(_.getSchema) `) not throw an `FileFormatException`,  but line 77 in `OrcUtils`(`Utils.tryWithResource(OrcFile.createReader(file, readerOptions)) { reader => reader.getSchema } `) does?
   
   



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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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


[GitHub] [spark] LuciferYang commented on a diff in pull request #36774: [WIP][SPARK-39388][SQL] Reuse `orcScheam` when push down Orc predicates

Posted by GitBox <gi...@apache.org>.
LuciferYang commented on code in PR #36774:
URL: https://github.com/apache/spark/pull/36774#discussion_r890306149


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFileFormat.scala:
##########
@@ -153,10 +152,9 @@ class OrcFileFormat
       } else {
         // ORC predicate pushdown
         if (orcFilterPushDown && filters.nonEmpty) {
-          OrcUtils.readCatalystSchema(filePath, conf, ignoreCorruptFiles).foreach { fileSchema =>

Review Comment:
   And should we change to use `OrcUtils.readSchema(filePath, conf, ignoreCorruptFiles)` at line 147 in `OrcFileFormat`, then it seems that the `FileFormatException ` is handled in `OrcFileFormat`, otherwise, the `FileFormatException ` will be thrown and handled by `FileScanRDD.`  Am I right? 
   `



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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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


[GitHub] [spark] beliefer commented on a diff in pull request #36774: [WIP][SPARK-39388][SQL] Reuse `orcScheam` when push down Orc predicates

Posted by GitBox <gi...@apache.org>.
beliefer commented on code in PR #36774:
URL: https://github.com/apache/spark/pull/36774#discussion_r890086418


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFileFormat.scala:
##########
@@ -153,10 +152,9 @@ class OrcFileFormat
       } else {
         // ORC predicate pushdown
         if (orcFilterPushDown && filters.nonEmpty) {
-          OrcUtils.readCatalystSchema(filePath, conf, ignoreCorruptFiles).foreach { fileSchema =>

Review Comment:
   It seems `OrcUtils.readCatalystSchema` catch the `FileFormatException`.
   I think this is the key the code uses `OrcUtils.readCatalystSchema` not `orcSchema`.



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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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


[GitHub] [spark] LuciferYang commented on pull request #36774: [DON'T MERGE][SQL] Reuse `orcScheam` when push down Orc predicates

Posted by GitBox <gi...@apache.org>.
LuciferYang commented on PR #36774:
URL: https://github.com/apache/spark/pull/36774#issuecomment-1147244030

   https://github.com/apache/spark/blob/cc0bf563b8caea21da5692f05e34b5f77e002ab9/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFileFormat.scala#L146-L161
   
   After SPARK-37463:
   
   For `OrcFileFormat`, `org.apache.orc.FileFormatException` is change to thrown in line 146(no longer line 156) and is always handled by `FileScanRDD`, whether `ignoreCorruptFiles` is true or not.
   
   
   A similar situation exists for `OrcPartitionReaderFactory`, so should we change to  use `OrcUtils.readSchema(filePath, conf, ignoreCorruptFiles)` instead?
   
   
   
   


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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


[GitHub] [spark] LuciferYang commented on a diff in pull request #36774: [WIP][SPARK-39388][SQL] Reuse `orcScheam` when push down Orc predicates

Posted by GitBox <gi...@apache.org>.
LuciferYang commented on code in PR #36774:
URL: https://github.com/apache/spark/pull/36774#discussion_r890028863


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFileFormat.scala:
##########
@@ -153,10 +152,9 @@ class OrcFileFormat
       } else {
         // ORC predicate pushdown
         if (orcFilterPushDown && filters.nonEmpty) {
-          OrcUtils.readCatalystSchema(filePath, conf, ignoreCorruptFiles).foreach { fileSchema =>

Review Comment:
   `FileFormatException` will be thrown on line 146  instead of here because it also create a orc `reader`
   
   For example, run `Enabling/disabling ignoreCorruptFiles` of `OrcV1QuerySuite`, the log as folows:
   
   ```
   17:47:49.865 WARN org.apache.spark.sql.execution.datasources.FileScanRDD: Skipped the rest of the content in the corrupted file: path: file:///private/var/folders/0x/xj61_dbd0dldn793s6cyb7rr0000gp/T/spark-3da6c142-804c-4735-9323-9acbc032be2f/third/part-00001-73ff50ec-30b5-4c6f-a49c-3a0bed19960f-c000.json, range: 0-8, partition values: [empty row]
   org.apache.orc.FileFormatException: Malformed ORC file file:/private/var/folders/0x/xj61_dbd0dldn793s6cyb7rr0000gp/T/spark-3da6c142-804c-4735-9323-9acbc032be2f/third/part-00001-73ff50ec-30b5-4c6f-a49c-3a0bed19960f-c000.json. Invalid postscript.
   	at org.apache.orc.impl.ReaderImpl.ensureOrcFooter(ReaderImpl.java:463)
   	at org.apache.orc.impl.ReaderImpl.extractFileTail(ReaderImpl.java:799)
   	at org.apache.orc.impl.ReaderImpl.<init>(ReaderImpl.java:566)
   	at org.apache.orc.OrcFile.createReader(OrcFile.java:385)
   	at org.apache.spark.sql.execution.datasources.orc.OrcFileFormat.$anonfun$buildReaderWithPartitionValues$2(OrcFileFormat.scala:147)
   	at org.apache.spark.util.Utils$.tryWithResource(Utils.scala:2740)
   	at org.apache.spark.sql.execution.datasources.orc.OrcFileFormat.$anonfun$buildReaderWithPartitionValues$1(OrcFileFormat.scala:147)
   	at org.apache.spark.sql.execution.datasources.FileScanRDD$$anon$1.org$apache$spark$sql$execution$datasources$FileScanRDD$$anon$$readCurrentFile(FileScanRDD.scala:211)
   	at org.apache.spark.sql.execution.datasources.FileScanRDD$$anon$1$$anon$2.getNext(FileScanRDD.scala:239)
   	at org.apache.spark.util.NextIterator.hasNext(NextIterator.scala:73)
   	at org.apache.spark.sql.execution.datasources.FileScanRDD$$anon$1.hasNext(FileScanRDD.scala:118)
   	at org.apache.spark.sql.execution.datasources.FileScanRDD$$anon$1.nextIterator(FileScanRDD.scala:276)
   	at org.apache.spark.sql.execution.datasources.FileScanRDD$$anon$1.hasNext(FileScanRDD.scala:118)
   	at org.apache.spark.sql.execution.datasources.FileScanRDD$$anon$1.nextIterator(FileScanRDD.scala:276)
   	at org.apache.spark.sql.execution.datasources.FileScanRDD$$anon$1.hasNext(FileScanRDD.scala:118)
   	at org.apache.spark.sql.execution.FileSourceScanExec$$anon$1.hasNext(DataSourceScanExec.scala:580)
   	at org.apache.spark.sql.catalyst.expressions.GeneratedClass$GeneratedIteratorForCodegenStage1.columnartorow_nextBatch_0$(Unknown Source)
   	at org.apache.spark.sql.catalyst.expressions.GeneratedClass$GeneratedIteratorForCodegenStage1.processNext(Unknown Source)
   	at org.apache.spark.sql.execution.BufferedRowIterator.hasNext(BufferedRowIterator.java:43)
   	at org.apache.spark.sql.execution.WholeStageCodegenExec$$anon$1.hasNext(WholeStageCodegenExec.scala:760)
   	at scala.collection.Iterator$$anon$10.hasNext(Iterator.scala:460)
   	at scala.collection.Iterator$$anon$10.hasNext(Iterator.scala:460)
   	at org.apache.spark.util.Utils$.getIteratorSize(Utils.scala:1908)
   	at org.apache.spark.rdd.RDD.$anonfun$count$1(RDD.scala:1274)
   	at org.apache.spark.rdd.RDD.$anonfun$count$1$adapted(RDD.scala:1274)
   	at org.apache.spark.SparkContext.$anonfun$runJob$5(SparkContext.scala:2267)
   	at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:92)
   	at org.apache.spark.scheduler.Task.run(Task.scala:139)
   	at org.apache.spark.executor.Executor$TaskRunner.$anonfun$run$3(Executor.scala:548)
   	at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1481)
   	at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:551)
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   	at java.lang.Thread.run(Thread.java:750)
   ```



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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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


[GitHub] [spark] LuciferYang commented on pull request #36774: [SPARK-39388][SQL] Reuse `orcSchema` when push down Orc predicates

Posted by GitBox <gi...@apache.org>.
LuciferYang commented on PR #36774:
URL: https://github.com/apache/spark/pull/36774#issuecomment-1167018893

   > > readCatalystSchema
   > 
   > Yes, it's useless. [05707f2](https://github.com/apache/spark/pull/36774/commits/05707f2654e20d191c7e8ba8b5640eedc685bf17) deleted it
   
   Let's check this with GitHub Actions
   
   


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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


[GitHub] [spark] dongjoon-hyun closed pull request #36774: [SPARK-39388][SQL] Reuse `orcSchema` when push down Orc predicates

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun closed pull request #36774: [SPARK-39388][SQL] Reuse `orcSchema` when push down Orc predicates
URL: https://github.com/apache/spark/pull/36774


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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


[GitHub] [spark] LuciferYang commented on pull request #36774: [WIP][SPARK-39388][SQL] Reuse `orcScheam` when push down Orc predicates

Posted by GitBox <gi...@apache.org>.
LuciferYang commented on PR #36774:
URL: https://github.com/apache/spark/pull/36774#issuecomment-1147304625

   > Thank you for pinging me, @LuciferYang . Is this a pure improvement?
   > 
   > cc @beliefer and @cloud-fan , too
   
   I think the micro-benchmark result will not be obvious because the saved input IO is not large. Let me think again


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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


[GitHub] [spark] LuciferYang commented on a diff in pull request #36774: [WIP][SPARK-39388][SQL] Reuse `orcScheam` when push down Orc predicates

Posted by GitBox <gi...@apache.org>.
LuciferYang commented on code in PR #36774:
URL: https://github.com/apache/spark/pull/36774#discussion_r890285150


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFileFormat.scala:
##########
@@ -153,10 +152,9 @@ class OrcFileFormat
       } else {
         // ORC predicate pushdown
         if (orcFilterPushDown && filters.nonEmpty) {
-          OrcUtils.readCatalystSchema(filePath, conf, ignoreCorruptFiles).foreach { fileSchema =>

Review Comment:
   Thanks for your review @beliefer , you are right, `OrcUtils.readCatalystSchema` catch the `FileFormatException`. But if `OrcUtils.readCatalystSchema` catches an `FileFormatException`, it should have been thrown on line 146.
   
   https://github.com/apache/spark/blob/18ca369f01905b421a658144e23b5a4e60702655/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFileFormat.scala#L146-L161
   
   
   https://github.com/apache/spark/blob/18ca369f01905b421a658144e23b5a4e60702655/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcUtils.scala#L72-L94



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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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


[GitHub] [spark] LuciferYang commented on a diff in pull request #36774: [WIP][SPARK-39388][SQL] Reuse `orcScheam` when push down Orc predicates

Posted by GitBox <gi...@apache.org>.
LuciferYang commented on code in PR #36774:
URL: https://github.com/apache/spark/pull/36774#discussion_r890285150


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFileFormat.scala:
##########
@@ -153,10 +152,9 @@ class OrcFileFormat
       } else {
         // ORC predicate pushdown
         if (orcFilterPushDown && filters.nonEmpty) {
-          OrcUtils.readCatalystSchema(filePath, conf, ignoreCorruptFiles).foreach { fileSchema =>

Review Comment:
   thanks for your review @beliefer , you are right, `OrcUtils.readCatalystSchema` catch the `FileFormatException`. But if `OrcUtils.readCatalystSchema` catches an `FileFormatException`, it should have been thrown on line 146.
   
   https://github.com/apache/spark/blob/18ca369f01905b421a658144e23b5a4e60702655/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFileFormat.scala#L146-L161
   
   
   https://github.com/apache/spark/blob/18ca369f01905b421a658144e23b5a4e60702655/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcUtils.scala#L72-L94



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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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


[GitHub] [spark] cloud-fan commented on pull request #36774: [SPARK-39388][SQL] Reuse `orcSchema` when push down Orc predicates

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on PR #36774:
URL: https://github.com/apache/spark/pull/36774#issuecomment-1167008944

   is `OrcUtils.readCatalystSchema` still needed anywhere?


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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