Repository navigation
fix(vector): align null masks for offset shrink - #27446
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
aptend
left a comment
There was a problem hiding this comment.
Deep-reviewed exact head 9c6e48f04254075a346eb9369273d477faf45e4c, including the full diff and complete review/comment/thread state. The offset is now applied consistently to fixed-vector values, SQL-NULL and GROUPING bitmaps, prepared-parameter kinds, and binary-string provenance. Both allocating and external-storage bitmap paths preserve ordered select/negate remapping across word boundaries, and the local-disttae tombstone caller's window-relative mask contract matches the new translation.
Validation: full pkg/common/bitmap, pkg/container/nulls, pkg/container/vector, pkg/container/batch, and pkg/vm/engine/disttae tests; focused race tests with -count=3; a deterministic 5,000-trial model check over random vector lengths, offsets, masks, NULLs, GROUPING bits, and select/negate modes; go vet; and git diff --check all pass. The temporary model test was removed. No blocking correctness, ownership, or compatibility issue found.
XuPeng-SH
left a comment
There was a problem hiding this comment.
Reviewed exact head 9c6e48f04254075a346eb9369273d477faf45e4c. The selection mask is correctly translated from window-relative to vector-relative coordinates for null/grouping bitmaps in both allocating and external-storage paths, matching the payload and existing sidecar remaps. Select/negate, non-zero offset, out-of-range selection accounting, and cross-word cases are covered; targeted bitmap/nulls/vector tests pass locally. No blocking issue found.
Merge Queue Status
This pull request spent 36 minutes 13 seconds in the queue, with no time running CI. Waiting for
All conditions
ReasonPull request #27446 has been dequeued Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.
HintYou should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. Tick the box to put this pull request back in the merge queue (same as
|
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Fixes matrixorigin#27398 ## What this PR does / why we need it: Propagates the vector window offset when remapping null and grouping bitmaps during fixed-vector mask shrink, preventing nullable indexed UPDATE rows from becoming misaligned. Adds focused null/vector unit tests and a deterministic 10,000-row BVT regression. The regression passes all 265 commands after the fix; the affected functions have 97.1% to 100% local coverage. Full repository unit and race suites, static checks, build, vet, and a 218,939-event Kafka-to-MatrixOne consistency run also passed locally. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Fixes matrixorigin#27398 ## What this PR does / why we need it: Propagates the vector window offset when remapping null and grouping bitmaps during fixed-vector mask shrink, preventing nullable indexed UPDATE rows from becoming misaligned. Adds focused null/vector unit tests and a deterministic 10,000-row BVT regression. The regression passes all 265 commands after the fix; the affected functions have 97.1% to 100% local coverage. Full repository unit and race suites, static checks, build, vet, and a 218,939-event Kafka-to-MatrixOne consistency run also passed locally. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Fixes matrixorigin#27398 ## What this PR does / why we need it: Propagates the vector window offset when remapping null and grouping bitmaps during fixed-vector mask shrink, preventing nullable indexed UPDATE rows from becoming misaligned. Adds focused null/vector unit tests and a deterministic 10,000-row BVT regression. The regression passes all 265 commands after the fix; the affected functions have 97.1% to 100% local coverage. Full repository unit and race suites, static checks, build, vet, and a 218,939-event Kafka-to-MatrixOne consistency run also passed locally. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Backport of #27446 to 4.2-dev. Fixes #32249. - Cherry-picks the upstream fix: shrinkFixedByMask propagates the vector window offset when remapping null/grouping bitmaps (FilterByMaskInPlaceWithOffset), restoring nullable secondary-index UPDATE alignment and DELETE row hits. - Ports RemapMaskOrderedWithOffset into 4.2's pkg/common/bitmap (ordered in-place external-storage remap used by the fixed-vector shrink path), with its unit test; no production callers change semantics for offset 0. - Retains the deterministic 10,000-row nullable-index UPDATE/DELETE BVT case and focused null/vector unit tests. Validation: - mo-cgo-test -count=1 ./pkg/common/bitmap ./pkg/container/nulls ./pkg/container/vector - go build / go vet on the three packages --------- Co-authored-by: Lundomn <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #27398
What this PR does / why we need it:
Propagates the vector window offset when remapping null and grouping bitmaps during fixed-vector mask shrink, preventing nullable indexed UPDATE rows from becoming misaligned.
Adds focused null/vector unit tests and a deterministic 10,000-row BVT regression. The regression passes all 265 commands after the fix; the affected functions have 97.1% to 100% local coverage. Full repository unit and race suites, static checks, build, vet, and a 218,939-event Kafka-to-MatrixOne consistency run also passed locally.