Skip to content

Commit 0596ef5

Browse files
authored
fix: use base_location instead of location in CreateTable (#594)
Pass the resolved base_location to TableMetadata::Make instead of the raw location parameter, ensuring the computed default warehouse path is used when no explicit location is provided.
1 parent 4db7c67 commit 0596ef5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/iceberg/catalog/memory/in_memory_catalog.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,9 @@ Result<std::shared_ptr<Table>> InMemoryCatalog::CreateTable(
418418
std::string base_location =
419419
location.empty() ? warehouse_location_ + "/" + identifier.ToString() : location;
420420

421-
ICEBERG_ASSIGN_OR_RAISE(auto table_metadata, TableMetadata::Make(*schema, *spec, *order,
422-
location, properties));
421+
ICEBERG_ASSIGN_OR_RAISE(
422+
auto table_metadata,
423+
TableMetadata::Make(*schema, *spec, *order, base_location, properties));
423424

424425
ICEBERG_ASSIGN_OR_RAISE(
425426
auto metadata_file_location,

0 commit comments

Comments
 (0)