feat: expose staged index segment transactions#6806
Conversation
Co-authored-by: Ragnor Comerford <ragnorc@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b0d5f35c19
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| async fn build_existing_index_segments_transaction( | ||
| &self, | ||
| index_name: &str, | ||
| column: &str, | ||
| segments: Vec<impl IntoIndexSegment + Send>, | ||
| ) -> Result<Transaction>; |
There was a problem hiding this comment.
Add a default body for new DatasetIndexExt method
Adding build_existing_index_segments_transaction as a required method on the public DatasetIndexExt trait is a breaking API change for downstream crates that implement this trait: they will fail to compile immediately after upgrading, even if they never use this new functionality. Because DatasetIndexExt is publicly exported, this should be introduced with a default implementation (or via a new extension trait) to preserve semver compatibility.
Useful? React with 👍 / 👎.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Summary
DatasetIndexExt::build_existing_index_segments_transactionto prepare anOperation::CreateIndextransaction for existing index segments without committing.commit_existing_index_segmentsto reuse the staged transaction path.CommitBuilder.Tests
cargo fmt --allcargo test -p lance existing_index_segments -- --nocapturecargo test -p lance test_vector_execute_uncommitted_segments_commit_without_staging -- --nocapturecargo checkagainst the new public APIFixes #6666