LuciferYang opened a new issue, #13711:
URL: https://github.com/apache/gluten/issues/13711

   For a broadcast anti join with a filter, the native hash table build leaves 
out the build rows that are null in any build column the filter references, 
when it is told the filter is null-intolerant. Gluten decides that with 
`SparkShims.isNullIntolerant(condition)`, which only checks the root of the 
condition. A filter like `p.x > coalesce(b.y, 0)` has a null-intolerant root 
(`GreaterThan`), so the rows with a null `y` are dropped, although 
`coalesce(null, 0)` is 0 and they can match.
   
   With the default configuration:
   
   ```sql
   -- probe(k, x) = (1, 5), (2, 1)
   -- build(k, y) = (1, null), (2, 3)
   SELECT * FROM probe WHERE NOT EXISTS
     (SELECT 1 FROM build WHERE probe.k = build.k AND probe.x > 
coalesce(build.y, 0))
   ```
   
   Spark returns (2, 1). Gluten returns (1, 5) and (2, 1). `nvl`, `LEFT ANTI 
JOIN` and the driver-side hash table build behave the same. It reproduces on 
v1.8.0-rc1.
   
   This issue was written with the assistance of AI (Claude Opus).
   


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