Skip to content

[VL] Refactor HashTableBuilder to use Velox API - #12923

Merged
JkSelf merged 1 commit into
apache:mainfrom
JkSelf:refactor-hashtablebuilder
Aug 31, 2026
Merged

[VL] Refactor HashTableBuilder to use Velox API#12923
JkSelf merged 1 commit into
apache:mainfrom
JkSelf:refactor-hashtablebuilder

Conversation

@JkSelf

@JkSelf JkSelf commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

What changes are proposed in this pull request?

  1. HashTableBuilder can directly call Velox API after refactor(hashjoin): Refactor hashJoinTableType and isLeftNullAwareJoinWithFilter API in HashJoinBridge facebookincubator/velox#18322 merged.
  2. Fix following warning :
[85/132] Building CXX object velox/CMakeFiles/velox.dir/jni/VeloxJniWrapper.cc.o

/Users/kejia/github/bob/incubator-gluten/cpp/velox/jni/VeloxJniWrapper.cc:1112:24: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]

 1112 |       otherTables[t] = std::move(hashTableBuilders[t]->uniqueTable());

      |                        ^

/Users/kejia/github/bob/incubator-gluten/cpp/velox/jni/VeloxJniWrapper.cc:1112:24: note: remove std::move call here

 1112 |       otherTables[t] = std::move(hashTableBuilders[t]->uniqueTable());

      |                        ^~~~~~~~~~                                   ~

1 warning generated. 

How was this patch tested?

Existing unit tests

Was this patch authored or co-authored using generative AI tooling?

No

Copilot AI lite review requested due to automatic review settings August 28, 2026 13:03
@github-actions github-actions Bot added the VELOX label Aug 28, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Gluten’s Velox hash join build path to rely on newly available Velox-side helpers, reducing local duplicated logic and addressing a compiler warning in the JNI builder.

Changes:

  • Switch HashTableBuilder to call Velox-provided exec::hashJoinTableType and exec::isLeftNullAwareJoinWithFilter instead of maintaining local equivalents.
  • Fix a -Wpessimizing-move warning in VeloxJniWrapper by removing an unnecessary std::move on a temporary unique_ptr return value.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
cpp/velox/operators/hashjoin/HashTableBuilder.cc Removes local helper implementations and calls the corresponding Velox exec APIs for join table type construction and null-aware join handling.
cpp/velox/jni/VeloxJniWrapper.cc Removes redundant std::move to avoid pessimizing-move warning when assigning the uniqueTable() return value.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@JkSelf
JkSelf force-pushed the refactor-hashtablebuilder branch from d2578b6 to cc66e36 Compare August 28, 2026 13:42
Copilot AI review requested due to automatic review settings August 28, 2026 13:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@JkSelf
JkSelf merged commit b8bf37b into apache:main Aug 31, 2026
83 of 84 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants