feat(namespace-dir): implement rename_table for DirectoryNamespace#6975
feat(namespace-dir): implement rename_table for DirectoryNamespace#6975Ar-maan05 wants to merge 5 commits into
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
Merged the latest The only collision was the Verified locally: |
|
Friendly ping! All checks passing, happy to make any changes if needed. |
|
I have rebased the branch with the latest main and resolved all merge conflicts. let me know if any changes are needed. |
Summary
Implements
rename_tableforDirectoryNamespace, which previously fell back to the trait's "not implemented" default. Closes #6960Behavior by mode:
Unsupported.ManifestNamespace::rename_table, which resolves the source entry from the manifest, validates the destination namespace exists, picks a destination directory consistent withcreate_table, copies the files, registers the new manifest entry before dropping the old one (so the table stays reachable under at least one name if a later step fails), and removes the source directory. Supports cross-namespace moves vianew_namespace_id.Also adds a shared copy_dir_all helper for recursive directory copies (works on both local FS and object stores).
Error handling
InvalidInput: emptynew_table_nameTableNotFound: source table does not existTableAlreadyExists: destination already existsUnsupported: cross-namespace rename without manifestTest plan
cargo fmt --allcargo clippy -p lance-namespace-impls --tests -- -D warnings(clean)cargo test -p lance-namespace-impls: 190 unit tests pass, including 8 newrename_tabletests covering both modes: