LuciferYang opened a new pull request, #13332: URL: https://github.com/apache/gluten/pull/13332
## What changes are proposed in this pull request? When `spark.gluten.sql.columnar.backend.velox.driverSideBroadcastHashTableBuild` is enabled, `buildHashTableWithRuntime` in `ColumnarBuildSideRelation` and `UnsafeColumnarBuildSideRelation` builds the hash table on the driver. It names each join key as it appears in the join, but when a key reaches the build side under a generated alias, the build output names that column differently and the native build fails with `Field not found: key#329. Available fields are: p_partkey#197, _post_11#329`. The failure is caught and the join falls back to building the table on each executor, so results are correct but the driver-side build never takes effect for these joins. #12407 fixed the same problem in the executor-side `buildHashTable` by mapping each key to the build output attribute with the same exprId. This applies that mapping in `buildHashTableWithRuntime` as well. ## How was this patch tested? Added two cases to `VeloxHashJoinSuite` that run the #12407 query with the driver-side build enabled, once with the on-heap and once with the off-heap build relation, and assert the broadcast relation is a `SerializedHashTableBroadcastRelation`, that is, the driver-side build did not fall back. Both fail without this change. The #12407 query moves into a shared val used by its original test and the new ones. ## Was this patch authored or co-authored using generative AI tooling? Yes. Generated-by: Claude Opus. Related issue: #13330. -- 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]
