hemanthboyina opened a new pull request, #59747: URL: https://github.com/apache/spark/pull/59747
**What changes were proposed in this pull request?**
ORC stores a nested field only when every ancestor struct is non-null. The
child’s stripe statistics therefore never include rows whose parent is null.
OrcFilters still translated IsNull / IsNotNull on that child into a
SearchArgument. ORC then treated “no nulls in the child column” as “no matching
rows” and skipped the stripe. Those parent-null rows never reached Spark, so
the residual filter could not recover them.
**Why are the changes needed?**
WHERE s.b IS NULL dropped rows where s itself was null whenever ORC filter
pushdown was on. That is a wrong-results bug on both the V1 and V2 readers. A
residual Spark filter cannot repair an unsafe prune.
**Does this PR introduce any user-facing change?**
No
**How was this patch tested?**
- OrcFilterSuite / OrcV1FilterSuite: createFilter no longer builds a
SearchArgument for IsNull / IsNotNull under a nullable struct; it still does
for top-level columns, required parents, and comparisons. Existing nested IS
NULL pushdown checks now expect no SArg when the parent is a struct.
- OrcV1QuerySuite / OrcV2QuerySuite: null parent, null mid-struct, null
child, and non-null child; IS NULL, <=> NULL, NOT (IS NOT NULL), OR / AND, and
=. Same answers with pushdown on/off and with the vectorized reader on/off.
**Was this patch authored or co-authored using generative AI tooling?**
No.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
