Compare commits

...

2 Commits

Author SHA1 Message Date
Ryan Green
4aa4e54f27 fix comment 2025-11-18 09:50:14 -03:30
Ryan Green
6aa33c3658 fix: open table with namespace fails with 'not found' due to URI concatenation 2025-11-18 09:28:23 -03:30

View File

@@ -476,10 +476,16 @@ class LanceNamespaceDBConnection(DBConnection):
storage_options_provider: Optional[StorageOptionsProvider] = None,
index_cache_size: Optional[int] = None,
) -> LanceTable:
# parse the DB location from the table URI
if table_uri.endswith(f"/{name}.lance"):
db_uri = table_uri[: -len(f"/{name}.lance")]
else:
db_uri = table_uri
# Open a table directly from a URI using the location parameter
# Note: storage_options should already be merged by the caller
temp_conn = LanceDBConnection(
table_uri, # Use the table location as the connection URI
db_uri,
read_consistency_interval=self.read_consistency_interval,
storage_options=storage_options if storage_options is not None else {},
session=self.session,
@@ -496,7 +502,6 @@ class LanceNamespaceDBConnection(DBConnection):
location=table_uri,
)
def connect_namespace(
impl: str,
properties: Dict[str, str],