Repository navigation
fix(namespace): preserve unbounded IVF probe maximum - #9822
Conversation
There was a problem hiding this comment.
✅ 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.
| 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); | ||
| } |
There was a problem hiding this comment.
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_nprobesis declaredminimum: 1, and "unbounded" is expressed by omitting the field, while this PR treats0as unbounded.nprobesis documented as "Ignored when minimum_nprobes or maximum_nprobes is provided", while herenprobes+maximum_nprobes = 0keepsnprobesas the minimum.
The implementation makes sense to me. Would it make sense to update the spec to match?
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]>
…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]>
…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)
Decode
maximum_nprobes = 0as the unbounded namespace sentinel instead of forwarding a literal zero to the scanner.When legacy
nprobesaccompanies 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.