[fix](Lateral-View) fix outer combinator not work on non-vectorized (#9212)

This commit is contained in:
Pxl
2022-05-01 22:09:50 +08:00
committed by GitHub
parent 5074018f0c
commit d2374dbd5e
8 changed files with 78 additions and 57 deletions

View File

@ -92,16 +92,6 @@ Status VTableFunctionNode::get_next(RuntimeState* state, Block* block, bool* eos
return Status::OK();
}
bool VTableFunctionNode::_is_inner_and_empty() {
for (int i = 0; i < _fn_num; i++) {
// if any table function is not outer and has empty result, go to next child row
if (!_fns[i]->is_outer() && _fns[i]->current_empty()) {
return true;
}
}
return false;
}
Status VTableFunctionNode::get_expanded_block(RuntimeState* state, Block* output_block, bool* eos) {
DCHECK(_child_block != nullptr);
@ -156,7 +146,7 @@ Status VTableFunctionNode::get_expanded_block(RuntimeState* state, Block* output
}
// if any table function is not outer and has empty result, go to next child row
if ((skip_child_row = _is_inner_and_empty()) == true) {
if (skip_child_row = _is_inner_and_empty(); skip_child_row) {
continue;
}
@ -225,7 +215,7 @@ Status VTableFunctionNode::_process_next_child_row() {
RETURN_IF_ERROR(fn->process_close());
}
release_block_memory(*_child_block.get());
release_block_memory(*_child_block);
_cur_child_offset = -1;
return Status::OK();
}