HIVE-29598 follow-up: virtualize clearValue + replace qtest#1
Merged
ryukobayashi merged 1 commit intoMay 19, 2026
Merged
Conversation
ryukobayashi
approved these changes
May 19, 2026
Owner
ryukobayashi
left a comment
There was a problem hiding this comment.
Thanks. I accept your proposal.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to apache#6486 addressing two issues:
Architecture (responds to @soumyakanti3578's review comment): the
clearVectorValueprivate staticinstanceof-chain dispatch is replacedby a virtual
ColumnVector.clearValue(int)method with a template-methodclearSlotValue(int)hook.clearValueisfinaland centralizes theisNull[] / noNullsbookkeeping; subclasses override onlyclearSlotValue,so the contract cannot drift across future call sites or new subclasses.
The operator's call sites collapse to one-liners. Additive to storage-api,
no breaking changes.
Test rigor: the original
vector_outer_join7.qpasses whether thefix is applied or not — it does not catch HIVE-29598. Confirmed by
direct execution: pre-PR operator (
97570b9cc2) + the author'soriginal
.qfrom6b31424d46produces output identical to the fixedoperator. The CBO simplifies the plan (LEFT JOIN → ANTI JOIN, CASE WHEN
→ constant
'new') so aggressively that the null-padded columns arenever read downstream.
Replaced the
.qwith the actual repro from the HIVE-29598 description.New qtest:
VectorMapJoinOuterMultiKeyOperatorwithsmallTableValueMapping: 4:boolean— the slot reuse the JIRA predicts.C 3 0 1andD 3 0 1leak through — exactlythe rows the JIRA predicts.
Test plan
mvn test -pl storage-api— 26 tests pass (4 new JUnit 5 files forLong/Double/Decimal/IntervalDayTime + 2 extensions on existing JUnit 4
Bytes/Timestamp).
mvn test -pl ql -Dtest=TestVectorMapJoinOuterGenerateResultOperator— 9 cases pass (3 individual covering Long-tracking + Void-baseline, plus
6 parameterized over every modified ColumnVector subclass). Replaces the
original PR's reflection-on-private-static test.
vector_outer_join7.qpasses with fix; FAILS with exactly the 2-rowdiff under pre-PR operator. Both
.q.outs captured for comparison.Out of scope
The three
isNull[i] = truewrites in FULL OUTER paths (overflowBatchwrites at the original lines 771/880/1014) are deliberately unchanged. A
FULL OUTER repro attempt confirmed those paths do fire
(
VectorMapJoinFullOuterLongOperator), but the FULL OUTER planner insertsIfExprCondExprNullwrappers that respectisNull[]and recover from thestale-value bug class. Without a working wrong-results repro, expanding
the fix there is speculative.
Drafted with Claude Code; verified and posted by @konstantinb.