Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Storages/IStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ class IStorage : public std::enable_shared_from_this<IStorage>, public TypePromo
size_t /*max_block_size*/,
size_t /*num_streams*/);

public:
/// Should we process blocks of data returned by the storage in parallel
/// even when the storage returned only one stream of data for reading?
/// It is beneficial, for example, when you read from a file quickly,
Expand All @@ -422,7 +423,6 @@ class IStorage : public std::enable_shared_from_this<IStorage>, public TypePromo
/// useless).
virtual bool parallelizeOutputAfterReading(ContextPtr) const { return !isSystemStorage(); }

public:
/// Other version of read which adds reading step to query plan.
/// Default implementation creates ReadFromStorageStep and uses usual read.
/// Can be called after `shutdown`, but not after `drop`.
Expand Down
70 changes: 70 additions & 0 deletions src/Storages/ObjectStorage/StorageObjectStorageCluster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -924,4 +924,74 @@ bool StorageObjectStorageCluster::prefersLargeBlocks() const
return IStorageCluster::prefersLargeBlocks();
}

bool StorageObjectStorageCluster::supportsPartitionBy() const
{
if (pure_storage)
return pure_storage->supportsPartitionBy();
return IStorageCluster::supportsPartitionBy();
}

bool StorageObjectStorageCluster::supportsSubcolumns() const
{
if (pure_storage)
return pure_storage->supportsSubcolumns();
return IStorageCluster::supportsSubcolumns();
}

bool StorageObjectStorageCluster::supportsDynamicSubcolumns() const
{
if (pure_storage)
return pure_storage->supportsDynamicSubcolumns();
return IStorageCluster::supportsDynamicSubcolumns();
}

bool StorageObjectStorageCluster::supportsTrivialCountOptimization(const StorageSnapshotPtr & snapshot, ContextPtr context) const
{
if (pure_storage)
return pure_storage->supportsTrivialCountOptimization(snapshot, context);
return IStorageCluster::supportsTrivialCountOptimization(snapshot, context);
}

bool StorageObjectStorageCluster::supportsPrewhere() const
{
if (pure_storage)
return pure_storage->supportsPrewhere();
return IStorageCluster::supportsPrewhere();
}

bool StorageObjectStorageCluster::canMoveConditionsToPrewhere() const
{
if (pure_storage)
return pure_storage->canMoveConditionsToPrewhere();
return IStorageCluster::canMoveConditionsToPrewhere();
}

std::optional<NameSet> StorageObjectStorageCluster::supportedPrewhereColumns() const
{
if (pure_storage)
return pure_storage->supportedPrewhereColumns();
return IStorageCluster::supportedPrewhereColumns();
}

IStorageCluster::ColumnSizeByName StorageObjectStorageCluster::getColumnSizes() const
{
if (pure_storage)
return pure_storage->getColumnSizes();
return IStorageCluster::getColumnSizes();
}

bool StorageObjectStorageCluster::parallelizeOutputAfterReading(ContextPtr context) const
{
if (pure_storage)
return pure_storage->parallelizeOutputAfterReading(context);
return IStorageCluster::parallelizeOutputAfterReading(context);
}

bool StorageObjectStorageCluster::supportsDelete() const
{
if (pure_storage)
return pure_storage->supportsDelete();
return IStorageCluster::supportsDelete();
}

}
18 changes: 18 additions & 0 deletions src/Storages/ObjectStorage/StorageObjectStorageCluster.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,24 @@ class StorageObjectStorageCluster : public IStorageCluster
ContextPtr /* context */) override;
bool prefersLargeBlocks() const override;

bool supportsPartitionBy() const override;

bool supportsSubcolumns() const override;

bool supportsDynamicSubcolumns() const override;

bool supportsTrivialCountOptimization(const StorageSnapshotPtr &, ContextPtr) const override;

/// Things required for PREWHERE.
bool supportsPrewhere() const override;
bool canMoveConditionsToPrewhere() const override;
std::optional<NameSet> supportedPrewhereColumns() const override;
ColumnSizeByName getColumnSizes() const override;

bool parallelizeOutputAfterReading(ContextPtr context) const override;

bool supportsDelete() const override;

private:
void updateQueryToSendIfNeeded(
ASTPtr & query,
Expand Down
Loading