diff --git a/src/Storages/ObjectStorage/StorageObjectStorageCluster.cpp b/src/Storages/ObjectStorage/StorageObjectStorageCluster.cpp index 3a2bfe8a990b..3528de14e532 100644 --- a/src/Storages/ObjectStorage/StorageObjectStorageCluster.cpp +++ b/src/Storages/ObjectStorage/StorageObjectStorageCluster.cpp @@ -89,7 +89,9 @@ StorageObjectStorageCluster::StorageObjectStorageCluster( metadata.setColumns(columns); metadata.setConstraints(constraints_); - if (sample_path.empty() && context_->getSettingsRef()[Setting::use_hive_partitioning]) + if (sample_path.empty() + && context_->getSettingsRef()[Setting::use_hive_partitioning] + && !configuration->withPartitionWildcard()) sample_path = getPathSample(metadata, context_); setInMemoryMetadata(metadata);