Skip to content

fix: make vector distance schema nullable#6649

Merged
BubbleCal merged 1 commit intomainfrom
yang/dist-nullable
Apr 30, 2026
Merged

fix: make vector distance schema nullable#6649
BubbleCal merged 1 commit intomainfrom
yang/dist-nullable

Conversation

@BubbleCal
Copy link
Copy Markdown
Contributor

Bug Fix

  • What is the bug?
    • Vector search result schemas disagreed on the _distance column nullability. The public scanner and KNN schemas already expose _distance as nullable, while VECTOR_RESULT_SCHEMA and a mem-wal vector path still marked it as non-nullable.
  • What issues or incorrect behavior does the bug cause?
    • The mismatch can create inconsistent schemas across vector search execution paths and tests, even though callers should see a single nullable _distance contract.
  • How does this PR fix the problem?
    • Updates the remaining vector result schema definitions and related test fixtures to mark _distance as Float32 nullable.
    • Updates the VectorIndex schema documentation to match the nullable contract.

Validation

  • rg check for remaining explicit _distance Float32 nullable=false definitions under rust/lance and rust/lance-index
  • cargo fmt --all --check
  • cargo test -p lance --lib dataset::mem_wal::scanner::exec::filter_stale::tests:: --no-fail-fast
  • git diff --check

@github-actions
Copy link
Copy Markdown
Contributor

ACTION NEEDED
Lance follows the Conventional Commits specification for release automation.

The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification.

For details on the error please inspect the "PR Title Check" action.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2026

Codecov Report

❌ Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...rc/dataset/mem_wal/memtable/scanner/exec/vector.rs 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@BubbleCal BubbleCal changed the title Make vector distance schema nullable fix: make vector distance schema nullable Apr 30, 2026
@BubbleCal BubbleCal marked this pull request as ready for review April 30, 2026 06:03
Copy link
Copy Markdown

@claude claude Bot left a comment

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 to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

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

@github-actions github-actions Bot added the bug Something isn't working label Apr 30, 2026
@justinrmiller
Copy link
Copy Markdown
Contributor

lgtm

@BubbleCal BubbleCal merged commit 9d97361 into main Apr 30, 2026
29 of 30 checks passed
@BubbleCal BubbleCal deleted the yang/dist-nullable branch April 30, 2026 06:39
westonpace pushed a commit that referenced this pull request Apr 30, 2026
## Bug Fix

- What is the bug?
- Vector search result schemas disagreed on the `_distance` column
nullability. The public scanner and KNN schemas already expose
`_distance` as nullable, while `VECTOR_RESULT_SCHEMA` and a mem-wal
vector path still marked it as non-nullable.
- What issues or incorrect behavior does the bug cause?
- The mismatch can create inconsistent schemas across vector search
execution paths and tests, even though callers should see a single
nullable `_distance` contract.
- How does this PR fix the problem?
- Updates the remaining vector result schema definitions and related
test fixtures to mark `_distance` as `Float32` nullable.
- Updates the `VectorIndex` schema documentation to match the nullable
contract.

## Validation

- `rg` check for remaining explicit `_distance` `Float32`
`nullable=false` definitions under `rust/lance` and `rust/lance-index`
- `cargo fmt --all --check`
- `cargo test -p lance --lib
dataset::mem_wal::scanner::exec::filter_stale::tests:: --no-fail-fast`
- `git diff --check`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants