Gabriel39 commented on code in PR #15040: URL: https://github.com/apache/doris/pull/15040#discussion_r1050781731
########## be/src/vec/exec/scan/vscan_node.cpp: ########## @@ -84,13 +84,22 @@ Status VScanNode::prepare(RuntimeState* state) { Status VScanNode::open(RuntimeState* state) { SCOPED_CONSUME_MEM_TRACKER(mem_tracker_growh()); - _input_tuple_desc = state->desc_tbl().get_tuple_descriptor(_input_tuple_id); - _output_tuple_desc = state->desc_tbl().get_tuple_descriptor(_output_tuple_id); START_AND_SCOPE_SPAN(state->get_tracer(), span, "VScanNode::open"); SCOPED_TIMER(_runtime_profile->total_time_counter()); RETURN_IF_CANCELLED(state); - RETURN_IF_ERROR(ExecNode::open(state)); + return ExecNode::open(state); +} +Status VScanNode::alloc_resource(RuntimeState* state) { + if (_opened) { + return Status::OK(); + } + SCOPED_CONSUME_MEM_TRACKER(mem_tracker_growh()); + _input_tuple_desc = state->desc_tbl().get_tuple_descriptor(_input_tuple_id); + _output_tuple_desc = state->desc_tbl().get_tuple_descriptor(_output_tuple_id); + START_AND_SCOPE_SPAN(state->get_tracer(), span, "VScanNode::alloc_resource"); + SCOPED_TIMER(_runtime_profile->total_time_counter()); + RETURN_IF_ERROR(ExecNode::alloc_resource(state)); RETURN_IF_ERROR(_acquire_runtime_filter()); Review Comment: This argument is true by default. I think it will be false for some cases (maybe external table? ) -- 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