Fix check datum modified error

This commit is contained in:
obdev
2023-05-09 06:42:07 +00:00
committed by ob-robot
parent 582f206439
commit b7792b75fe

View File

@ -782,10 +782,7 @@ int ObMergeGroupByOp::get_child_next_batch_row(
K(const_cast<ObBatchRows *>(batch_rows)->size_)); K(const_cast<ObBatchRows *>(batch_rows)->size_));
} }
} else { } else {
if (aggr_processor_.get_need_advance_collect() && if (OB_FAIL(child_->get_next_batch(max_row_cnt, batch_rows))) {
brs_holder_.is_saved() && OB_FAIL(brs_holder_.restore())) {
LOG_WARN("failed to restore child exprs", K(ret));
} else if (OB_FAIL(child_->get_next_batch(max_row_cnt, batch_rows))) {
LOG_WARN("failed to get child row", K(ret)); LOG_WARN("failed to get child row", K(ret));
} else if (aggr_processor_.get_need_advance_collect() && } else if (aggr_processor_.get_need_advance_collect() &&
OB_FAIL(brs_holder_.save(MY_SPEC.max_batch_size_))) { OB_FAIL(brs_holder_.save(MY_SPEC.max_batch_size_))) {
@ -896,6 +893,8 @@ int ObMergeGroupByOp::advance_collect_result(int64_t group_id)
clear_evaluated_flag(); clear_evaluated_flag();
if (OB_FAIL(aggr_processor_.advance_collect_result(group_id))) { if (OB_FAIL(aggr_processor_.advance_collect_result(group_id))) {
LOG_WARN("failed to calc and material distinct result", K(ret), K(group_id)); LOG_WARN("failed to calc and material distinct result", K(ret), K(group_id));
} else if (OB_FAIL(brs_holder_.restore())) {
LOG_WARN("failed to restore child exprs", K(ret));
} }
return ret; return ret;
} }
@ -947,7 +946,13 @@ int ObMergeGroupByOp::inner_get_next_batch(const int64_t max_row_cnt)
LOG_WARN("failed to process_batch_result", K(ret)); LOG_WARN("failed to process_batch_result", K(ret));
} else if (stop_batch_iterating(*child_brs, output_batch_cnt)) { } else if (stop_batch_iterating(*child_brs, output_batch_cnt)) {
// backup child exprs for this round // backup child exprs for this round
// for the vectorized merge distinct scenario, the result will be calculated and materialized
// in advance. therefore, when a backup is performed after a batch processing is completed
// the output expression of the child has been refilled. so, it is necessary to perform backup
// after get next batch from the child operator, and there is no need to backup again.
if (!aggr_processor_.get_need_advance_collect()) {
OZ(brs_holder_.save(std::min(MY_SPEC.max_batch_size_, get_output_queue_cnt()))); OZ(brs_holder_.save(std::min(MY_SPEC.max_batch_size_, get_output_queue_cnt())));
}
LOG_DEBUG("break out of iteratation", K(child_brs->end_), LOG_DEBUG("break out of iteratation", K(child_brs->end_),
K(output_batch_cnt), K(output_queue_cnt_)); K(output_batch_cnt), K(output_queue_cnt_));
break; break;