From 552c928771f45d3f9b1b16e94934e875ba422de9 Mon Sep 17 00:00:00 2001 From: RinChanNOWWW Date: Thu, 7 Jul 2022 10:37:28 +0800 Subject: [PATCH] improve codes style. Signed-off-by: RinChanNOWWW --- dbms/src/AggregateFunctions/AggregateFunctionNull.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dbms/src/AggregateFunctions/AggregateFunctionNull.h b/dbms/src/AggregateFunctions/AggregateFunctionNull.h index 3dbc3b5cf63..b8dac02a957 100644 --- a/dbms/src/AggregateFunctions/AggregateFunctionNull.h +++ b/dbms/src/AggregateFunctions/AggregateFunctionNull.h @@ -429,14 +429,14 @@ class AggregateFunctionNullUnary final : public AggregateFunctionNullBase(columns[0]); - const String & nexted_func_name = this->nested_function->getName(); + if (!column->isNullAt(row_num)) { this->setFlag(place); const IColumn * nested_column = &column->getNestedColumn(); this->nested_function->add(this->nestedPlace(place), &nested_column, row_num, arena); } - else if (nexted_func_name == "groupBitOr" || nexted_func_name == "groupBitAnd" || nexted_func_name == "groupBitXor") + else if (const String & nexted_func_name = this->nested_function->getName(); nexted_func_name == "groupBitOr" || nexted_func_name == "groupBitAnd" || nexted_func_name == "groupBitXor") { // If nested_function is bitwise aggregation function, // the result is always not null. @@ -465,7 +465,6 @@ class AggregateFunctionNullUnary final : public AggregateFunctionNullBase(columns[0]); const IColumn * nested_column = &column->getNestedColumn(); const UInt8 * null_map = column->getNullMapData().data(); - const String & nexted_func_name = this->nested_function->getName(); this->nested_function->addBatchSinglePlaceNotNull( batch_size, @@ -475,7 +474,7 @@ class AggregateFunctionNullUnary final : public AggregateFunctionNullBasenested_function->getName(); nexted_func_name == "groupBitOr" || nexted_func_name == "groupBitAnd" || nexted_func_name == "groupBitXor") { // If nested_function is bitwise aggregation function, // the result is always not null.