Skip to content

fix(namespace): preserve unbounded IVF probe maximum - #9822

Merged
Xuanwo merged 3 commits into
lance-format:mainfrom
jackye1995:jack/fix-namespace-unbounded-probes
Oct 9, 2026
Merged

Xuanwo merged 3 commits into
lance-format:mainfrom
jackye1995:jack/fix-namespace-unbounded-probes

Conversation

@jackye1995

@jackye1995 jackye1995 commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Decode maximum_nprobes = 0 as the unbounded namespace sentinel instead of forwarding a literal zero to the scanner.

When legacy nprobes accompanies the sentinel, preserve it as the minimum while leaving the maximum unbounded. Add explain-plan and query regressions for the receiver boundary.

Align PyLance with Lance Namespace 0.13.x so the released Python SDK can be consumed alongside clients using the new probe-bound fields.

@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 pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@github-actions github-actions Bot added A-namespace Namespace impls bug Something isn't working labels Oct 9, 2026
lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Oct 9, 2026
@lance-gatekeeper lance-gatekeeper Bot removed the K-approved Latest Gatekeeper recommendation permits acceptance. label Oct 9, 2026
lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Oct 9, 2026
@github-actions github-actions Bot added A-python Python bindings A-deps Dependency updates labels Oct 9, 2026
@lance-gatekeeper lance-gatekeeper Bot removed the K-approved Latest Gatekeeper recommendation permits acceptance. label Oct 9, 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.

The receiver handles the existing zero sentinel for an unbounded maximum, and the Python dependency now matches the native probe-bound models. No blocking issues found.

The namespace update changes MergeInsertIntoTableRequest.on from a string to a list. Please mark this PR with the breaking-change label.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Oct 9, 2026
Comment on lines +1027 to +1043
let maximum_is_unbounded = maximum_nprobes == Some(0);
if let Some(nprobes) = nprobes {
scanner.nprobes(parse_probe_count("nprobes", nprobes)?);
let nprobes = parse_probe_count("nprobes", nprobes)?;
if maximum_is_unbounded {
scanner.minimum_nprobes(nprobes);
} else {
scanner.nprobes(nprobes);
}
}
if let Some(minimum_nprobes) = minimum_nprobes {
scanner.minimum_nprobes(parse_probe_count("minimum_nprobes", minimum_nprobes)?);
}
if let Some(maximum_nprobes) = maximum_nprobes {
scanner.maximum_nprobes(parse_probe_count("maximum_nprobes", maximum_nprobes)?);
let maximum_nprobes = parse_probe_count("maximum_nprobes", maximum_nprobes)?;
if maximum_nprobes != 0 {
scanner.maximum_nprobes(maximum_nprobes);
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the fix! One thing I noticed: the behavior here differs a bit from the namespace spec (lance-namespace docs/src/spec.yaml https://github.com/lance-format/lance-namespace/blob/main/docs/src/spec.yaml):

  • maximum_nprobes is declared minimum: 1, and "unbounded" is expressed by omitting the field, while this PR treats 0 as unbounded.
  • nprobes is documented as "Ignored when minimum_nprobes or maximum_nprobes is provided", while here nprobes + maximum_nprobes = 0 keeps nprobes as the minimum.

The implementation makes sense to me. Would it make sense to update the spec to match?

@Xuanwo
Xuanwo merged commit 58d8fac into lance-format:main Oct 9, 2026
wjones127 added a commit that referenced this pull request Oct 9, 2026
pylance 14.0.0b10 requires lance-namespace>=0.13.0,<0.14 (bumped in #9822),
so the compat venv's 0.11 pin made pip resolution fail.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
zhangyue19921010 pushed a commit that referenced this pull request Oct 10, 2026
…9850)

## Summary

#9822 bumped pylance's `lance-namespace` requirement to
`>=0.13.0,<0.14`, first released in 14.0.0b10. The compat venv manager
still installed `lance-namespace>=0.11.1,<0.12` alongside it, so pip
failed with `ResolutionImpossible` and every `[14.0.0b10]` compat test
failed
([run](https://github.com/lance-format/lance/actions/runs/37979490950/job/113988344868)).
This maps pylance >=14.0.0b10 to the 0.13 range.

## Evidence

`test_lance_namespace_dependency` now covers 14.0.0b9 (0.11 range) and
14.0.0b10 (0.13 range).

## Merge Risk

**Door:** two-way. Only test harness code changes.
**Blast Radius:** none. Only the compat tests are affected.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <[email protected]>
BubbleCal pushed a commit that referenced this pull request Oct 10, 2026
…9850)

## Summary

#9822 bumped pylance's `lance-namespace` requirement to
`>=0.13.0,<0.14`, first released in 14.0.0b10. The compat venv manager
still installed `lance-namespace>=0.11.1,<0.12` alongside it, so pip
failed with `ResolutionImpossible` and every `[14.0.0b10]` compat test
failed
([run](https://github.com/lance-format/lance/actions/runs/37979490950/job/113988344868)).
This maps pylance >=14.0.0b10 to the 0.13 range.

## Evidence

`test_lance_namespace_dependency` now covers 14.0.0b9 (0.11 range) and
14.0.0b10 (0.13 range).

## Merge Risk

**Door:** two-way. Only test harness code changes.
**Blast Radius:** none. Only the compat tests are affected.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <[email protected]>
(cherry picked from commit e85fab2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-deps Dependency updates A-namespace Namespace impls A-python Python bindings 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.

3 participants