This is an automated email from the ASF dual-hosted git repository. morningman 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 893567628e [fix](exec-node) fix nullptr of runtime state (#12395) 893567628e is described below commit 893567628e93303686f58f201c1b70f1d080a021 Author: Mingyu Chen <morningman....@gmail.com> AuthorDate: Wed Sep 7 08:46:42 2022 +0800 [fix](exec-node) fix nullptr of runtime state (#12395) Remove default nullptr runtime state, which is very error-prone --- be/src/exec/es_http_scan_node.cpp | 2 +- be/src/exec/exec_node.h | 2 +- be/src/vec/exec/ves_http_scan_node.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/be/src/exec/es_http_scan_node.cpp b/be/src/exec/es_http_scan_node.cpp index 680f18c75f..28205290cc 100644 --- a/be/src/exec/es_http_scan_node.cpp +++ b/be/src/exec/es_http_scan_node.cpp @@ -48,7 +48,7 @@ EsHttpScanNode::EsHttpScanNode(ObjectPool* pool, const TPlanNode& tnode, const D EsHttpScanNode::~EsHttpScanNode() {} Status EsHttpScanNode::init(const TPlanNode& tnode, RuntimeState* state) { - RETURN_IF_ERROR(ScanNode::init(tnode)); + RETURN_IF_ERROR(ScanNode::init(tnode, state)); // use TEsScanNode _properties = tnode.es_scan_node.properties; diff --git a/be/src/exec/exec_node.h b/be/src/exec/exec_node.h index c9f4323dca..20e0785d94 100644 --- a/be/src/exec/exec_node.h +++ b/be/src/exec/exec_node.h @@ -73,7 +73,7 @@ public: /// Initializes this object from the thrift tnode desc. The subclass should /// do any initialization that can fail in Init() rather than the ctor. /// If overridden in subclass, must first call superclass's Init(). - virtual Status init(const TPlanNode& tnode, RuntimeState* state = nullptr); + virtual Status init(const TPlanNode& tnode, RuntimeState* state); // Sets up internal structures, etc., without doing any actual work. // Must be called prior to open(). Will only be called once in this diff --git a/be/src/vec/exec/ves_http_scan_node.cpp b/be/src/vec/exec/ves_http_scan_node.cpp index 94b2c548c5..9f308acc6b 100644 --- a/be/src/vec/exec/ves_http_scan_node.cpp +++ b/be/src/vec/exec/ves_http_scan_node.cpp @@ -42,7 +42,7 @@ VEsHttpScanNode::VEsHttpScanNode(ObjectPool* pool, const TPlanNode& tnode, _wait_scanner_timer(nullptr) {} Status VEsHttpScanNode::init(const TPlanNode& tnode, RuntimeState* state) { - RETURN_IF_ERROR(ScanNode::init(tnode)); + RETURN_IF_ERROR(ScanNode::init(tnode, state)); // use TEsScanNode _properties = tnode.es_scan_node.properties; @@ -444,4 +444,4 @@ void VEsHttpScanNode::scanner_worker(int start_idx, int length, std::promise<Sta p_status.set_value(status); } -} // namespace doris::vectorized \ No newline at end of file +} // namespace doris::vectorized --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org