From 1e32c8664fc72edb46864c4f226b300318d1c67a Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Mon, 19 Jan 2015 20:50:55 +0300 Subject: [PATCH] dbms: fixed error [#METR-14653]. --- dbms/src/Interpreters/Aggregator.cpp | 1 - .../queries/0_stateless/00112_totals_after_having.reference | 3 +++ dbms/tests/queries/0_stateless/00112_totals_after_having.sql | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 dbms/tests/queries/0_stateless/00112_totals_after_having.reference create mode 100644 dbms/tests/queries/0_stateless/00112_totals_after_having.sql diff --git a/dbms/src/Interpreters/Aggregator.cpp b/dbms/src/Interpreters/Aggregator.cpp index bba8d226163..572814a2675 100644 --- a/dbms/src/Interpreters/Aggregator.cpp +++ b/dbms/src/Interpreters/Aggregator.cpp @@ -1530,7 +1530,6 @@ void Aggregator::mergeStream(BlockInputStreamPtr stream, AggregatedDataVariants else if (result.type == AggregatedDataVariants::Type::NAME) \ mergeStreamsImpl(block, result, result.aggregates_pool, *result.NAME, result.NAME->data); - if (false) {} APPLY_FOR_AGGREGATED_VARIANTS(M) #undef M else if (result.type != AggregatedDataVariants::Type::without_key) diff --git a/dbms/tests/queries/0_stateless/00112_totals_after_having.reference b/dbms/tests/queries/0_stateless/00112_totals_after_having.reference new file mode 100644 index 00000000000..1fe64875bcf --- /dev/null +++ b/dbms/tests/queries/0_stateless/00112_totals_after_having.reference @@ -0,0 +1,3 @@ +1 2 + +0 2 diff --git a/dbms/tests/queries/0_stateless/00112_totals_after_having.sql b/dbms/tests/queries/0_stateless/00112_totals_after_having.sql new file mode 100644 index 00000000000..4b1d756c39a --- /dev/null +++ b/dbms/tests/queries/0_stateless/00112_totals_after_having.sql @@ -0,0 +1,4 @@ +SET totals_mode = 'after_having_auto'; +SET max_rows_to_group_by = 100000; +SET group_by_overflow_mode = 'any'; +SELECT dummy + 1 AS k, count() FROM remote('127.0.0.{1,2}', system, one) GROUP BY k WITH TOTALS ORDER BY k;