[VL][TEST] Refactor HashTableBuild - #12926
Conversation
There was a problem hiding this comment.
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
HashTableBuilderimplementation to usevelox::exec::JoinTableBuilderfor 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.
| VELOX_BRANCH=dft-2026_08_26-refactor-hashbuilder | ||
| VELOX_ENHANCED_BRANCH=ibm-2026_08_26-refactor-hashbuilder |
| withFilter; | ||
| } | ||
| } // namespace | ||
| using namespace facebook::velox; |
| // The filter columns are resolved on the Java side, hence there is no filter | ||
| // expression to analyze here. |
What changes are proposed in this pull request?
How was this patch tested?
Was this patch authored or co-authored using generative AI tooling?