github-actions[bot] commented on code in PR #15642:
URL: https://github.com/apache/doris/pull/15642#discussion_r1062156640


##########
be/src/vec/exec/scan/new_olap_scan_node.cpp:
##########
@@ -179,13 +264,46 @@ static std::string tablets_id_to_string(
     return ss.str();
 }
 
+// iterate through conjuncts tree
+void NewOlapScanNode::_iterate_conjuncts_tree(const VExpr* conjunct_expr_root,
+                                              std::function<void(const 
VExpr*)> fn) {
+    if (!conjunct_expr_root) {
+        return;
+    }
+    fn(conjunct_expr_root);
+    for (const VExpr* child : conjunct_expr_root->children()) {
+        _iterate_conjuncts_tree(child, fn);
+    }
+    return;
+}

Review Comment:
   warning: redundant return statement at the end of a function with a void 
return type [readability-redundant-control-flow]
   
   ```suggestion
       }
   ```
   



##########
be/src/vec/exec/scan/new_olap_scan_node.cpp:
##########
@@ -179,13 +264,46 @@
     return ss.str();
 }
 
+// iterate through conjuncts tree
+void NewOlapScanNode::_iterate_conjuncts_tree(const VExpr* conjunct_expr_root,
+                                              std::function<void(const 
VExpr*)> fn) {
+    if (!conjunct_expr_root) {
+        return;
+    }
+    fn(conjunct_expr_root);
+    for (const VExpr* child : conjunct_expr_root->children()) {
+        _iterate_conjuncts_tree(child, fn);
+    }
+    return;
+}
+
+// get all slot ref column unique ids
+void NewOlapScanNode::_collect_conjuncts_slot_column_unique_ids(const VExpr* 
expr) {
+    if (!expr->is_slot_ref()) {
+        return;
+    }
+    auto slot_ref = reinterpret_cast<const VSlotRef*>(expr);
+    for (const auto* slot_desc : _output_tuple_desc->slots()) {
+        if (slot_desc->id() == slot_ref->slot_id() && 
slot_desc->col_unique_id() > 0) {
+            _conjuct_column_unique_ids.emplace(slot_desc->col_unique_id());
+        }
+    }
+    return;
+}

Review Comment:
   warning: redundant return statement at the end of a function with a void 
return type [readability-redundant-control-flow]
   
   ```suggestion
       }
   ```
   



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to