Repository navigation
fix(merge_insert): reject partial list updates before committing - #11329
lance-gatefixer[bot] wants to merge 2 commits into
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.
|
Added and verified the |
Preserve the nested projection fix for mixed indexed and unindexed fragments using supported partial struct sources, while retaining partial list rejection coverage. Initialize the default graph scoring mode in the upstream HNSW test so the test targets compile.
There was a problem hiding this comment.
✅ Gate recommendation: approve.
Rejecting partial list item schemas before planning remains a sound fix for #11327 without relying on per-row length or null checks. The merge preserves #11314’s projection fix for supported partial struct updates.
The earlier follow-up is complete; no further changes are requested.
Fixes #11327.
Partial
list<struct>merge sources could write some item fields to a new file while leaving others in the original file. Changes to list length or nullness then left incompatible list structures in the committed fragment, causing read panics or incorrect values.Reject partial list item schemas before planning an upsert, naming the field and asking for all item fields. This selects option 3 from the issue: even same-length and all-null partial list sources are rejected. Callers can still omit other table columns when supplying a complete list value. The check also covers large, nested, and fixed-size lists and respects field order, nullability, and existing blob schema conversion rules.
The reader now returns an Arrow error for mismatched list offsets instead of panicking. Existing placeholder merging behavior is preserved.
Nested subset tests cover indexed-only and mixed indexed/unindexed fragments using partial struct sources, preserving the unsupplied timestamp. An upstream HNSW test initializer supplies its required default graph scoring mode so the test targets compile.
Validation after merging
mainat6336d0408(Rust 1.98.1):cargo test -p lance --lib dataset::write::merge_insert::tests::: 444 passed, including multi-fragment partial/full list sources, null/empty transitions, nested list types, indexed joins, and both write modes. Rejected updates leave the dataset version and rows unchanged.cargo test -p lance-arrow: 361 unit tests and 9 doctests passed. The new offset-mismatch cases reproduced the original panic before the fix.cargo test -p lance --lib test_hnsw_prefix_graph_loads_without_dropped_rows: passed.cargo fmt --allandcargo clippy --all --tests --benches -- -D warnings: passed.Change walkthrough
flowchart LR A[Source schema] --> B{Complete list items?} B -->|No| C[Return input error] B -->|Yes| D[Plan merge] D --> E[Write fragments] E --> F[Commit transaction]Read: Validate before planning → Require complete lists → Return reader errors.
Snapshot: c4e81f2