malinjawi opened a new pull request, #13658: URL: https://github.com/apache/gluten/pull/13658
## What changes are proposed in this pull request? A Velox hash join pushes a filter on its keys down the probe side into the scan, through projections and filters, without checking whether they are deterministic. Spark never moves a filter below a non-deterministic expression, so with a broadcast join the results differ from vanilla: `rand(42)` and `monotonically_increasing_id()` below the join return different values, `WHERE rand(42) < 0.5` keeps different rows, and Delta MERGE's `numSourceRows` only counts the matched source rows (10 instead of 10000). This turns off dynamic filter pushdown for a task when a projection or filter on a hash join's probe side, including a filter pushed into the scan, calls a non-deterministic function. Joins without one keep the pushdown. ## How was this patch tested? New `VeloxHashJoinSuite` test comparing those queries against vanilla, a `DeltaSuite` MERGE test with a broadcast target, and `DynamicFilterUtilsTest` for the plan check. The Scala tests fail without the fix and pass with it on Spark 3.5 and 4.1. ## Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (claude-opus-5-5) Fixes #9003 -- 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]
