diff --git a/dbms/src/DataStreams/RollupBlockInputStream.cpp b/dbms/src/DataStreams/RollupBlockInputStream.cpp index 46ed46edae9..389dbf5bec5 100644 --- a/dbms/src/DataStreams/RollupBlockInputStream.cpp +++ b/dbms/src/DataStreams/RollupBlockInputStream.cpp @@ -24,7 +24,7 @@ static void finalize(Block & block) } RollupBlockInputStream::RollupBlockInputStream( - const BlockInputStreamPtr & input_, const Aggregator::Params & params_) : aggregator(params_), + const BlockInputStreamPtr & input_, const Aggregator::Params & params_) : aggregator(params_), keys(params_.keys) { children.push_back(input_); @@ -47,7 +47,7 @@ Block RollupBlockInputStream::readImpl() * we will subsequently roll it up on next iterations of 'readImpl' * by zeroing out every column one-by-one and re-merging a block. */ - + if (current_key >= 0) { auto & current = rollup_block.getByPosition(keys[current_key]); diff --git a/dbms/src/Functions/FunctionsArithmetic.h b/dbms/src/Functions/FunctionsArithmetic.h index b41a6a1f814..7132d342c0e 100644 --- a/dbms/src/Functions/FunctionsArithmetic.h +++ b/dbms/src/Functions/FunctionsArithmetic.h @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -1209,7 +1210,7 @@ public: { if constexpr (!std::is_same_v, MultiplyImpl>) return false; - auto is_uint_type = [](const DataTypePtr & type) + auto is_uint_type = [](const DataTypePtr & type) { return checkDataType(type.get()) || checkDataType(type.get()) || checkDataType(type.get()) || checkDataType(type.get()); @@ -1226,14 +1227,14 @@ public: ColumnNumbers new_arguments = arguments; if (checkDataType(block.getByPosition(new_arguments[1]).type.get())) std::swap(new_arguments[0], new_arguments[1]); - + const ColumnAggregateFunction * column = typeid_cast(block.getByPosition(new_arguments[0]).column.get()); IAggregateFunction * function = column->getAggregateFunction().get(); auto arena = std::make_shared(); auto column_to = ColumnAggregateFunction::create(column->getAggregateFunction(), Arenas(1, arena)); - column_to->reserve(input_rows_count); + column_to->reserve(input_rows_count); auto column_from = ColumnAggregateFunction::create(column->getAggregateFunction(), Arenas(1, arena)); column_from->reserve(input_rows_count); @@ -1266,7 +1267,7 @@ public: m /= 2; } } - + block.getByPosition(result).column = std::move(column_to); return; } diff --git a/dbms/src/Interpreters/InterpreterSelectQuery.cpp b/dbms/src/Interpreters/InterpreterSelectQuery.cpp index a300f0f7c90..686d30dfb7a 100644 --- a/dbms/src/Interpreters/InterpreterSelectQuery.cpp +++ b/dbms/src/Interpreters/InterpreterSelectQuery.cpp @@ -539,7 +539,7 @@ void InterpreterSelectQuery::executeImpl(Pipeline & pipeline, const BlockInputSt { if (query.group_by_with_totals) executeTotalsAndHaving(pipeline, expressions.has_having, expressions.before_having, aggregate_overflow_row, !query.group_by_with_rollup); - + if (query.group_by_with_rollup) executeRollup(pipeline); } @@ -1079,9 +1079,9 @@ void InterpreterSelectQuery::executeRollup(Pipeline & pipeline) for (const auto & name : key_names) keys.push_back(header.getPositionByName(name)); - + const Settings & settings = context.getSettingsRef(); - + Aggregator::Params params(header, keys, aggregates, false, settings.max_rows_to_group_by, settings.group_by_overflow_mode, settings.compile ? &context.getCompiler() : nullptr, settings.min_count_to_compile,