From d603cb1eb8606f6fcb57cb60673ebae42c111503 Mon Sep 17 00:00:00 2001 From: "igor.lapko" Date: Thu, 1 Nov 2018 09:01:34 +0200 Subject: [PATCH 1/3] fixed group by int16 and Date types on AMD EPYC 7401P machine --- dbms/src/Interpreters/Aggregator.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dbms/src/Interpreters/Aggregator.cpp b/dbms/src/Interpreters/Aggregator.cpp index 4d99f731517..52f7accf232 100644 --- a/dbms/src/Interpreters/Aggregator.cpp +++ b/dbms/src/Interpreters/Aggregator.cpp @@ -1475,7 +1475,9 @@ void NO_INLINE Aggregator::mergeDataImpl( Table & table_src, Arena * arena) const { - for (auto it = table_src.begin(); it != table_src.end(); ++it) + decltype(table_src.end()) end = table_src.end(); + + for (auto it = table_src.begin(); it != end; ++it) { decltype(it) res_it; bool inserted; From 2d565f1099aeaf143b1457a141ce25682175224b Mon Sep 17 00:00:00 2001 From: "igor.lapko" Date: Thu, 1 Nov 2018 13:42:15 +0200 Subject: [PATCH 2/3] code style fix --- dbms/src/Interpreters/Aggregator.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dbms/src/Interpreters/Aggregator.cpp b/dbms/src/Interpreters/Aggregator.cpp index 52f7accf232..d594f82050a 100644 --- a/dbms/src/Interpreters/Aggregator.cpp +++ b/dbms/src/Interpreters/Aggregator.cpp @@ -1475,9 +1475,8 @@ void NO_INLINE Aggregator::mergeDataImpl( Table & table_src, Arena * arena) const { - decltype(table_src.end()) end = table_src.end(); - for (auto it = table_src.begin(); it != end; ++it) + for (auto it = table_src.begin(), end = table_src.end(); it != end; ++it) { decltype(it) res_it; bool inserted; From 00fa7d9fad1f3253daf2a0f53adc15c22b021691 Mon Sep 17 00:00:00 2001 From: alexey-milovidov Date: Thu, 1 Nov 2018 15:42:57 +0300 Subject: [PATCH 3/3] Update Aggregator.cpp --- dbms/src/Interpreters/Aggregator.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/dbms/src/Interpreters/Aggregator.cpp b/dbms/src/Interpreters/Aggregator.cpp index d594f82050a..f854bdb894b 100644 --- a/dbms/src/Interpreters/Aggregator.cpp +++ b/dbms/src/Interpreters/Aggregator.cpp @@ -1475,7 +1475,6 @@ void NO_INLINE Aggregator::mergeDataImpl( Table & table_src, Arena * arena) const { - for (auto it = table_src.begin(), end = table_src.end(); it != end; ++it) { decltype(it) res_it;