From 1c5782d602f372ef35862b9ec376d2230f831869 Mon Sep 17 00:00:00 2001 From: Zhuo Wang Date: Thu, 19 Mar 2026 17:15:26 +0800 Subject: [PATCH] fix: use base_location instead of location in CreateTable 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. --- src/iceberg/catalog/memory/in_memory_catalog.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/iceberg/catalog/memory/in_memory_catalog.cc b/src/iceberg/catalog/memory/in_memory_catalog.cc index 7cd02ac73..ede316add 100644 --- a/src/iceberg/catalog/memory/in_memory_catalog.cc +++ b/src/iceberg/catalog/memory/in_memory_catalog.cc @@ -418,8 +418,9 @@ Result> InMemoryCatalog::CreateTable( std::string base_location = location.empty() ? warehouse_location_ + "/" + identifier.ToString() : location; - ICEBERG_ASSIGN_OR_RAISE(auto table_metadata, TableMetadata::Make(*schema, *spec, *order, - location, properties)); + ICEBERG_ASSIGN_OR_RAISE( + auto table_metadata, + TableMetadata::Make(*schema, *spec, *order, base_location, properties)); ICEBERG_ASSIGN_OR_RAISE( auto metadata_file_location,