@@ -330,7 +330,7 @@ static std::pair<Int32, String> getLatestMetadataFileAndVersion(
330330 if (metadata_files.empty ())
331331 {
332332 throw Exception (
333- ErrorCodes::FILE_DOESNT_EXIST, " The metadata file for Iceberg table with path {} doesn't exist" , configuration_ptr->getPath () );
333+ ErrorCodes::FILE_DOESNT_EXIST, " The metadata file for Iceberg table with path {} doesn't exist" , configuration_ptr->getPathForRead (). path );
334334 }
335335 std::vector<ShortMetadataFileInfo> metadata_files_with_versions;
336336 metadata_files_with_versions.reserve (metadata_files.size ());
@@ -413,7 +413,7 @@ static std::pair<Int32, String> getLatestOrExplicitMetadataFileAndVersion(
413413 if (*it == " ." || *it == " .." )
414414 throw Exception (ErrorCodes::BAD_ARGUMENTS, " Relative paths are not allowed" );
415415 }
416- auto prefix_storage_path = configuration_ptr->getPath () ;
416+ auto prefix_storage_path = configuration_ptr->getPathForRead (). path ;
417417 if (!explicit_metadata_path.starts_with (prefix_storage_path))
418418 explicit_metadata_path = std::filesystem::path (prefix_storage_path) / explicit_metadata_path;
419419 return getMetadataFileAndVersion (explicit_metadata_path);
@@ -430,7 +430,7 @@ static std::pair<Int32, String> getLatestOrExplicitMetadataFileAndVersion(
430430 }
431431 else if (data_lake_settings[DataLakeStorageSetting::iceberg_use_version_hint].value )
432432 {
433- auto prefix_storage_path = configuration_ptr->getPath () ;
433+ auto prefix_storage_path = configuration_ptr->getPathForRead (). path ;
434434 auto version_hint_path = std::filesystem::path (prefix_storage_path) / " metadata" / " version-hint.text" ;
435435 std::string metadata_file;
436436 StoredObject version_hint (version_hint_path);
0 commit comments