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 2022/06/01 15:29:05 UTC

[incubator-doris] 10/22: [Improvement] Simplify expressions for _vconjunct_ctx_ptr (#9816)

This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch dev-1.0.1
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git

commit 741f97829bf5487c602c610eede62644f56caf72
Author: Gabriel <ga...@gmail.com>
AuthorDate: Sun May 29 23:05:21 2022 +0800

    [Improvement] Simplify expressions for _vconjunct_ctx_ptr (#9816)
---
 be/src/exec/olap_scan_node.cpp |  4 ++--
 be/src/exec/scan_node.cpp      | 10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/be/src/exec/olap_scan_node.cpp b/be/src/exec/olap_scan_node.cpp
index 7ea7ca3510..de8fa57726 100644
--- a/be/src/exec/olap_scan_node.cpp
+++ b/be/src/exec/olap_scan_node.cpp
@@ -536,8 +536,8 @@ void OlapScanNode::remove_pushed_conjuncts(RuntimeState* state) {
 
     // set vconjunct_ctx is empty, if all conjunct
     if (_direct_conjunct_size == 0) {
-        if (_vconjunct_ctx_ptr.get() != nullptr) {
-            (*_vconjunct_ctx_ptr.get())->close(state);
+        if (_vconjunct_ctx_ptr != nullptr) {
+            (*_vconjunct_ctx_ptr)->close(state);
             _vconjunct_ctx_ptr = nullptr;
         }
     }
diff --git a/be/src/exec/scan_node.cpp b/be/src/exec/scan_node.cpp
index 8fb838f0e3..d3a5367593 100644
--- a/be/src/exec/scan_node.cpp
+++ b/be/src/exec/scan_node.cpp
@@ -48,20 +48,20 @@ Status ScanNode::prepare(RuntimeState* state) {
 // Expr tree specific forms do not require requirements.
 std::string ScanNode::_peel_pushed_vconjunct(RuntimeState* state,
                                              const std::function<bool(int)>& checker) {
-    if (_vconjunct_ctx_ptr.get() == nullptr) {
+    if (_vconjunct_ctx_ptr == nullptr) {
         return "null";
     }
 
     int leaf_index = 0;
-    vectorized::VExpr* conjunct_expr_root = (*_vconjunct_ctx_ptr.get())->root();
+    vectorized::VExpr* conjunct_expr_root = (*_vconjunct_ctx_ptr)->root();
 
     if (conjunct_expr_root != nullptr) {
         vectorized::VExpr* new_conjunct_expr_root = vectorized::VectorizedUtils::dfs_peel_conjunct(
-                state, *_vconjunct_ctx_ptr.get(), conjunct_expr_root, leaf_index, checker);
+                state, *_vconjunct_ctx_ptr, conjunct_expr_root, leaf_index, checker);
         if (new_conjunct_expr_root == nullptr) {
-            _vconjunct_ctx_ptr = nullptr;
+            _vconjunct_ctx_ptr.reset(nullptr);
         } else {
-            (*_vconjunct_ctx_ptr.get())->set_root(new_conjunct_expr_root);
+            (*_vconjunct_ctx_ptr)->set_root(new_conjunct_expr_root);
             return new_conjunct_expr_root->debug_string();
         }
     }


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