Repository navigation
fix(index): harvest zone map seeds from the serving data file - #10003
Merged
Merged
Conversation
There was a problem hiding this comment.
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.
zhangyue19921010
approved these changes
Oct 15, 2026
zhangyue19921010
left a comment
Collaborator
There was a problem hiding this comment.
Nice fix—the serving-file lookup and field-identity checks address the stale-seed issue cleanly. I reviewed the replacement, rename, nested-field, and blob paths; all 72 relevant tests passed. Running the new tests against the base implementation reproduced six failures, confirming the regression coverage. LGTM.
This was referenced Oct 16, 2026
Xuanwo
pushed a commit
that referenced
this pull request
Oct 24, 2026
The compat matrix is three recent stable majors plus one beta, and `_fetch_last_beta_release` filled the beta slot with the newest pre-release on the index. The release automation bumps main's version in the same commit that tags and publishes a beta, so once that beta is on the index it carries the version main is building, and the slot labels the build's own version as the older build. That is the state right after every beta release: main builds `14.0.0-beta.19` and the index's newest pre-release is `14.0.0b19`. `_fetch_last_beta_release` now picks the newest pre-release older than the build under test, so the slot is always strictly older than the version being built. Pre-releases are recognized with `Version.is_prerelease` instead of a substring search, an index entry that does not parse is skipped, and when nothing older is available the slot stays empty instead of falling back to a stable release. Reading the build's own version needs pylance, which `compat-pair.yml` and `nightly_run.yml` do not install on the host, so a missing pylance is reported as that rather than as a failed index query; the slot is then empty there, and neither workflow's tests read it. This corrects what the slot means; it does not stop a compat case that asserts an older build lacks a feature from failing once the first beta with that feature is older than main. #10011 was such a case, and #10003 fixed it by giving the case a version threshold, which is what any such case needs regardless of this change. The cost is that a pull request's compat run no longer reads its data with the most recently published beta, only with the one before it. Fixes #10011. ## How was this patch tested `test_beta_slot_takes_the_newest_release_older_than_the_build` covers the shapes the index can present: the published beta equal to the build, a beta newer than the build, versions out of order, a stable release newer than the betas, an unparseable entry, and nothing older to pin. Reverting the ordering, the pre-release filter or the parse guard each turns a case red. `test_beta_slot_measures_against_the_installed_build` covers the default bound, where `lance.__version__` reports Cargo's `14.0.0-beta.16` and the index has the normalized `14.0.0b16`. The last two tests cover a host with no pylance.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After a full-column replacement followed by another replacement of one column, a fragment can retain an older file for its other columns. Index maintenance read that first file's ZoneMap seed even though it no longer supplied the indexed column. A matching query then returned 0 rows instead of 10; an all-NULL replacement returned 3 instead of 13.
Harvest from the file currently serving the index's keyed field, resolving its path and object store through the dataset's base metadata. Resolve the seed name through the file's stored schema and physical column mapping, and verify that the inferred mapping agrees with the actual physical-column count. This preserves field identity across renames and avoids descriptor fields in blob footers shifting the lookup. Nested columns and missing or unverifiable seeds fall back to scanning current values.
Regression coverage compares indexed results with flat scans after optimization and reopening. It includes current seeds, all-NULL values, a current file with no seed, seeds disabled, a shallow clone, nested name collisions, swapped column names, and blob columns before or after indexed fields, including a rename composition. The three original stale-seed cases fail on the base revision and the no-seed control passes.
Validation: all 25 tests in
cargo test -p lance --lib zone_map_seedpassed.cargo fmt --allandcargo clippy --all --tests --benches -- -D warningspassed on the final code.The B-tree compatibility fixture now distinguishes the beta.16 reader capability from the peer-environment role. It preserves the existing post-compaction query checks, then restores index coverage for capable readers before checking the next reader. Both old-reader scan fallback and supported-reader index usage remain enforced.
The identical Python change passed 9 harness regression cases and 8 downgrade/round-trip cases using published 0.39.0, 13.0.0, 14.0.0b15, and 14.0.0b16 readers.
uv run make lintpassed. Both PRs have the same Python source and dependency tree; CI validates each native build separately.