@@ -364,10 +364,10 @@ Result<std::shared_ptr<Table>> RestCatalog::CreateTable(
364364 ICEBERG_ASSIGN_OR_RAISE (auto result,
365365 CreateTableInternal (identifier, schema, spec, order, location,
366366 properties, /* stage_create=*/ false ));
367- ICEBERG_ASSIGN_OR_RAISE (auto resolved , ResolveTableFileIO (result));
367+ ICEBERG_ASSIGN_OR_RAISE (auto table_io , ResolveTableFileIO (result));
368368 return Table::Make (identifier, std::move (result.metadata ),
369- std::move (result.metadata_location ), std::move (resolved. io ),
370- shared_from_this (), std::move (resolved. props ) );
369+ std::move (result.metadata_location ), std::move (table_io ),
370+ shared_from_this ());
371371}
372372
373373Result<std::shared_ptr<Table>> RestCatalog::UpdateTable (
@@ -409,12 +409,11 @@ Result<std::shared_ptr<Transaction>> RestCatalog::StageCreateTable(
409409 ICEBERG_ASSIGN_OR_RAISE (auto result,
410410 CreateTableInternal (identifier, schema, spec, order, location,
411411 properties, /* stage_create=*/ true ));
412- ICEBERG_ASSIGN_OR_RAISE (auto resolved, ResolveTableFileIO (result));
413- ICEBERG_ASSIGN_OR_RAISE (
414- auto staged_table,
415- StagedTable::Make (identifier, std::move (result.metadata ),
416- std::move (result.metadata_location ), std::move (resolved.io ),
417- shared_from_this (), std::move (resolved.props )));
412+ ICEBERG_ASSIGN_OR_RAISE (auto table_io, ResolveTableFileIO (result));
413+ ICEBERG_ASSIGN_OR_RAISE (auto staged_table,
414+ StagedTable::Make (identifier, std::move (result.metadata ),
415+ std::move (result.metadata_location ),
416+ std::move (table_io), shared_from_this ()));
418417 return Transaction::Make (std::move (staged_table), TransactionKind::kCreate );
419418}
420419
@@ -477,10 +476,10 @@ Result<std::string> RestCatalog::LoadTableInternal(
477476 return response.body ();
478477}
479478
480- Result<RestCatalog::ResolvedTableIO > RestCatalog::ResolveTableFileIO (
479+ Result<std::shared_ptr<FileIO> > RestCatalog::ResolveTableFileIO (
481480 const LoadTableResult& result) const {
482481 if (result.config .empty () && result.storage_credentials .empty ()) {
483- return ResolvedTableIO{. io = file_io_, . props = {}} ;
482+ return file_io_;
484483 }
485484
486485 // Merge order: catalog props < table config < storage credentials (highest priority)
@@ -514,23 +513,23 @@ Result<RestCatalog::ResolvedTableIO> RestCatalog::ResolveTableFileIO(
514513 ICEBERG_ASSIGN_OR_RAISE (auto kind, DetectBuiltinFileIO (warehouse));
515514 io_impl = std::string (BuiltinFileIOName (kind));
516515 } else {
517- return ResolvedTableIO{.io = file_io_, .props = std::move (merged)};
516+ // Cannot detect FileIO type; fall back to catalog-level FileIO.
517+ return file_io_;
518518 }
519519
520520 ICEBERG_ASSIGN_OR_RAISE (auto table_io, FileIORegistry::Load (io_impl, merged));
521- return ResolvedTableIO{.io = std::shared_ptr<FileIO>(std::move (table_io)),
522- .props = std::move (merged)};
521+ return std::shared_ptr<FileIO>(std::move (table_io));
523522}
524523
525524Result<std::shared_ptr<Table>> RestCatalog::LoadTable (const TableIdentifier& identifier) {
526525 ICEBERG_ASSIGN_OR_RAISE (const auto body, LoadTableInternal (identifier));
527526 ICEBERG_ASSIGN_OR_RAISE (auto json, FromJsonString (body));
528527 ICEBERG_ASSIGN_OR_RAISE (auto load_result, LoadTableResultFromJson (json));
529528
530- ICEBERG_ASSIGN_OR_RAISE (auto resolved , ResolveTableFileIO (load_result));
529+ ICEBERG_ASSIGN_OR_RAISE (auto table_io , ResolveTableFileIO (load_result));
531530 return Table::Make (identifier, std::move (load_result.metadata ),
532- std::move (load_result.metadata_location ), std::move (resolved. io ),
533- shared_from_this (), std::move (resolved. props ) );
531+ std::move (load_result.metadata_location ), std::move (table_io ),
532+ shared_from_this ());
534533}
535534
536535Result<std::shared_ptr<Table>> RestCatalog::RegisterTable (
@@ -551,10 +550,10 @@ Result<std::shared_ptr<Table>> RestCatalog::RegisterTable(
551550
552551 ICEBERG_ASSIGN_OR_RAISE (auto json, FromJsonString (response.body ()));
553552 ICEBERG_ASSIGN_OR_RAISE (auto load_result, LoadTableResultFromJson (json));
554- ICEBERG_ASSIGN_OR_RAISE (auto resolved , ResolveTableFileIO (load_result));
553+ ICEBERG_ASSIGN_OR_RAISE (auto table_io , ResolveTableFileIO (load_result));
555554 return Table::Make (identifier, std::move (load_result.metadata ),
556- std::move (load_result.metadata_location ), std::move (resolved. io ),
557- shared_from_this (), std::move (resolved. props ) );
555+ std::move (load_result.metadata_location ), std::move (table_io ),
556+ shared_from_this ());
558557}
559558
560559} // namespace iceberg::rest
0 commit comments