Skip to content

Commit c66c37d

Browse files
Enmkianton-ru
authored andcommitted
Merge pull request #761 from Altinity/feature/fix_integration_tests
Feature/fix integration tests
1 parent 491947c commit c66c37d

File tree

3 files changed

+21
-8
lines changed

3 files changed

+21
-8
lines changed

src/Storages/ObjectStorage/DataLakes/DataLakeConfiguration.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,9 @@ class DataLakeConfiguration : public BaseStorageConfiguration, public std::enabl
172172
LoggerPtr log = getLogger("DataLakeConfiguration");
173173
const DataLakeStorageSettingsPtr settings;
174174

175-
void assertInitialized() const
175+
void assertInitialized() const override
176176
{
177+
BaseStorageConfiguration::assertInitialized();
177178
if (!current_metadata)
178179
throw Exception(ErrorCodes::LOGICAL_ERROR, "Metadata is not initialized");
179180
}
@@ -258,6 +259,7 @@ class StorageIcebergConfiguration : public StorageObjectStorage::Configuration,
258259
std::string getEngineName() const override { return getImpl().getEngineName(); }
259260
std::string getNamespaceType() const override { return getImpl().getNamespaceType(); }
260261

262+
Path getFullPath() const override { return getImpl().getFullPath(); }
261263
Path getPath() const override { return getImpl().getPath(); }
262264
void setPath(const Path & path) override { getImpl().setPath(path); }
263265

@@ -274,9 +276,14 @@ class StorageIcebergConfiguration : public StorageObjectStorage::Configuration,
274276
ASTs & args, const String & structure_, const String & format_, ContextPtr context, bool with_structure) override
275277
{ getImpl().addStructureAndFormatToArgsIfNeeded(args, structure_, format_, context, with_structure); }
276278

279+
bool withPartitionWildcard() const override { return getImpl().withPartitionWildcard(); }
280+
bool withGlobsIgnorePartitionWildcard() const override { return getImpl().withGlobsIgnorePartitionWildcard(); }
281+
bool isPathWithGlobs() const override { return getImpl().isPathWithGlobs(); }
282+
bool isNamespaceWithGlobs() const override { return getImpl().isNamespaceWithGlobs(); }
277283
std::string getPathWithoutGlobs() const override { return getImpl().getPathWithoutGlobs(); }
278284

279285
bool isArchive() const override { return getImpl().isArchive(); }
286+
bool isPathInArchiveWithGlobs() const override { return getImpl().isPathInArchiveWithGlobs(); }
280287
std::string getPathInArchive() const override { return getImpl().getPathInArchive(); }
281288

282289
void check(ContextPtr context) const override { getImpl().check(context); }
@@ -444,6 +451,8 @@ class StorageIcebergConfiguration : public StorageObjectStorage::Configuration,
444451
createDynamicStorage(type);
445452
}
446453

454+
void assertInitialized() const override { return getImpl().assertInitialized(); }
455+
447456
private:
448457
inline StorageObjectStorage::Configuration & getImpl() const
449458
{

src/Storages/ObjectStorage/StorageObjectStorage.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -219,15 +219,15 @@ class StorageObjectStorage::Configuration
219219
virtual void addStructureAndFormatToArgsIfNeeded(
220220
ASTs & args, const String & structure_, const String & format_, ContextPtr context, bool with_structure) = 0;
221221

222-
bool withPartitionWildcard() const;
222+
virtual bool withPartitionWildcard() const;
223223
bool withGlobs() const { return isPathWithGlobs() || isNamespaceWithGlobs(); }
224-
bool withGlobsIgnorePartitionWildcard() const;
225-
bool isPathWithGlobs() const;
226-
bool isNamespaceWithGlobs() const;
224+
virtual bool withGlobsIgnorePartitionWildcard() const;
225+
virtual bool isPathWithGlobs() const;
226+
virtual bool isNamespaceWithGlobs() const;
227227
virtual std::string getPathWithoutGlobs() const;
228228

229229
virtual bool isArchive() const { return false; }
230-
bool isPathInArchiveWithGlobs() const;
230+
virtual bool isPathInArchiveWithGlobs() const;
231231
virtual std::string getPathInArchive() const;
232232

233233
virtual void check(ContextPtr context) const;
@@ -304,14 +304,14 @@ class StorageObjectStorage::Configuration
304304
virtual void setCompressionMethod(const String & compression_method_) { compression_method = compression_method_; }
305305
virtual void setStructure(const String & structure_) { structure = structure_; }
306306

307+
virtual void assertInitialized() const;
308+
307309
private:
308310
String format = "auto";
309311
String compression_method = "auto";
310312
String structure = "auto";
311313

312314
protected:
313-
void assertInitialized() const;
314-
315315
bool initialized = false;
316316
};
317317

src/Storages/ObjectStorage/StorageObjectStorageCluster.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@ std::string StorageObjectStorageCluster::getName() const
183183

184184
std::optional<UInt64> StorageObjectStorageCluster::totalRows(ContextPtr query_context) const
185185
{
186+
if (pure_storage)
187+
return pure_storage->totalRows(query_context);
186188
configuration->update(
187189
object_storage,
188190
query_context,
@@ -193,6 +195,8 @@ std::optional<UInt64> StorageObjectStorageCluster::totalRows(ContextPtr query_co
193195

194196
std::optional<UInt64> StorageObjectStorageCluster::totalBytes(ContextPtr query_context) const
195197
{
198+
if (pure_storage)
199+
return pure_storage->totalBytes(query_context);
196200
configuration->update(
197201
object_storage,
198202
query_context,

0 commit comments

Comments
 (0)