LuciferYang opened a new pull request, #13839:
URL: https://github.com/apache/gluten/pull/13839

   ## What changes are proposed in this pull request?
   
   When the build keys of a broadcast hash join are expressions, such as 
`cast(build.k as bigint)` for an int and a bigint key, the broadcast exchange 
appends them to the build side, and the native hash table is built with the 
broadcast relation's column names. A join that reuses the exchange has other 
expression IDs, so the build columns its filter reads matched none of them, 
`nativeHashTableBuild` skipped them, and the placeholder filter read no build 
column. Since the Velox bump in #13808, HashBuild then keeps one row per key 
and only the keys for a semi or anti join, so a filter that reads build columns 
gave wrong rows.
   
   The filter's build columns are now matched by position and passed with the 
relation's names, as `hashTableBuildKey` already matches them. A filter column 
missing from the join's build side now throws instead of being skipped.
   
   Fixes #13828.
   
   ## How was this patch tested?
   
   The test from #13710 in `VeloxHashJoinSuite` now also runs with a bigint 
probe key, so the reused broadcast has an expression build key. That run fails 
without the fix.
   
   ## Was this patch authored or co-authored using generative AI tooling?
   
   Yes. Generated-by: 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