fix merge union get wrong result when batch_size decrease

This commit is contained in:
18523270951@163.com 2023-05-09 18:10:22 +00:00 committed by ob-robot
parent 0ac5e967aa
commit d98f89683d

View File

@ -637,7 +637,7 @@ int ObMergeUnionOp::do_strict_distinct_vectorize(ObOperator &child_op,
int ret = OB_SUCCESS;
found_valid_row = false;
//if compare_row is nullptr, means we do row compare in a batch, get values from expr
if (OB_NOT_NULL(op_info.op_brs_) && OB_SUCC(ret) && op_info.op_idx_ < batch_size) {
if (OB_NOT_NULL(op_info.op_brs_) && OB_SUCC(ret) && op_info.op_idx_ < op_info.op_brs_->size_) {
for (int64_t i = op_info.op_idx_; OB_SUCC(ret)
&& !found_valid_row
&& i < op_info.op_brs_->size_; ++i, ++op_info.op_idx_) {