[SPARK-57531][SQL] Reuse OrcTail in non-vectorized ORC reader path#56591
Open
cxzl25 wants to merge 1 commit into
Open
[SPARK-57531][SQL] Reuse OrcTail in non-vectorized ORC reader path#56591cxzl25 wants to merge 1 commit into
cxzl25 wants to merge 1 commit into
Conversation
dongjoon-hyun
requested changes
Jun 18, 2026
dongjoon-hyun
left a comment
Member
There was a problem hiding this comment.
Thank you. Could you update DataSource v1 patch, OrcFileFormat.scala?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This PR mirrors what
buildColumnarReaderalready does since SPARK-44556: capture thereaderOptionsreturned bycreateORCReader, then passreaderOptions.getOrcTailwhen constructing the per-split record reader so the footer is not re-read.Why are the changes needed?
OrcPartitionReaderFactory.buildReader(the non-vectorized / row-based read path) previously calledOrcInputFormat.createRecordReader(fileSplit, taskAttemptContext), which internally callsOrcFile.createReaderwithout anOrcTailand therefore re-parses the file footer from storage on every split.Without OrcTail reuse the non-vectorized path pays this cost a second time when opening the data reader for each split, while the vectorized path has been avoiding it since SPARK-44556.
Does this PR introduce any user-facing change?
No
How was this patch tested?
GHA
Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code