github-actions[bot] commented on code in PR #63767:
URL: https://github.com/apache/doris/pull/63767#discussion_r3312327328


##########
be/src/exec/common/hash_table/join_hash_table.h:
##########
@@ -480,7 +480,6 @@ class JoinHashTable {
             /// If the probe key is null
             if constexpr (has_null_map) {
                 if (null_map[probe_idx]) {
-                    probe_idx++;
                     break;

Review Comment:
   This still does not preserve the NULL probe row correctly when the build 
side contains NULL keys. For null-aware joins with other conjuncts, 
`HashJoinBuild::run()` sets `keep_null_key = true`, so 
`build_idx_map[probe_idx]` can be `first[bucket_size]` for a NULL probe. After 
this change the loop breaks with that nonzero `build_idx`, then line 492 
applies `probe_idx -= (build_idx != 0)`, returning the previous probe row 
instead of the NULL row. The caller therefore misses 
`_process_probe_null_key(probe_idx)` for this row, or resumes probing the 
previous row against the NULL bucket. A repro is the new nullable test shape 
without filtering NULLs out of the subquery build side, e.g. inserting an inner 
`(1, NULL)` and removing `i.a IS NOT NULL`. Please clear `build_idx` before 
breaking on a NULL probe, or otherwise skip the continuation rewind for this 
case, and add coverage with build-side NULL keys.



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