[enhancement](RowDescriptor) enhance tuple_idx check during runtime (#11835)

This commit is contained in:
AlexYue
2022-08-17 17:50:48 +08:00
committed by GitHub
parent 4a4d3b273d
commit 50ef6e35be
8 changed files with 33 additions and 7 deletions

View File

@ -286,8 +286,9 @@ Status TableFunctionNode::get_next(RuntimeState* state, RowBatch* row_batch, boo
TupleDescriptor* child_tuple_desc = child_rowdesc.tuple_descriptors()[tuple_idx];
TupleDescriptor* parent_tuple_desc = parent_rowdesc.tuple_descriptors()[tuple_idx];
Tuple* child_tuple = _cur_child_tuple_row->get_tuple(
child_rowdesc.get_tuple_idx(child_tuple_desc->id()));
auto tuple_idx = child_rowdesc.get_tuple_idx(child_tuple_desc->id());
RETURN_IF_INVALID_TUPLE_IDX(child_tuple_desc->id(), tuple_idx);
Tuple* child_tuple = _cur_child_tuple_row->get_tuple(tuple_idx);
// The child tuple is nullptr, only when the child tuple is from outer join. so we directly set
// parent_tuple have same tuple_idx nullptr to mock the behavior