github-actions[bot] commented on code in PR #35803:
URL: https://github.com/apache/doris/pull/35803#discussion_r1624066718
##########
be/src/pipeline/dependency.h:
##########
@@ -508,20 +505,36 @@ struct MultiCastSharedState : public BasicSharedState {
pipeline::MultiCastDataStreamer multi_cast_data_streamer;
};
+struct BlockRowPos {
+ BlockRowPos() : block_num(0), row_num(0), pos(0) {}
+ int64_t block_num; //the pos at which block
Review Comment:
warning: use default member initializer for 'block_num'
[modernize-use-default-member-init]
be/src/pipeline/dependency.h:508:
```diff
- BlockRowPos() : block_num(0), row_num(0), pos(0) {}
- int64_t block_num; //the pos at which block
+ BlockRowPos() : , row_num(0), pos(0) {}
+ int64_t block_num{0}; //the pos at which block
```
##########
be/src/pipeline/exec/scan_operator.cpp:
##########
@@ -587,9 +583,11 @@
template <typename Derived>
template <PrimitiveType T>
-Status ScanLocalState<Derived>::_normalize_in_and_eq_predicate(
- vectorized::VExpr* expr, vectorized::VExprContext* expr_ctx,
SlotDescriptor* slot,
- ColumnValueRange<T>& range, vectorized::VScanNode::PushDownType* pdt) {
+Status
ScanLocalState<Derived>::_normalize_in_and_eq_predicate(vectorized::VExpr* expr,
Review Comment:
warning: function '_normalize_in_and_eq_predicate' exceeds recommended
size/complexity thresholds [readability-function-size]
```cpp
Status
ScanLocalState<Derived>::_normalize_in_and_eq_predicate(vectorized::VExpr* expr,
^
```
<details>
<summary>Additional context</summary>
**be/src/pipeline/exec/scan_operator.cpp:585:** 93 lines including
whitespace and comments (threshold 80)
```cpp
Status
ScanLocalState<Derived>::_normalize_in_and_eq_predicate(vectorized::VExpr* expr,
^
```
</details>
##########
be/src/pipeline/exec/scan_operator.cpp:
##########
@@ -587,9 +583,11 @@ Status
ScanLocalState<Derived>::_eval_const_conjuncts(vectorized::VExpr* vexpr,
template <typename Derived>
template <PrimitiveType T>
-Status ScanLocalState<Derived>::_normalize_in_and_eq_predicate(
- vectorized::VExpr* expr, vectorized::VExprContext* expr_ctx,
SlotDescriptor* slot,
- ColumnValueRange<T>& range, vectorized::VScanNode::PushDownType* pdt) {
+Status
ScanLocalState<Derived>::_normalize_in_and_eq_predicate(vectorized::VExpr* expr,
Review Comment:
warning: function '_normalize_in_and_eq_predicate' has cognitive complexity
of 63 (threshold 50) [readability-function-cognitive-complexity]
```cpp
Status
ScanLocalState<Derived>::_normalize_in_and_eq_predicate(vectorized::VExpr* expr,
^
```
<details>
<summary>Additional context</summary>
**be/src/pipeline/exec/scan_operator.cpp:593:** +1, including nesting
penalty of 0, nesting level increased to 1
```cpp
if (TExprNodeType::IN_PRED == expr->node_type()) {
^
```
**be/src/pipeline/exec/scan_operator.cpp:597:** +2, including nesting
penalty of 1, nesting level increased to 2
```cpp
if (hybrid_set != nullptr) {
^
```
**be/src/pipeline/exec/scan_operator.cpp:599:** +3, including nesting
penalty of 2, nesting level increased to 3
```cpp
if (hybrid_set->size() <=
^
```
**be/src/pipeline/exec/scan_operator.cpp:602:** +1, nesting level increased
to 3
```cpp
} else {
^
```
**be/src/pipeline/exec/scan_operator.cpp:607:** +1, nesting level increased
to 2
```cpp
} else {
^
```
**be/src/pipeline/exec/scan_operator.cpp:611:** +3, including nesting
penalty of 2, nesting level increased to 3
```cpp
if (temp_pdt == PushDownType::UNACCEPTABLE) {
^
```
**be/src/pipeline/exec/scan_operator.cpp:621:** +3, including nesting
penalty of 2, nesting level increased to 3
```cpp
if (!state->use_set) {
^
```
**be/src/pipeline/exec/scan_operator.cpp:628:** +2, including nesting
penalty of 1, nesting level increased to 2
```cpp
while (iter->has_next()) {
^
```
**be/src/pipeline/exec/scan_operator.cpp:631:** +3, including nesting
penalty of 2, nesting level increased to 3
```cpp
if (nullptr == iter->get_value()) {
^
```
**be/src/pipeline/exec/scan_operator.cpp:636:** +3, including nesting
penalty of 2, nesting level increased to 3
```cpp
RETURN_IF_ERROR(_change_value_range<true>(
^
```
**be/src/common/status.h:614:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/pipeline/exec/scan_operator.cpp:636:** +4, including nesting
penalty of 3, nesting level increased to 4
```cpp
RETURN_IF_ERROR(_change_value_range<true>(
^
```
**be/src/common/status.h:616:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/pipeline/exec/scan_operator.cpp:642:** +1, nesting level increased
to 1
```cpp
} else if (TExprNodeType::BINARY_PRED == expr->node_type()) {
^
```
**be/src/pipeline/exec/scan_operator.cpp:644:** nesting level increased to 2
```cpp
auto eq_checker = [](const std::string& fn_name) { return fn_name ==
"eq"; };
^
```
**be/src/pipeline/exec/scan_operator.cpp:650:** +2, including nesting
penalty of 1, nesting level increased to 2
```cpp
RETURN_IF_ERROR(_should_push_down_binary_predicate(
^
```
**be/src/common/status.h:614:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/pipeline/exec/scan_operator.cpp:650:** +3, including nesting
penalty of 2, nesting level increased to 3
```cpp
RETURN_IF_ERROR(_should_push_down_binary_predicate(
^
```
**be/src/common/status.h:616:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/pipeline/exec/scan_operator.cpp:653:** +2, including nesting
penalty of 1, nesting level increased to 2
```cpp
if (temp_pdt == PushDownType::UNACCEPTABLE) {
^
```
**be/src/pipeline/exec/scan_operator.cpp:659:** +2, including nesting
penalty of 1, nesting level increased to 2
```cpp
if (value.data != nullptr) {
^
```
**be/src/pipeline/exec/scan_operator.cpp:660:** +3, including nesting
penalty of 2, nesting level increased to 3
```cpp
if constexpr (T == TYPE_CHAR || T == TYPE_VARCHAR || T ==
TYPE_STRING ||
^
```
**be/src/pipeline/exec/scan_operator.cpp:660:** +1
```cpp
if constexpr (T == TYPE_CHAR || T == TYPE_VARCHAR || T ==
TYPE_STRING ||
^
```
**be/src/pipeline/exec/scan_operator.cpp:663:** +4, including nesting
penalty of 3, nesting level increased to 4
```cpp
RETURN_IF_ERROR(_change_value_range<true>(
^
```
**be/src/common/status.h:614:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/pipeline/exec/scan_operator.cpp:663:** +5, including nesting
penalty of 4, nesting level increased to 5
```cpp
RETURN_IF_ERROR(_change_value_range<true>(
^
```
**be/src/common/status.h:616:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/pipeline/exec/scan_operator.cpp:666:** +1, nesting level increased
to 3
```cpp
} else {
^
```
**be/src/pipeline/exec/scan_operator.cpp:667:** +4, including nesting
penalty of 3, nesting level increased to 4
```cpp
if (sizeof(typename PrimitiveTypeTraits<T>::CppType) !=
value.size) {
^
```
**be/src/pipeline/exec/scan_operator.cpp:672:** +4, including nesting
penalty of 3, nesting level increased to 4
```cpp
RETURN_IF_ERROR(_change_value_range<true>(
^
```
**be/src/common/status.h:614:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/pipeline/exec/scan_operator.cpp:672:** +5, including nesting
penalty of 4, nesting level increased to 5
```cpp
RETURN_IF_ERROR(_change_value_range<true>(
^
```
**be/src/common/status.h:616:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
</details>
##########
be/src/vec/exec/join/process_hash_table_probe_impl.h:
##########
@@ -184,14 +185,13 @@ typename HashTableType::State
ProcessHashTableProbe<JoinOpType, Parent>::_init_p
return typename HashTableType::State(_parent->_probe_columns);
}
-template <int JoinOpType, typename Parent>
+template <int JoinOpType>
template <bool need_null_map_for_probe, bool ignore_null, typename
HashTableType,
bool with_other_conjuncts, bool is_mark_join>
-Status ProcessHashTableProbe<JoinOpType, Parent>::do_process(HashTableType&
hash_table_ctx,
- ConstNullMapPtr
null_map,
- MutableBlock&
mutable_block,
- Block*
output_block,
- size_t
probe_rows) {
+Status ProcessHashTableProbe<JoinOpType>::do_process(HashTableType&
hash_table_ctx,
Review Comment:
warning: function 'do_process' exceeds recommended size/complexity
thresholds [readability-function-size]
```cpp
Status ProcessHashTableProbe<JoinOpType>::do_process(HashTableType&
hash_table_ctx,
^
```
<details>
<summary>Additional context</summary>
**be/src/vec/exec/join/process_hash_table_probe_impl.h:190:** 109 lines
including whitespace and comments (threshold 80)
```cpp
Status ProcessHashTableProbe<JoinOpType>::do_process(HashTableType&
hash_table_ctx,
^
```
</details>
##########
be/src/vec/exec/join/process_hash_table_probe_impl.h:
##########
@@ -487,9 +487,10 @@
return Block::filter_block(output_block, result_column_id,
result_column_id);
}
-template <int JoinOpType, typename Parent>
-Status ProcessHashTableProbe<JoinOpType, Parent>::do_other_join_conjuncts(
- Block* output_block, std::vector<uint8_t>& visited, bool
has_null_in_build_side) {
+template <int JoinOpType>
+Status ProcessHashTableProbe<JoinOpType>::do_other_join_conjuncts(Block*
output_block,
Review Comment:
warning: function 'do_other_join_conjuncts' exceeds recommended
size/complexity thresholds [readability-function-size]
```cpp
JoinOpType>
^
```
<details>
<summary>Additional context</summary>
**be/src/vec/exec/join/process_hash_table_probe_impl.h:490:** 116 lines
including whitespace and comments (threshold 80)
```cpp
JoinOpType>
^
```
</details>
##########
be/src/olap/parallel_scanner_builder.cpp:
##########
@@ -39,9 +38,7 @@ Status
ParallelScannerBuilder<ParentType>::build_scanners(std::list<VScannerSPtr
}
}
-template <typename ParentType>
-Status ParallelScannerBuilder<ParentType>::_build_scanners_by_rowid(
- std::list<VScannerSPtr>& scanners) {
+Status
ParallelScannerBuilder::_build_scanners_by_rowid(std::list<VScannerSPtr>&
scanners) {
Review Comment:
warning: function '_build_scanners_by_rowid' exceeds recommended
size/complexity thresholds [readability-function-size]
```cpp
Status
ParallelScannerBuilder::_build_scanners_by_rowid(std::list<VScannerSPtr>&
scanners) {
^
```
<details>
<summary>Additional context</summary>
**be/src/olap/parallel_scanner_builder.cpp:40:** 126 lines including
whitespace and comments (threshold 80)
```cpp
Status
ParallelScannerBuilder::_build_scanners_by_rowid(std::list<VScannerSPtr>&
scanners) {
^
```
</details>
##########
be/src/pipeline/dependency.h:
##########
@@ -508,20 +505,36 @@
pipeline::MultiCastDataStreamer multi_cast_data_streamer;
};
+struct BlockRowPos {
+ BlockRowPos() : block_num(0), row_num(0), pos(0) {}
+ int64_t block_num; //the pos at which block
+ int64_t row_num; //the pos at which row
Review Comment:
warning: use default member initializer for 'row_num'
[modernize-use-default-member-init]
be/src/pipeline/dependency.h:508:
```diff
- BlockRowPos() : block_num(0), row_num(0), pos(0) {}
+ BlockRowPos() : block_num(0), , pos(0) {}
```
```suggestion
int64_t row_num{0}; //the pos at which row
```
##########
be/src/pipeline/dependency.h:
##########
@@ -508,20 +505,36 @@
pipeline::MultiCastDataStreamer multi_cast_data_streamer;
};
+struct BlockRowPos {
+ BlockRowPos() : block_num(0), row_num(0), pos(0) {}
+ int64_t block_num; //the pos at which block
+ int64_t row_num; //the pos at which row
+ int64_t pos; //pos = all blocks size + row_num
Review Comment:
warning: use default member initializer for 'pos'
[modernize-use-default-member-init]
be/src/pipeline/dependency.h:508:
```diff
- BlockRowPos() : block_num(0), row_num(0), pos(0) {}
+ BlockRowPos() : block_num(0), row_num(0), {}
```
```suggestion
int64_t pos{0}; //pos = all blocks size + row_num
```
##########
be/src/vec/exec/join/process_hash_table_probe_impl.h:
##########
@@ -359,10 +359,10 @@
* To avoid using nested loop join, we use the mark join conjunct(`t1.k1 =
t2.k1`) as the equal join conjunct.
* So this query will be a "null aware left anti join", which means the
equal conjunct's result should be nullable.
*/
-template <int JoinOpType, typename Parent>
+template <int JoinOpType>
template <bool with_other_conjuncts>
-Status ProcessHashTableProbe<JoinOpType, Parent>::do_mark_join_conjuncts(
- Block* output_block, size_t hash_table_bucket_size) {
+Status ProcessHashTableProbe<JoinOpType>::do_mark_join_conjuncts(Block*
output_block,
Review Comment:
warning: function 'do_mark_join_conjuncts' exceeds recommended
size/complexity thresholds [readability-function-size]
```cpp
_conjuncts>
^
```
<details>
<summary>Additional context</summary>
**be/src/vec/exec/join/process_hash_table_probe_impl.h:363:** 123 lines
including whitespace and comments (threshold 80)
```cpp
_conjuncts>
^
```
</details>
##########
be/src/pipeline/exec/scan_operator.cpp:
##########
@@ -1041,7 +1038,7 @@
template <PrimitiveType T>
Status ScanLocalState<Derived>::_normalize_binary_in_compound_predicate(
Review Comment:
warning: function '_normalize_binary_in_compound_predicate' has cognitive
complexity of 54 (threshold 50) [readability-function-cognitive-complexity]
```cpp
Status ScanLocalState<Derived>::_normalize_binary_in_compound_predicate(
^
```
<details>
<summary>Additional context</summary>
**be/src/pipeline/exec/scan_operator.cpp:1042:** +1, including nesting
penalty of 0, nesting level increased to 1
```cpp
if (TExprNodeType::BINARY_PRED == expr->node_type()) {
^
```
**be/src/pipeline/exec/scan_operator.cpp:1043:** nesting level increased to 2
```cpp
auto eq_checker = [](const std::string& fn_name) { return fn_name ==
"eq"; };
^
```
**be/src/pipeline/exec/scan_operator.cpp:1044:** nesting level increased to 2
```cpp
auto ne_checker = [](const std::string& fn_name) { return fn_name ==
"ne"; };
^
```
**be/src/pipeline/exec/scan_operator.cpp:1045:** nesting level increased to 2
```cpp
auto noneq_checker = [](const std::string& fn_name) {
^
```
**be/src/pipeline/exec/scan_operator.cpp:1046:** +1
```cpp
return fn_name != "ne" && fn_name != "eq" && fn_name !=
"eq_for_null";
^
```
**be/src/pipeline/exec/scan_operator.cpp:1054:** +2, including nesting
penalty of 1, nesting level increased to 2
```cpp
RETURN_IF_ERROR(_should_push_down_binary_predicate(
^
```
**be/src/common/status.h:614:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/pipeline/exec/scan_operator.cpp:1054:** +3, including nesting
penalty of 2, nesting level increased to 3
```cpp
RETURN_IF_ERROR(_should_push_down_binary_predicate(
^
```
**be/src/common/status.h:616:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/pipeline/exec/scan_operator.cpp:1057:** +2, including nesting
penalty of 1, nesting level increased to 2
```cpp
RETURN_IF_ERROR(_should_push_down_binary_predicate(
^
```
**be/src/common/status.h:614:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/pipeline/exec/scan_operator.cpp:1057:** +3, including nesting
penalty of 2, nesting level increased to 3
```cpp
RETURN_IF_ERROR(_should_push_down_binary_predicate(
^
```
**be/src/common/status.h:616:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/pipeline/exec/scan_operator.cpp:1060:** +2, including nesting
penalty of 1, nesting level increased to 2
```cpp
RETURN_IF_ERROR(_should_push_down_binary_predicate(
^
```
**be/src/common/status.h:614:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/pipeline/exec/scan_operator.cpp:1060:** +3, including nesting
penalty of 2, nesting level increased to 3
```cpp
RETURN_IF_ERROR(_should_push_down_binary_predicate(
^
```
**be/src/common/status.h:616:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/pipeline/exec/scan_operator.cpp:1063:** +2, including nesting
penalty of 1, nesting level increased to 2
```cpp
if (eq_pdt == PushDownType::UNACCEPTABLE && ne_pdt ==
PushDownType::UNACCEPTABLE &&
^
```
**be/src/pipeline/exec/scan_operator.cpp:1063:** +1
```cpp
if (eq_pdt == PushDownType::UNACCEPTABLE && ne_pdt ==
PushDownType::UNACCEPTABLE &&
^
```
**be/src/pipeline/exec/scan_operator.cpp:1070:** +2, including nesting
penalty of 1, nesting level increased to 2
```cpp
if (eq_pdt == PushDownType::ACCEPTABLE || ne_pdt ==
PushDownType::ACCEPTABLE ||
^
```
**be/src/pipeline/exec/scan_operator.cpp:1070:** +1
```cpp
if (eq_pdt == PushDownType::ACCEPTABLE || ne_pdt ==
PushDownType::ACCEPTABLE ||
^
```
**be/src/pipeline/exec/scan_operator.cpp:1072:** +3, including nesting
penalty of 2, nesting level increased to 3
```cpp
if (value.data != nullptr) {
^
```
**be/src/pipeline/exec/scan_operator.cpp:1073:** +4, including nesting
penalty of 3, nesting level increased to 4
```cpp
if constexpr (T == TYPE_CHAR || T == TYPE_VARCHAR || T ==
TYPE_STRING ||
^
```
**be/src/pipeline/exec/scan_operator.cpp:1073:** +1
```cpp
if constexpr (T == TYPE_CHAR || T == TYPE_VARCHAR || T ==
TYPE_STRING ||
^
```
**be/src/pipeline/exec/scan_operator.cpp:1076:** +5, including nesting
penalty of 4, nesting level increased to 5
```cpp
RETURN_IF_ERROR(_change_value_range<false>(
^
```
**be/src/common/status.h:614:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/pipeline/exec/scan_operator.cpp:1076:** +6, including nesting
penalty of 5, nesting level increased to 6
```cpp
RETURN_IF_ERROR(_change_value_range<false>(
^
```
**be/src/common/status.h:616:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/pipeline/exec/scan_operator.cpp:1080:** +1, nesting level increased
to 4
```cpp
} else {
^
```
**be/src/pipeline/exec/scan_operator.cpp:1081:** +5, including nesting
penalty of 4, nesting level increased to 5
```cpp
RETURN_IF_ERROR(_change_value_range<false>(
^
```
**be/src/common/status.h:614:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/pipeline/exec/scan_operator.cpp:1081:** +6, including nesting
penalty of 5, nesting level increased to 6
```cpp
RETURN_IF_ERROR(_change_value_range<false>(
^
```
**be/src/common/status.h:616:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
</details>
##########
be/src/pipeline/exec/scan_operator.cpp:
##########
@@ -716,39 +712,38 @@
*slot_ref_child = i;
*constant_val = const_column->get_data_at(0);
} else {
- pdt = vectorized::VScanNode::PushDownType::UNACCEPTABLE;
+ pdt = PushDownType::UNACCEPTABLE;
return Status::OK();
}
}
}
- pdt = vectorized::VScanNode::PushDownType::ACCEPTABLE;
+ pdt = PushDownType::ACCEPTABLE;
return Status::OK();
}
template <typename Derived>
-vectorized::VScanNode::PushDownType
ScanLocalState<Derived>::_should_push_down_in_predicate(
+PushDownType ScanLocalState<Derived>::_should_push_down_in_predicate(
vectorized::VInPredicate* pred, vectorized::VExprContext* expr_ctx,
bool is_not_in) {
if (pred->is_not_in() != is_not_in) {
- return vectorized::VScanNode::PushDownType::UNACCEPTABLE;
+ return PushDownType::UNACCEPTABLE;
}
- return vectorized::VScanNode::PushDownType::ACCEPTABLE;
+ return PushDownType::ACCEPTABLE;
}
template <typename Derived>
template <PrimitiveType T>
Status ScanLocalState<Derived>::_normalize_not_in_and_not_eq_predicate(
Review Comment:
warning: function '_normalize_not_in_and_not_eq_predicate' has cognitive
complexity of 107 (threshold 50) [readability-function-cognitive-complexity]
```cpp
Status ScanLocalState<Derived>::_normalize_not_in_and_not_eq_predicate(
^
```
<details>
<summary>Additional context</summary>
**be/src/pipeline/exec/scan_operator.cpp:742:** +1, including nesting
penalty of 0, nesting level increased to 1
```cpp
if (TExprNodeType::IN_PRED == expr->node_type()) {
^
```
**be/src/pipeline/exec/scan_operator.cpp:744:** +2, including nesting
penalty of 1, nesting level increased to 2
```cpp
if ((temp_pdt = _should_push_down_in_predicate(pred, expr_ctx,
true)) ==
^
```
**be/src/pipeline/exec/scan_operator.cpp:755:** +2, including nesting
penalty of 1, nesting level increased to 2
```cpp
if (!state->use_set) {
^
```
**be/src/pipeline/exec/scan_operator.cpp:761:** +2, including nesting
penalty of 1, nesting level increased to 2
```cpp
if (state->hybrid_set->contain_null()) {
^
```
**be/src/pipeline/exec/scan_operator.cpp:765:** +2, including nesting
penalty of 1, nesting level increased to 2
```cpp
while (iter->has_next()) {
^
```
**be/src/pipeline/exec/scan_operator.cpp:767:** +3, including nesting
penalty of 2, nesting level increased to 3
```cpp
if (nullptr == iter->get_value()) {
^
```
**be/src/pipeline/exec/scan_operator.cpp:771:** +3, including nesting
penalty of 2, nesting level increased to 3
```cpp
if (is_fixed_range) {
^
```
**be/src/pipeline/exec/scan_operator.cpp:772:** +4, including nesting
penalty of 3, nesting level increased to 4
```cpp
RETURN_IF_ERROR(_change_value_range<true>(
^
```
**be/src/common/status.h:614:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/pipeline/exec/scan_operator.cpp:772:** +5, including nesting
penalty of 4, nesting level increased to 5
```cpp
RETURN_IF_ERROR(_change_value_range<true>(
^
```
**be/src/common/status.h:616:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/pipeline/exec/scan_operator.cpp:774:** +1, nesting level increased
to 3
```cpp
} else {
^
```
**be/src/pipeline/exec/scan_operator.cpp:775:** +4, including nesting
penalty of 3, nesting level increased to 4
```cpp
RETURN_IF_ERROR(_change_value_range<true>(
^
```
**be/src/common/status.h:614:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/pipeline/exec/scan_operator.cpp:775:** +5, including nesting
penalty of 4, nesting level increased to 5
```cpp
RETURN_IF_ERROR(_change_value_range<true>(
^
```
**be/src/common/status.h:616:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/pipeline/exec/scan_operator.cpp:780:** +1, nesting level increased
to 1
```cpp
} else if (TExprNodeType::BINARY_PRED == expr->node_type()) {
^
```
**be/src/pipeline/exec/scan_operator.cpp:783:** nesting level increased to 2
```cpp
auto ne_checker = [](const std::string& fn_name) { return fn_name ==
"ne"; };
^
```
**be/src/pipeline/exec/scan_operator.cpp:786:** +2, including nesting
penalty of 1, nesting level increased to 2
```cpp
RETURN_IF_ERROR(_should_push_down_binary_predicate(
^
```
**be/src/common/status.h:614:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/pipeline/exec/scan_operator.cpp:786:** +3, including nesting
penalty of 2, nesting level increased to 3
```cpp
RETURN_IF_ERROR(_should_push_down_binary_predicate(
^
```
**be/src/common/status.h:616:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/pipeline/exec/scan_operator.cpp:789:** +2, including nesting
penalty of 1, nesting level increased to 2
```cpp
if (temp_pdt == PushDownType::UNACCEPTABLE) {
^
```
**be/src/pipeline/exec/scan_operator.cpp:795:** +2, including nesting
penalty of 1, nesting level increased to 2
```cpp
if (value.data != nullptr) {
^
```
**be/src/pipeline/exec/scan_operator.cpp:797:** +3, including nesting
penalty of 2, nesting level increased to 3
```cpp
if constexpr (T == TYPE_CHAR || T == TYPE_VARCHAR || T ==
TYPE_STRING ||
^
```
**be/src/pipeline/exec/scan_operator.cpp:797:** +1
```cpp
if constexpr (T == TYPE_CHAR || T == TYPE_VARCHAR || T ==
TYPE_STRING ||
^
```
**be/src/pipeline/exec/scan_operator.cpp:800:** +4, including nesting
penalty of 3, nesting level increased to 4
```cpp
if (is_fixed_range) {
^
```
**be/src/pipeline/exec/scan_operator.cpp:801:** +5, including nesting
penalty of 4, nesting level increased to 5
```cpp
RETURN_IF_ERROR(_change_value_range<true>(
^
```
**be/src/common/status.h:614:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/pipeline/exec/scan_operator.cpp:801:** +6, including nesting
penalty of 5, nesting level increased to 6
```cpp
RETURN_IF_ERROR(_change_value_range<true>(
^
```
**be/src/common/status.h:616:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/pipeline/exec/scan_operator.cpp:804:** +1, nesting level increased
to 4
```cpp
} else {
^
```
**be/src/pipeline/exec/scan_operator.cpp:805:** +5, including nesting
penalty of 4, nesting level increased to 5
```cpp
RETURN_IF_ERROR(_change_value_range<true>(
^
```
**be/src/common/status.h:614:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/pipeline/exec/scan_operator.cpp:805:** +6, including nesting
penalty of 5, nesting level increased to 6
```cpp
RETURN_IF_ERROR(_change_value_range<true>(
^
```
**be/src/common/status.h:616:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/pipeline/exec/scan_operator.cpp:809:** +1, nesting level increased
to 3
```cpp
} else {
^
```
**be/src/pipeline/exec/scan_operator.cpp:810:** +4, including nesting
penalty of 3, nesting level increased to 4
```cpp
if (is_fixed_range) {
^
```
**be/src/pipeline/exec/scan_operator.cpp:811:** +5, including nesting
penalty of 4, nesting level increased to 5
```cpp
RETURN_IF_ERROR(_change_value_range<true>(
^
```
**be/src/common/status.h:614:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/pipeline/exec/scan_operator.cpp:811:** +6, including nesting
penalty of 5, nesting level increased to 6
```cpp
RETURN_IF_ERROR(_change_value_range<true>(
^
```
**be/src/common/status.h:616:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/pipeline/exec/scan_operator.cpp:814:** +1, nesting level increased
to 4
```cpp
} else {
^
```
**be/src/pipeline/exec/scan_operator.cpp:815:** +5, including nesting
penalty of 4, nesting level increased to 5
```cpp
RETURN_IF_ERROR(_change_value_range<true>(
^
```
**be/src/common/status.h:614:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/pipeline/exec/scan_operator.cpp:815:** +6, including nesting
penalty of 5, nesting level increased to 6
```cpp
RETURN_IF_ERROR(_change_value_range<true>(
^
```
**be/src/common/status.h:616:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/pipeline/exec/scan_operator.cpp:821:** +1, nesting level increased
to 1
```cpp
} else {
^
```
**be/src/pipeline/exec/scan_operator.cpp:825:** +1, including nesting
penalty of 0, nesting level increased to 1
```cpp
if (is_fixed_range ||
^
```
**be/src/pipeline/exec/scan_operator.cpp:828:** +2, including nesting
penalty of 1, nesting level increased to 2
```cpp
if (!is_fixed_range) {
^
```
</details>
##########
be/src/vec/exec/scan/new_olap_scanner.cpp:
##########
@@ -668,13 +639,8 @@ void NewOlapScanner::_collect_profile_before_close() {
// Update counters from tablet reader's stats
auto& stats = _tablet_reader->stats();
- if (_parent) {
- NewOlapScanNode* olap_parent = (NewOlapScanNode*)_parent;
- INCR_COUNTER(olap_parent);
- } else {
- pipeline::OlapScanLocalState* local_state =
(pipeline::OlapScanLocalState*)_local_state;
- INCR_COUNTER(local_state);
- }
+ pipeline::OlapScanLocalState* local_state =
(pipeline::OlapScanLocalState*)_local_state;
Review Comment:
warning: use auto when initializing with a cast to avoid duplicating the
type name [modernize-use-auto]
```suggestion
auto* local_state = (pipeline::OlapScanLocalState*)_local_state;
```
##########
be/src/vec/exec/join/process_hash_table_probe_impl.h:
##########
@@ -487,9 +487,10 @@
return Block::filter_block(output_block, result_column_id,
result_column_id);
}
-template <int JoinOpType, typename Parent>
-Status ProcessHashTableProbe<JoinOpType, Parent>::do_other_join_conjuncts(
- Block* output_block, std::vector<uint8_t>& visited, bool
has_null_in_build_side) {
+template <int JoinOpType>
+Status ProcessHashTableProbe<JoinOpType>::do_other_join_conjuncts(Block*
output_block,
Review Comment:
warning: function 'do_other_join_conjuncts' has cognitive complexity of 61
(threshold 50) [readability-function-cognitive-complexity]
```cpp
JoinOpType>
^
```
<details>
<summary>Additional context</summary>
**be/src/vec/exec/join/process_hash_table_probe_impl.h:495:** +1, including
nesting penalty of 0, nesting level increased to 1
```cpp
ck->rows();
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:504:** +1, including
nesting penalty of 0, nesting level increased to 1
```cpp
ll = false;
^
```
**be/src/common/status.h:614:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:504:** +2, including
nesting penalty of 1, nesting level increased to 2
```cpp
ll = false;
^
```
**be/src/common/status.h:616:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:519:** +1, including
nesting penalty of 0, nesting level increased to 1
```cpp
.data();
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:526:** +2, including
nesting penalty of 1, nesting level increased to 2
```cpp
re are any.
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:530:** +3, including
nesting penalty of 2, nesting level increased to 3
```cpp
mn_ptr[i];
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:533:** +1, nesting
level increased to 3
```cpp
} else {
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:535:** +3, including
nesting penalty of 2, nesting level increased to 3
```cpp
}
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:540:** +2, including
nesting penalty of 1, nesting level increased to 2
```cpp
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:541:** +3, including
nesting penalty of 2, nesting level increased to 3
```cpp
unt; ++i) {
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:544:** +4, including
nesting penalty of 3, nesting level increased to 4
```cpp
mn_ptr[i]);
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:550:** +1, nesting
level increased to 1
```cpp
er_column);
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:556:** +2, including
nesting penalty of 1, nesting level increased to 2
```cpp
().data();
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:559:** +3, including
nesting penalty of 2, nesting level increased to 3
```cpp
indexs[i];
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:560:** +4, including
nesting penalty of 3, nesting level increased to 4
```cpp
EMI_JOIN) {
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:562:** +1, nesting
level increased to 4
```cpp
i] = false;
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:566:** +1, nesting
level increased to 4
```cpp
} else {
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:569:** +1, nesting
level increased to 3
```cpp
} else {
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:569:** +4, including
nesting penalty of 3, nesting level increased to 4
```cpp
} else {
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:572:** +1, nesting
level increased to 4
```cpp
} else {
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:573:** +5, including
nesting penalty of 4, nesting level increased to 5
```cpp
i] = false;
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:581:** +1, nesting
level increased to 1
```cpp
er_column);
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:583:** +2, including
nesting penalty of 1, nesting level increased to 2
```cpp
NTI_JOIN) {
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:586:** +1, nesting
level increased to 1
```cpp
;
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:588:** +2, including
nesting penalty of 1, nesting level increased to 2
```cpp
r_size = 0;
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:595:** +1, including
nesting penalty of 0, nesting level increased to 1
```cpp
0);
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:599:** +1, nesting
level increased to 1
```cpp
} else {
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:599:** +2, including
nesting penalty of 1, nesting level increased to 2
```cpp
} else {
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:604:** +2, including
nesting penalty of 1, nesting level increased to 2
```cpp
;
^
```
**be/src/common/status.h:614:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:604:** +3, including
nesting penalty of 2, nesting level increased to 3
```cpp
;
^
```
**be/src/common/status.h:616:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
</details>
##########
be/src/vec/exec/join/process_hash_table_probe_impl.h:
##########
@@ -359,10 +359,10 @@
* To avoid using nested loop join, we use the mark join conjunct(`t1.k1 =
t2.k1`) as the equal join conjunct.
* So this query will be a "null aware left anti join", which means the
equal conjunct's result should be nullable.
*/
-template <int JoinOpType, typename Parent>
+template <int JoinOpType>
template <bool with_other_conjuncts>
-Status ProcessHashTableProbe<JoinOpType, Parent>::do_mark_join_conjuncts(
- Block* output_block, size_t hash_table_bucket_size) {
+Status ProcessHashTableProbe<JoinOpType>::do_mark_join_conjuncts(Block*
output_block,
Review Comment:
warning: function 'do_mark_join_conjuncts' has cognitive complexity of 56
(threshold 50) [readability-function-cognitive-complexity]
```cpp
_conjuncts>
^
```
<details>
<summary>Additional context</summary>
**be/src/vec/exec/join/process_hash_table_probe_impl.h:376:** +1, including
nesting penalty of 0, nesting level increased to 1
```cpp
ck->rows();
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:385:** +1, including
nesting penalty of 0, nesting level increased to 1
```cpp
et_data();
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:397:** +2, including
nesting penalty of 1, nesting level increased to 2
```cpp
tched = -1;
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:399:** +3, including
nesting penalty of 2, nesting level increased to 3
```cpp
ucket_size;
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:400:** +4, including
nesting penalty of 3, nesting level increased to 4
```cpp
are_join) {
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:403:** +1, nesting
level increased to 4
```cpp
} else {
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:403:** +5, including
nesting penalty of 4, nesting level increased to 5
```cpp
} else {
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:406:** +1, nesting
level increased to 5
```cpp
i] = false;
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:409:** +1, nesting
level increased to 5
```cpp
_indexs[i];
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:415:** +2, including
nesting penalty of 1, nesting level increased to 2
```cpp
}
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:419:** +1, nesting
level increased to 1
```cpp
} else {
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:419:** +2, including
nesting penalty of 1, nesting level increased to 2
```cpp
} else {
^
```
**be/src/common/status.h:614:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:419:** +3, including
nesting penalty of 2, nesting level increased to 3
```cpp
} else {
^
```
**be/src/common/status.h:616:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:426:** +1, including
nesting penalty of 0, nesting level increased to 1
```cpp
er.data();
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:430:** +2, including
nesting penalty of 1, nesting level increased to 2
```cpp
ll = false;
^
```
**be/src/common/status.h:614:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:430:** +3, including
nesting penalty of 2, nesting level increased to 3
```cpp
ll = false;
^
```
**be/src/common/status.h:616:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:436:** +2, including
nesting penalty of 1, nesting level increased to 2
```cpp
ter.data();
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:455:** +1
```cpp
_has_null =
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:456:** +1, including
nesting penalty of 0, nesting level increased to 1
```cpp
_conjuncts;
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:458:** +2, including
nesting penalty of 1, nesting level increased to 2
```cpp
_indexs[i];
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:460:** +3, including
nesting penalty of 2, nesting level increased to 3
```cpp
_indexs[i];
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:462:** +1
```cpp
[i] = true;
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:466:** +1, nesting
level increased to 2
```cpp
} else {
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:466:** +3, including
nesting penalty of 2, nesting level increased to 3
```cpp
} else {
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:469:** +1, nesting
level increased to 3
```cpp
} else {
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:469:** +4, including
nesting penalty of 3, nesting level increased to 4
```cpp
} else {
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:469:** +1
```cpp
} else {
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:477:** +1, including
nesting penalty of 0, nesting level increased to 1
```cpp
}
^
```
**be/src/vec/exec/join/process_hash_table_probe_impl.h:479:** +2, including
nesting penalty of 1, nesting level increased to 2
```cpp
mark column
^
```
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]