This is an automated email from the ASF dual-hosted git repository.
gangwu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-cpp.git
The following commit(s) were added to refs/heads/main by this push:
new 0596ef52 fix: use base_location instead of location in CreateTable
(#594)
0596ef52 is described below
commit 0596ef52984289e2c279da1e088af14b2dfcad46
Author: wzhuo <[email protected]>
AuthorDate: Thu Mar 19 17:42:49 2026 +0800
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.
---
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 7cd02ac7..ede316ad 100644
--- a/src/iceberg/catalog/memory/in_memory_catalog.cc
+++ b/src/iceberg/catalog/memory/in_memory_catalog.cc
@@ -418,8 +418,9 @@ Result<std::shared_ptr<Table>> 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,