Repository navigation
Conversation
mhatipog
added a commit
to mhatipog/spark
that referenced
this pull request
Nov 20, 2026
This branch has not been deployed
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?
SargApplierno longer uses row group statistics to answerIS_NULLfor a column nested in a struct. The leaf evaluates toYES_NO_NULLinstead, so those row groups are read. Other operators and top-level columns are unchanged.Why are the changes needed?
ORC writes a struct field only in rows where all of its ancestors are present, so the field's statistics do not count rows where a parent struct is null. When the field itself is never null,
hasNullis false andIS_NULLevaluates toNO, which skips row groups that contain matching rows:Reproduced on 1.9.8, 2.1.4 and 2.3.1. Spark (SPARK-60362) and Iceberg (apache/iceberg#19064) hit the same case through their ORC readers.
How was this patch tested?
Added
TestRecordReaderImpl#testIsNullOnFieldUnderNullStruct, which fails without the change (reads 0 rows instead of 2).TestRecordReaderImpl,TestVectorOrcFile,TestReaderImpl,TestFilters,TestPluginFilters,TestOrcFilterContext,TestRowFilteringIOSkip,TestStringDictionaryandTestEncryptionpass.Was this patch authored or co-authored using generative AI tooling?
Yes. Generated-by: an AI coding assistant, used to draft the change and the test; I reviewed and tested both.