mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 09:02:00 +00:00
Do not add resize transform for SystemNumbers.
This commit is contained in:
parent
cd369bea4e
commit
76171c7afc
@ -95,7 +95,6 @@
|
||||
#include <DataTypes/DataTypeAggregateFunction.h>
|
||||
#include <DataStreams/materializeBlock.h>
|
||||
#include <Processors/Pipe.h>
|
||||
#include <Storages/System/StorageSystemNumbers.h>
|
||||
|
||||
|
||||
namespace DB
|
||||
@ -1951,7 +1950,7 @@ void InterpreterSelectQuery::executeAggregation(QueryPipeline & pipeline, const
|
||||
if (pipeline.getNumStreams() > 1)
|
||||
{
|
||||
/// Add resize transform to uniformly distribute data between aggregating streams.
|
||||
if (!(storage && typeid_cast<const StorageSystemNumbers *>(storage.get())))
|
||||
if (!(storage && storage->hasEvenlyDistributedRead()))
|
||||
pipeline.resize(pipeline.getNumStreams(), true, true);
|
||||
|
||||
auto many_data = std::make_shared<ManyAggregatedData>(pipeline.getNumStreams());
|
||||
|
@ -113,6 +113,8 @@ public:
|
||||
/// Returns true if the blocks shouldn't be pushed to associated views on insert.
|
||||
virtual bool noPushingToViews() const { return false; }
|
||||
|
||||
virtual bool hasEvenlyDistributedRead() const { return false; }
|
||||
|
||||
/// Optional size information of each physical column.
|
||||
/// Currently it's only used by the MergeTree family for query optimizations.
|
||||
using ColumnSizeByName = std::unordered_map<std::string, ColumnSize>;
|
||||
|
@ -39,6 +39,8 @@ public:
|
||||
size_t max_block_size,
|
||||
unsigned num_streams) override;
|
||||
|
||||
bool hasEvenlyDistributedRead() const override { return true; }
|
||||
|
||||
private:
|
||||
const std::string name;
|
||||
bool multithreaded;
|
||||
|
Loading…
Reference in New Issue
Block a user