Skip to content

fix(vector): align null masks for offset shrink (#27446) - #32347

Merged
XuPeng-SH merged 2 commits into
4.2-devfrom
codex/backport-27446-4.2-dev
Nov 8, 2026
Merged

XuPeng-SH merged 2 commits into
4.2-devfrom
codex/backport-27446-4.2-dev

Conversation

@XuPeng-SH

@XuPeng-SH XuPeng-SH commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

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

Lundomn and others added 2 commits November 7, 2026 18:01
## 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 #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>
@XuPeng-SH
XuPeng-SH requested a review from aunjgr as a code owner November 7, 2026 11:13
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@XuPeng-SH

XuPeng-SH commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor Author

mo-bot review · mo-bot-local · done

Commit: 4089fc4ae8210cdcfc3bf851922a6830202c712e

Review completed. Read the assessment.

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

mo-bot review · mo-bot-local · review

Commit: 4089fc4ae8210cdcfc3bf851922a6830202c712e

Assessment: approve

The backport correctly aligns null and grouping masks with offset-adjusted payload selection. It extends the existing bitmap/nulls owners without adding a parallel mechanism. No actionable findings remain.

Model: gpt-6.1-sol / max

Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0

Validation:

  • Reviewed all eight changed paths, affected consumers, both discussion records and closing issue 32249.

  • Independently verified all 10,000 fixture values, the 250×40 INSERT boundaries and all seven expected aggregates.

  • Source-extracted component probe passed 3,840 combinations against an independent row oracle; the merge-base control exposed the original misalignment. Receipt: checks/1794050739979202868-3.json.

  • Isolation preflight and final 24-check static/evidence audit passed. Source remains unchanged. Receipts and retained logs are correlated in validation-evidence.json.

Limitations:

  • Full package/native tests and SQL/BVT were not completed locally: native prerequisites are missing and dependency resolution timed out.

  • The component probe uses minimal vector support. Author-reported package/build/vet checks lack raw logs, and substantive CI remains pending in the supplied snapshot.

This branch was successfully deployed

No deployments
ci — 4089fc4a Deployed Nov 8, 2026 by XuPeng-SH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L Denotes a PR that changes [500,999] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants