You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2023/05/22 14:36:14 UTC
[doris] 06/06: [branch1.2](code-format) fix clang format
This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git
commit c5c2019dfed6b260051a9781d74b63578c751b62
Author: morningman <mo...@163.com>
AuthorDate: Mon May 22 02:09:07 2023 +0800
[branch1.2](code-format) fix clang format
---
be/src/exprs/cast_expr.cpp | 6 ++++--
be/src/runtime/disk_io_mgr.cc | 2 +-
.../aggregate_function_orthogonal_bitmap.cpp | 21 +++++++++++----------
be/src/vec/common/exception.h | 16 ++++++++++++----
be/src/vec/common/hash_table/hash.h | 10 ++++++----
be/src/vec/functions/like.cpp | 2 +-
be/test/olap/comparison_predicate_test.cpp | 4 +++-
7 files changed, 38 insertions(+), 23 deletions(-)
diff --git a/be/src/exprs/cast_expr.cpp b/be/src/exprs/cast_expr.cpp
index eaed69faed..3cd2fc2374 100644
--- a/be/src/exprs/cast_expr.cpp
+++ b/be/src/exprs/cast_expr.cpp
@@ -46,8 +46,10 @@ Expr* CastExpr::from_thrift(const TExprNode& node) {
return nullptr;
}
-#define CAST_SAME(CLASS, TYPE, FN) \
- TYPE CLASS::FN(ExprContext* context, TupleRow* row) { return _children[0]->FN(context, row); }
+#define CAST_SAME(CLASS, TYPE, FN) \
+ TYPE CLASS::FN(ExprContext* context, TupleRow* row) { \
+ return _children[0]->FN(context, row); \
+ }
#define CAST_FUNCTION(CLASS, TO_TYPE, TO_FN, FROM_TYPE, FROM_FN) \
TO_TYPE CLASS::TO_FN(ExprContext* context, TupleRow* row) { \
diff --git a/be/src/runtime/disk_io_mgr.cc b/be/src/runtime/disk_io_mgr.cc
index 702ee127a2..e0c8ef6e42 100644
--- a/be/src/runtime/disk_io_mgr.cc
+++ b/be/src/runtime/disk_io_mgr.cc
@@ -710,7 +710,7 @@ void DiskIoMgr::gc_io_buffers(int64_t bytes_to_free) {
iter != _free_buffers[idx].end(); ++iter) {
int64_t buffer_size = (1 << idx) * _min_buffer_size;
--_num_allocated_buffers;
- delete[] * iter;
+ delete[] *iter;
bytes_freed += buffer_size;
}
diff --git a/be/src/vec/aggregate_functions/aggregate_function_orthogonal_bitmap.cpp b/be/src/vec/aggregate_functions/aggregate_function_orthogonal_bitmap.cpp
index f3327eff1f..105d8b9d61 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_orthogonal_bitmap.cpp
+++ b/be/src/vec/aggregate_functions/aggregate_function_orthogonal_bitmap.cpp
@@ -69,15 +69,17 @@ AggregateFunctionPtr create_aggregate_function_orthogonal_bitmap_intersect_count
}
AggregateFunctionPtr create_aggregate_function_orthogonal_bitmap_expr_calculate(
- const std::string& name, const DataTypes& argument_types, const Array& parameters, bool result_is_nullable) {
- return create_aggregate_function_orthogonal<AggOrthBitMapExprCal>(name, argument_types, parameters,
- result_is_nullable);
+ const std::string& name, const DataTypes& argument_types, const Array& parameters,
+ bool result_is_nullable) {
+ return create_aggregate_function_orthogonal<AggOrthBitMapExprCal>(
+ name, argument_types, parameters, result_is_nullable);
}
AggregateFunctionPtr create_aggregate_function_orthogonal_bitmap_expr_calculate_count(
- const std::string& name, const DataTypes& argument_types, const Array& parameters, bool result_is_nullable) {
- return create_aggregate_function_orthogonal<AggOrthBitMapExprCalCount>(name, argument_types, parameters,
- result_is_nullable);
+ const std::string& name, const DataTypes& argument_types, const Array& parameters,
+ bool result_is_nullable) {
+ return create_aggregate_function_orthogonal<AggOrthBitMapExprCalCount>(
+ name, argument_types, parameters, result_is_nullable);
}
AggregateFunctionPtr create_aggregate_function_intersect_count(const std::string& name,
@@ -108,10 +110,9 @@ void register_aggregate_function_orthogonal_bitmap(AggregateFunctionSimpleFactor
factory.register_function("intersect_count", create_aggregate_function_intersect_count);
factory.register_function("orthogonal_bitmap_expr_calculate",
- create_aggregate_function_orthogonal_bitmap_expr_calculate);
+ create_aggregate_function_orthogonal_bitmap_expr_calculate);
- factory.register_function(
- "orthogonal_bitmap_expr_calculate_count",
- create_aggregate_function_orthogonal_bitmap_expr_calculate_count);
+ factory.register_function("orthogonal_bitmap_expr_calculate_count",
+ create_aggregate_function_orthogonal_bitmap_expr_calculate_count);
}
} // namespace doris::vectorized
\ No newline at end of file
diff --git a/be/src/vec/common/exception.h b/be/src/vec/common/exception.h
index c30fd01c80..df67c700fd 100644
--- a/be/src/vec/common/exception.h
+++ b/be/src/vec/common/exception.h
@@ -167,10 +167,18 @@ inline int AbstractException::code() const {
BASE::operator=(exc); \
return *this; \
} \
- const char* CLS::name() const throw() { return NAME; } \
- const char* CLS::className() const throw() { return typeid(*this).name(); } \
- AbstractException* CLS::clone() const { return new CLS(*this); } \
- void CLS::rethrow() const { throw *this; }
+ const char* CLS::name() const throw() { \
+ return NAME; \
+ } \
+ const char* CLS::className() const throw() { \
+ return typeid(*this).name(); \
+ } \
+ AbstractException* CLS::clone() const { \
+ return new CLS(*this); \
+ } \
+ void CLS::rethrow() const { \
+ throw *this; \
+ }
class Exception : public AbstractException {
public:
diff --git a/be/src/vec/common/hash_table/hash.h b/be/src/vec/common/hash_table/hash.h
index 6d63a16735..0a920c82ec 100644
--- a/be/src/vec/common/hash_table/hash.h
+++ b/be/src/vec/common/hash_table/hash.h
@@ -127,10 +127,12 @@ inline size_t hash_crc32(doris::vectorized::Int128 u) {
doris::vectorized::UInt128((u >> 64) & int64_t(-1), u & int64_t(-1)));
}
-#define DEFINE_HASH(T) \
- template <> \
- struct HashCRC32<T> { \
- size_t operator()(T key) const { return hash_crc32<T>(key); } \
+#define DEFINE_HASH(T) \
+ template <> \
+ struct HashCRC32<T> { \
+ size_t operator()(T key) const { \
+ return hash_crc32<T>(key); \
+ } \
};
DEFINE_HASH(doris::vectorized::UInt8)
diff --git a/be/src/vec/functions/like.cpp b/be/src/vec/functions/like.cpp
index 041f6a7a80..e480c3fb5e 100644
--- a/be/src/vec/functions/like.cpp
+++ b/be/src/vec/functions/like.cpp
@@ -429,7 +429,7 @@ Status FunctionLikeBase::execute_impl(FunctionContext* context, Block& block,
// for constant_substring_fn, use long run length search for performance
if (constant_substring_fn ==
*(state->function
- .target<doris::Status (*)(LikeSearchState * state, const ColumnString&,
+ .target<doris::Status (*)(LikeSearchState* state, const ColumnString&,
const StringValue&, ColumnUInt8::Container&)>())) {
RETURN_IF_ERROR(execute_substring(values->get_chars(), values->get_offsets(), vec_res,
&state->search_state));
diff --git a/be/test/olap/comparison_predicate_test.cpp b/be/test/olap/comparison_predicate_test.cpp
index 9f6ef32b55..926785d225 100644
--- a/be/test/olap/comparison_predicate_test.cpp
+++ b/be/test/olap/comparison_predicate_test.cpp
@@ -88,7 +88,9 @@ static std::string to_datetime_string(uint64_t& datetime_value) {
#define TEST_PREDICATE_DEFINITION(CLASS_NAME) \
class CLASS_NAME : public testing::Test { \
public: \
- CLASS_NAME() { _mem_pool.reset(new MemPool()); } \
+ CLASS_NAME() { \
+ _mem_pool.reset(new MemPool()); \
+ } \
~CLASS_NAME() {} \
void SetTabletSchema(std::string name, const std::string& type, \
const std::string& aggregation, uint32_t length, bool is_allow_null, \
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org