Skip to content

fix: support namespace-only add column operations#5177

Open
FANNG1 wants to merge 3 commits into
lance-format:mainfrom
FANNG1:fix-add-columns-namespace
Open

fix: support namespace-only add column operations#5177
FANNG1 wants to merge 3 commits into
lance-format:mainfrom
FANNG1:fix-add-columns-namespace

Conversation

@FANNG1

@FANNG1 FANNG1 commented Jun 11, 2026

Copy link
Copy Markdown

Summary

  • Add namespace table resolution for add_columns, add_columns_from, and merge_columns_from
  • Resolve table location via describe_table when callers provide namespace_impl + table_id without a URI
  • Merge namespace-returned storage_options with user-provided options, with namespace values taking precedence
  • Add tests for namespace-only add-column flow and storage option precedence

Closes #5176.

Tests

  • uv run --extra dev ruff check lance_ray/io.py tests/test_add_columns_from.py
  • uv run pytest tests/test_add_columns_from.py -q

@github-actions

Copy link
Copy Markdown
Contributor

ACTION NEEDED
Lance follows the Conventional Commits specification for release automation.

The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification.

For details on the error please inspect the "PR Title Check" action.

@FANNG1 FANNG1 changed the title Support namespace-only add column operations fix: support namespace-only add column operations Jun 11, 2026
@github-actions github-actions Bot added the bug Something isn't working label Jun 11, 2026
fanng added 2 commits June 11, 2026 15:54
…amespace_table

Move the duplicated describe_table -> location + storage_options merge
pattern into a single shared helper resolve_namespace_table() in utils.py
and converge add_columns/add_columns_from/merge_columns_from (io.py),
compact_files (compaction.py), create_scalar_index/create_index/
optimize_indices (index.py), and vector_search (search.py) onto it.

- Fixes inconsistent None-location handling: the inline copies silently
  proceeded with uri=None, now all raise a clear ValueError.
- Short-circuit when an explicit uri is provided: no describe_table RPC
  and no merging of another table's storage_options, removing the
  wrong-table credential hazard.
- datasink.py (create/append/overwrite + declare_table write path) is
  intentionally left as-is since its semantics differ.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support namespace-only add column operations

1 participant