Skip to content

Commit 2eaf0b3

Browse files
committed
fix build
1 parent 9b67142 commit 2eaf0b3

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

src/Storages/ObjectStorage/DataLakes/Iceberg/IcebergMetadata.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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);

src/Storages/ObjectStorage/StorageObjectStorage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ void StorageObjectStorage::Configuration::initialize(
767767
{
768768
configuration_to_initialize.format
769769
= FormatFactory::instance()
770-
.tryGetFormatFromFileName(configuration_to_initialize.isArchive() ? configuration_to_initialize.getPathInArchive() : configuration_to_initialize.getPath())
770+
.tryGetFormatFromFileName(configuration_to_initialize.isArchive() ? configuration_to_initialize.getPathInArchive() : configuration_to_initialize.getPathForRead().path)
771771
.value_or("auto");
772772
}
773773
}

src/Storages/ObjectStorage/StorageObjectStorage.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,8 @@ class StorageObjectStorage::Configuration
294294
virtual bool supportsFileIterator() const { return false; }
295295
virtual bool supportsWrites() const { return true; }
296296

297+
virtual bool supportsPartialPathPrefix() const { return true; }
298+
297299
virtual ObjectIterator iterate(
298300
const ActionsDAG * /* filter_dag */,
299301
std::function<void(FileProgress)> /* callback */,

src/Storages/ObjectStorage/StorageObjectStorageSink.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ SinkPtr PartitionedStorageObjectStorageSink::createSinkForPartition(const String
167167
object_storage,
168168
configuration,
169169
format_settings,
170-
std::make_shared<Block>(partition_strategy->getFormatHeader()),
170+
partition_strategy->getFormatHeader(),
171171
context
172172
);
173173
}

0 commit comments

Comments
 (0)