[pipeline](regression) nested loop join test get error result in pipeline engine and refactor the code for need more input data (#15208)

This commit is contained in:
HappenLee
2022-12-21 19:03:51 +08:00
committed by GitHub
parent e65b577f90
commit 8ecf69b09b
10 changed files with 93 additions and 107 deletions

View File

@ -83,29 +83,20 @@ Status VTableFunctionNode::get_next(RuntimeState* state, Block* block, bool* eos
RETURN_IF_CANCELLED(state);
// if child_block is empty, get data from child.
if (need_more_input_data()) {
while (_child_block.rows() == 0 && !_child_eos) {
RETURN_IF_ERROR_AND_CHECK_SPAN(
child(0)->get_next_after_projects(
state, &_child_block, &_child_eos,
std::bind((Status(ExecNode::*)(RuntimeState*, vectorized::Block*,
bool*)) &
ExecNode::get_next,
_children[0], std::placeholders::_1, std::placeholders::_2,
std::placeholders::_3)),
child(0)->get_next_span(), _child_eos);
}
if (_child_eos && _child_block.rows() == 0) {
*eos = true;
return Status::OK();
}
while (need_more_input_data()) {
RETURN_IF_ERROR_AND_CHECK_SPAN(
child(0)->get_next_after_projects(
state, &_child_block, &_child_eos,
std::bind((Status(ExecNode::*)(RuntimeState*, vectorized::Block*, bool*)) &
ExecNode::get_next,
_children[0], std::placeholders::_1, std::placeholders::_2,
std::placeholders::_3)),
child(0)->get_next_span(), _child_eos);
push(state, &_child_block, *eos);
push(state, &_child_block, _child_eos);
}
pull(state, block, eos);
return Status::OK();
return pull(state, block, eos);
}
Status VTableFunctionNode::get_expanded_block(RuntimeState* state, Block* output_block, bool* eos) {
@ -204,6 +195,7 @@ Status VTableFunctionNode::get_expanded_block(RuntimeState* state, Block* output
RETURN_IF_ERROR(
VExprContext::filter_block(_vconjunct_ctx_ptr, output_block, output_block->columns()));
*eos = _child_eos && _cur_child_offset == -1;
return Status::OK();
}