Skip to content

[VL][TEST] Refactor HashTableBuild - #12926

Open
JkSelf wants to merge 3 commits into
apache:mainfrom
JkSelf:refactor-hashtablebuilder1
Open

[VL][TEST] Refactor HashTableBuild #12926
JkSelf wants to merge 3 commits into
apache:mainfrom
JkSelf:refactor-hashtablebuilder1

Conversation

@JkSelf

@JkSelf JkSelf commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

What changes are proposed in this pull request?

How was this patch tested?

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

Copilot AI lite review requested due to automatic review settings August 28, 2026 15:25

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

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Refactors the Velox-side hash table build wrapper to delegate build logic to Velox’s JoinTableBuilder, and updates the Velox fetch script to point at branches containing the corresponding refactor.

Changes:

  • Switch HashTableBuilder implementation to use velox::exec::JoinTableBuilder for build-side hash table creation.
  • Update JNI usage to accommodate the new uniqueTable() implementation.
  • Pin Velox build script branches to *-refactor-hashbuilder.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
ep/build-velox/src/get-velox.sh Points Velox checkout to refactor-specific branches needed by this change.
cpp/velox/operators/hashjoin/HashTableBuilder.h Reworks the wrapper API to forward build-state to JoinTableBuilder.
cpp/velox/operators/hashjoin/HashTableBuilder.cc Replaces custom build logic with JoinTableBuilder initialization + addInput forwarding.
cpp/velox/jni/VeloxJniWrapper.cc Updates table extraction logic to match the new uniqueTable() behavior.
Suppressed comments (1)

cpp/velox/operators/hashjoin/HashTableBuilder.h:1

  • After refactoring to delegate build logic to JoinTableBuilder, hashTableMemoryUsage_ is no longer updated anywhere in the shown implementation, even though the class-level comment says it accounts for memory usage. If this value is used for reporting/backpressure (e.g., from JNI), it will likely remain 0 and mislead upstream logic. Recommendation: either (1) update it when inputs are added / table is taken / merged table is set (ideally by querying the underlying table/builder for retained bytes), or (2) remove the member and expose a delegated accessor to the underlying builder/table memory usage.
/*

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

Comment on lines +21 to +22
VELOX_BRANCH=dft-2026_08_26-refactor-hashbuilder
VELOX_ENHANCED_BRANCH=ibm-2026_08_26-refactor-hashbuilder
withFilter;
}
} // namespace
using namespace facebook::velox;
Comment on lines +52 to +53
// The filter columns are resolved on the Java side, hence there is no filter
// expression to analyze here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants