This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 9e49f68663 [fix](new-scan) try to fix invalid call to nullptr slot (#12552) 9e49f68663 is described below commit 9e49f68663c95776ef89da68a984932a91e335a5 Author: Pxl <pxl...@qq.com> AuthorDate: Tue Sep 13 18:54:29 2022 +0800 [fix](new-scan) try to fix invalid call to nullptr slot (#12552) --- be/src/vec/exec/scan/vscan_node.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/be/src/vec/exec/scan/vscan_node.cpp b/be/src/vec/exec/scan/vscan_node.cpp index 23661f7c5b..0ded3e80e3 100644 --- a/be/src/vec/exec/scan/vscan_node.cpp +++ b/be/src/vec/exec/scan/vscan_node.cpp @@ -272,11 +272,11 @@ Status VScanNode::_append_rf_into_conjuncts(std::vector<VExpr*>& vexprs) { RETURN_IF_ERROR(new_vconjunct_ctx_ptr->prepare(_state, _row_descriptor)); RETURN_IF_ERROR(new_vconjunct_ctx_ptr->open(_state)); if (_vconjunct_ctx_ptr) { - (*(_vconjunct_ctx_ptr.get()))->mark_as_stale(); + (*_vconjunct_ctx_ptr)->mark_as_stale(); _stale_vexpr_ctxs.push_back(std::move(_vconjunct_ctx_ptr)); } _vconjunct_ctx_ptr.reset(new doris::vectorized::VExprContext*); - *(_vconjunct_ctx_ptr.get()) = new_vconjunct_ctx_ptr; + *_vconjunct_ctx_ptr = new_vconjunct_ctx_ptr; return Status::OK(); } @@ -353,7 +353,7 @@ Status VScanNode::_normalize_conjuncts() { if (new_root) { (*_vconjunct_ctx_ptr)->set_root(new_root); } else { - (*(_vconjunct_ctx_ptr.get()))->mark_as_stale(); + (*_vconjunct_ctx_ptr)->mark_as_stale(); _stale_vexpr_ctxs.push_back(std::move(_vconjunct_ctx_ptr)); _vconjunct_ctx_ptr.reset(nullptr); } @@ -405,10 +405,10 @@ VExpr* VScanNode::_normalize_predicate(VExpr* conjunct_expr_root) { auto impl = conjunct_expr_root->get_impl(); // If impl is not null, which means this a conjuncts from runtime filter. VExpr* cur_expr = impl ? const_cast<VExpr*>(impl) : conjunct_expr_root; - SlotDescriptor* slot; + SlotDescriptor* slot = nullptr; ColumnValueRangeType* range = nullptr; PushDownType pdt = PushDownType::UNACCEPTABLE; - _eval_const_conjuncts(cur_expr, *(_vconjunct_ctx_ptr.get()), &pdt); + _eval_const_conjuncts(cur_expr, *_vconjunct_ctx_ptr, &pdt); if (pdt == PushDownType::UNACCEPTABLE && (_is_predicate_acting_on_slot(cur_expr, in_predicate_checker, &slot, &range) || _is_predicate_acting_on_slot(cur_expr, eq_predicate_checker, &slot, &range))) { @@ -437,7 +437,8 @@ VExpr* VScanNode::_normalize_predicate(VExpr* conjunct_expr_root) { }, *range); } - if (pdt == PushDownType::ACCEPTABLE && _is_key_column(slot->col_name())) { + if (pdt == PushDownType::ACCEPTABLE && slot != nullptr && + _is_key_column(slot->col_name())) { return nullptr; } else { // for PARTIAL_ACCEPTABLE and UNACCEPTABLE, do not remove expr from the tree --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org