From a30d1cc0dc252f089ee61c863f4ed60048459fab Mon Sep 17 00:00:00 2001 From: Ragnor Comerford Date: Tue, 12 May 2026 16:57:05 -0700 Subject: [PATCH] engine: stage_overwrite sets enable_stable_row_ids explicitly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Defensive — Lance 4.0.0 preserves the source dataset's flag through Operation::Overwrite even when WriteParams omits it (pinned by the prior commit's test), but setting it explicitly matches the public overwrite_dataset path at line 454 and documents the dependency at the call site so a future refactor doesn't accidentally drop it. Setting it on a dataset created without stable row IDs is a no-op per Lance's row-id-lineage spec, so this stays correct for legacy datasets. Co-Authored-By: Claude Opus 4.7 (1M context) --- crates/omnigraph/src/table_store.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/crates/omnigraph/src/table_store.rs b/crates/omnigraph/src/table_store.rs index 5b3fabf..e69067c 100644 --- a/crates/omnigraph/src/table_store.rs +++ b/crates/omnigraph/src/table_store.rs @@ -782,8 +782,19 @@ impl TableStore { "stage_overwrite called with empty batch".to_string(), )); } + // `enable_stable_row_ids: true` is defensive — empirically Lance 4.0.0 + // preserves the source dataset's flag through `Operation::Overwrite` + // when WriteParams omits it (pinned by + // `stage_overwrite_preserves_stable_row_ids` in tests/staged_writes.rs), + // but setting it explicitly matches the public `overwrite_dataset` + // path and keeps the invariant documented at every Overwrite site + // (see docs/storage.md "Stable row IDs"). Setting it on an existing + // dataset that was created without stable row IDs is a no-op per + // Lance's row-id-lineage spec, so this stays correct for legacy + // datasets. let params = WriteParams { mode: WriteMode::Overwrite, + enable_stable_row_ids: true, allow_external_blob_outside_bases: true, ..Default::default() };