mirror of
https://github.com/lancedb/lancedb.git
synced 2026-05-14 10:30:40 +00:00
fix: merge user storage_options in server-side create_table
_create_table_server_side was only passing self.storage_options (connection-level) to CreateTableRequest, ignoring the user-provided storage_options parameter. This caused per-table options like new_table_data_storage_version to be silently dropped. Fix both sync and async paths to merge user options on top of connection options. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -607,10 +607,13 @@ class LanceNamespaceDBConnection(DBConnection):
|
||||
fill_value=fill_value,
|
||||
)
|
||||
|
||||
merged = dict(self.storage_options or {})
|
||||
if storage_options:
|
||||
merged.update(storage_options)
|
||||
request = CreateTableRequest(
|
||||
id=table_id,
|
||||
mode=_normalize_create_table_mode(mode),
|
||||
properties=self.storage_options if self.storage_options else None,
|
||||
properties=merged or None,
|
||||
)
|
||||
|
||||
try:
|
||||
@@ -1147,10 +1150,13 @@ class AsyncLanceNamespaceDBConnection:
|
||||
fill_value=fill_value,
|
||||
)
|
||||
|
||||
merged = dict(self.storage_options or {})
|
||||
if storage_options:
|
||||
merged.update(storage_options)
|
||||
request = CreateTableRequest(
|
||||
id=table_id,
|
||||
mode=_normalize_create_table_mode(mode),
|
||||
properties=self.storage_options if self.storage_options else None,
|
||||
properties=merged or None,
|
||||
)
|
||||
|
||||
self._namespace_client.create_table(request, arrow_ipc_bytes)
|
||||
|
||||
Reference in New Issue
Block a user