From 09edfaf49c6fd3acb168afb8cb2bae6c64dd0753 Mon Sep 17 00:00:00 2001 From: Zhichang Yu Date: Sun, 4 Aug 2019 22:48:48 +0800 Subject: [PATCH] let Style Check happy --- .../AggregateFunctions/AggregateFunctionGroupBitmapData.h | 7 ++++--- dbms/src/Functions/FunctionsBitmap.h | 7 +++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/dbms/src/AggregateFunctions/AggregateFunctionGroupBitmapData.h b/dbms/src/AggregateFunctions/AggregateFunctionGroupBitmapData.h index 7e8fccbd82a..422d1f7a98f 100644 --- a/dbms/src/AggregateFunctions/AggregateFunctionGroupBitmapData.h +++ b/dbms/src/AggregateFunctions/AggregateFunctionGroupBitmapData.h @@ -461,7 +461,7 @@ public: UInt64 rb_range(UInt32 range_start, UInt32 range_end, RoaringBitmapWithSmallSet& r1) const { UInt64 count = 0; - if(range_start >= range_end) + if (range_start >= range_end) return count; if (isSmall()) { @@ -469,7 +469,8 @@ public: for (const auto & x : small) { T val = x.getValue(); - if((UInt32)val >= range_start && (UInt32)val < range_end) { + if ((UInt32)val >= range_start && (UInt32)val < range_end) + { r1.add(val); count++; } @@ -482,7 +483,7 @@ public: roaring_move_uint32_iterator_equalorlarger(&iterator, range_start); while (iterator.has_value) { - if((UInt32)iterator.current_value >= range_end) + if ((UInt32)iterator.current_value >= range_end) break; r1.add(iterator.current_value); roaring_advance_uint32_iterator(&iterator); diff --git a/dbms/src/Functions/FunctionsBitmap.h b/dbms/src/Functions/FunctionsBitmap.h index ec6daaab97b..3aaf8e0b497 100644 --- a/dbms/src/Functions/FunctionsBitmap.h +++ b/dbms/src/Functions/FunctionsBitmap.h @@ -318,9 +318,12 @@ private: columns[i] = block.getByPosition(arguments[i]).column.get(); is_column_const[i] = isColumnConst(*columns[i]); } - if (is_column_const[0]) { + if (is_column_const[0]) + { colAggFunc = typeid_cast(typeid_cast(columns[0])->getDataColumnPtr().get()); - } else{ + } + else + { colAggFunc = typeid_cast(columns[0]); } container0 = &colAggFunc->getData();