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

   
   
   ### What changes were proposed in this pull request?
   
   Add && path.eval() != null to the VariantGet case-arm guard in both 
collectRequestedFields and rewriteExpr in PushVariantIntoScan.
   
   ### Why are the changes needed?
   
   A VariantGet whose foldable path evaluates to null (e.g., variant_get(v, 
cast(null as string), 'int')) reaches PushVariantIntoScan when NullPropagation 
is excluded via spark.sql.optimizer.excludedRules.
   
   ### Does this PR introduce _any_ user-facing change?
   No. With the default optimizer pipeline (NullPropagation enabled), 
VariantGet(_, Literal(null), ...) is eliminated upstream — this code path was 
unreachable in practice.
   
   ### How was this patch tested?
   New unit tests in PushVariantIntoScanV1SuiteBase
   
   ### Was this patch authored or co-authored using generative AI tooling?
   Yes


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

Reply via email to