Skip to content

fix(scanner): align row offset statistics with output schema - #10030

Merged
LuQQiu merged 1 commit into
mainfrom
yang/fix-rowoffset-statistics
Oct 15, 2026
Merged

LuQQiu merged 1 commit into
mainfrom
yang/fix-rowoffset-statistics

Conversation

@BubbleCal

Copy link
Copy Markdown
Contributor

ANN scans projecting _rowoffset with default distance ordering could panic during physical optimization. AddRowOffsetExec appended an output field but returned only the input columns’ statistics, causing DataFusion’s projection statistics to index past the end.

Append unknown statistics for _rowoffset and clear the input-only byte count while preserving the row count and existing column statistics. This is a focused fix for the statistics issue also covered by #8566.

Regression coverage includes known and unknown statistics, global and per-partition statistics, and three-fragment ANN queries with deletions, stable and address-style row IDs, and both offset-only and ID-plus-offset projections. ANN results assert exact neighbors, offsets, distances, and recall of 1.0.

Validation on macOS arm64 with Rust 1.98.1 and the repository ci profile:

  • All 8 new regression cases fail on the unchanged base; ANN cases reproduce the DataFusion projection panic.
  • cargo test --profile ci --locked -p lance --lib row_offset: 11 passed.
  • cargo test --profile ci --locked -p lance --lib io::exec::rowids::test: 10 passed.
  • cargo clippy --profile ci --locked --all --tests --benches -- -D warnings passed.
  • cargo fmt --all -- --check and git diff --check passed.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@github-actions github-actions Bot added the bug Something isn't working label Oct 15, 2026

@lance-gatekeeper lance-gatekeeper Bot 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.

✅ Gate recommendation: approve.

No merge-blocking issues found. The focused row-offset and row-ID tests passed, including ANN projections with deletions and both row-ID modes.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Oct 15, 2026
@LuQQiu
LuQQiu merged commit 3a1f35f into main Oct 15, 2026
@LuQQiu
LuQQiu deleted the yang/fix-rowoffset-statistics branch October 15, 2026 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working K-approved Latest Gatekeeper recommendation permits acceptance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants