mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Merge
This commit is contained in:
parent
2c067ad2c2
commit
80850909c7
@ -123,6 +123,8 @@ private:
|
||||
void executeDistinct( BlockInputStreams & streams, bool before_order, Names columns);
|
||||
void executeSubqueriesInSetsAndJoins(BlockInputStreams & streams, SubqueriesForSets & subqueries_for_sets);
|
||||
|
||||
void ignoreWithTotals() { query.group_by_with_totals = false; }
|
||||
|
||||
ASTPtr query_ptr;
|
||||
ASTSelectQuery & query;
|
||||
Context context;
|
||||
|
@ -610,6 +610,8 @@ QueryProcessingStage::Enum InterpreterSelectQuery::executeFetchColumns(BlockInpu
|
||||
|
||||
interpreter_subquery = new InterpreterSelectQuery(
|
||||
query.table, subquery_context, required_columns, QueryProcessingStage::Complete, subquery_depth + 1);
|
||||
if (query_analyzer->hasAggregation())
|
||||
interpreter_subquery->ignoreWithTotals();
|
||||
}
|
||||
|
||||
/// если в настройках установлен default_sample != 1, то все запросы выполняем с сэмплингом
|
||||
|
@ -0,0 +1,4 @@
|
||||
1
|
||||
0 0
|
||||
|
||||
0 0
|
@ -0,0 +1,2 @@
|
||||
SELECT count() FROM (SELECT dummy, sum(dummy) GROUP BY dummy WITH TOTALS);
|
||||
SELECT * FROM (SELECT dummy, sum(dummy) GROUP BY dummy WITH TOTALS);
|
Loading…
Reference in New Issue
Block a user