fix: branch support on object stores, python branch ops, s3/ddb integration tests#7219
Merged
jackye1995 merged 3 commits intoJun 11, 2026
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
jackye1995
reviewed
Jun 11, 2026
brendanclement
added a commit
to lance-format/lance-namespace
that referenced
this pull request
Jun 11, 2026
## Description The Rust implementation in lance-format/lance defines TableBranchNotFound (22) and TableBranchAlreadyExists (23), but the spec registry and the Python and Java interface modules stop at 21. Clients converting errors by code (for example pylance via lance_namespace.errors.from_error_code) currently reclassify branch failures as InternalError, so deleting a missing branch surfaces as an internal error instead of a branch-not-found error. This adds the two branch error codes everywhere the registry lives: - spec.yaml: error code registry gains 22 and 23, plus 21 (Throttling), which was already present in every implementation but missing from the spec list. - Python: ErrorCode members, TableBranchNotFoundError / TableBranchAlreadyExistsError, from_error_code mapping, and package re-exports. - Java (core and core-async): ErrorCode entries, ErrorFactory cases, and the two exception classes in each module, mirroring the existing tag exceptions. ## Testing Python round-trip test for both codes (from_error_code returns the typed exceptions with the right code values). Surfaced by review feedback on lance-format/lance#7219, where the new Python branch API bindings expose the gap.
2796cd3 to
ee35261
Compare
jackye1995
approved these changes
Jun 11, 2026
jackye1995
left a comment
Contributor
There was a problem hiding this comment.
thanks for the fixes!
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.
Adds the first integration coverage for table branches (localstack S3 + DynamoDB) and fixes the four bugs it caught. All four were invisible to local-FS tests.
Branch locations broke uris that carry query strings. BranchLocation appended tree/ after the query string, so s3+ddb://...?ddbTableName=x produced a branch uri that re-parses to the main table path. Branches now work end to end over s3+ddb://.
create_branch dropped the dataset's store params. It passed store_params.unwrap_or_default() to CommitBuilder, so the commit's existence probe built an object store with no endpoint or region. It now falls back to the dataset's own params, matching shallow_clone.
The managed manifest store treated a missing chain as a fatal error. Probing a branch location before the branch exists surfaced the namespace's not-found instead of "no versions". get_latest_version now reports a missing table or branch chain as None, matching the ExternalManifestStore contract and the store's own behavior for empty main chains.
The Python namespace adapter flattened error identity. Exceptions from custom Python namespaces all arrived in Rust as opaque IO strings. The adapter now reconstructs the NamespaceError from the lance_namespace exception's error code, gated on the exception actually being a LanceNamespaceError so a foreign exception that happens to carry an integer code is never reinterpreted (it propagates as itself). Custom namespaces now raise the same typed exceptions as the native ones.