[bugfix](core) child block is shared between operator and node, it should be shared ptr (#28106)
_child_block in nest loop join , table value function, repeat node will be shared between ExecNode and related operator, but it should not be a unique ptr in operator, it belongs to exec node. It will double free the block, if operator's close method is not called correctly. It should be a shared ptr, then it will not core even if the opeartor's close method is not called.
This commit is contained in:
@ -33,12 +33,11 @@ OPERATOR_CODE_GENERATOR(TableFunctionOperator, StatefulOperator)
|
||||
|
||||
Status TableFunctionOperator::prepare(doris::RuntimeState* state) {
|
||||
// just for speed up, the way is dangerous
|
||||
_child_block.reset(_node->get_child_block());
|
||||
_child_block = _node->get_child_block();
|
||||
return StatefulOperator::prepare(state);
|
||||
}
|
||||
|
||||
Status TableFunctionOperator::close(doris::RuntimeState* state) {
|
||||
_child_block.release();
|
||||
return StatefulOperator::close(state);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user