mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
Update SelectStreamFactory.
This commit is contained in:
parent
bb6d6a37b3
commit
4cf65451de
@ -114,6 +114,7 @@ void SelectStreamFactory::createForShard(
|
||||
Pipes & res)
|
||||
{
|
||||
bool force_add_agg_info = processed_stage == QueryProcessingStage::WithMergeableState;
|
||||
bool add_totals_port = processed_stage == QueryProcessingStage::Complete;
|
||||
|
||||
auto modified_query_ast = query_ast->clone();
|
||||
if (has_virtual_shard_num_column)
|
||||
@ -135,6 +136,8 @@ void SelectStreamFactory::createForShard(
|
||||
stream->setMainTable(main_table);
|
||||
|
||||
auto source = std::make_shared<SourceFromInputStream>(std::move(stream), force_add_agg_info);
|
||||
|
||||
if (add_totals_port)
|
||||
source->addTotalsPort();
|
||||
|
||||
res.emplace_back(std::move(source));
|
||||
@ -279,6 +282,8 @@ void SelectStreamFactory::createForShard(
|
||||
};
|
||||
|
||||
auto source = std::make_shared<SourceFromInputStream>("LazyShardWithLocalReplica", header, lazily_create_stream, force_add_agg_info);
|
||||
|
||||
if (add_totals_port)
|
||||
source->addTotalsPort();
|
||||
|
||||
res.emplace_back(std::move(source));
|
||||
|
Loading…
Reference in New Issue
Block a user