Skip to content

Commit

Permalink
improve codes style.
Browse files Browse the repository at this point in the history
Signed-off-by: RinChanNOWWW <rinchannow@bupt.edu.cn>
  • Loading branch information
RinChanNOWWW committed Jul 7, 2022
1 parent 530d46c commit 767fe22
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions dbms/src/AggregateFunctions/AggregateFunctionNull.h
Original file line number Diff line number Diff line change
Expand Up @@ -429,14 +429,14 @@ class AggregateFunctionNullUnary final : public AggregateFunctionNullBase<result
if constexpr (input_is_nullable)
{
const ColumnNullable * column = static_cast<const ColumnNullable *>(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.
Expand Down Expand Up @@ -465,7 +465,6 @@ class AggregateFunctionNullUnary final : public AggregateFunctionNullBase<result
const ColumnNullable * column = assert_cast<const ColumnNullable *>(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,
Expand All @@ -475,7 +474,7 @@ class AggregateFunctionNullUnary final : public AggregateFunctionNullBase<result
arena,
if_argument_pos);

if (nexted_func_name == "groupBitOr" || nexted_func_name == "groupBitAnd" || nexted_func_name == "groupBitXor")
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.
Expand Down

0 comments on commit 767fe22

Please sign in to comment.