fix(python): preserve index details in python index metadata#6279
fix(python): preserve index details in python index metadata#6279
Conversation
PR ReviewClean refactoring that eliminates the One thing to consider
fn is_vector_segment(segment: &IndexMetadata) -> bool {
segment.index_details.as_ref()
.is_some_and(|details| details.type_url.ends_with("VectorIndexDetails"))
}This works today but is fragile — if the protobuf type URL format changes or a new vector index type is added with a different message name, this will silently misclassify segments and hit the multi-input rejection error. Consider matching on an enum/variant from Looks good otherwise
🤖 Generated with Claude Code |
9153063 to
27c06ff
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…d-pr1 # Conflicts: # rust/lance-index/src/traits.rs # rust/lance-index/src/types.rs
This PR fixes Python index metadata round-tripping so
Index.index_detailsis preserved when metadata crosses the Python/Rust boundary.Without this, segment metadata returned from
create_index_uncommitted(...)can loseindex_detailswhen passed back through Python, which breaksmerge_existing_index_segments(...)and makes committed index metadata less faithful.