Fix the correctness problem of vectorized merge distinct

This commit is contained in:
obdev
2024-02-10 06:05:27 +00:00
committed by ob-robot
parent 5f3343864a
commit beddfda75e

View File

@ -1617,7 +1617,8 @@ int ObAggregateProcessor::process_distinct_batch(
LOG_WARN("distinct set is NULL", K(ret));
} else {
// In non-rollup group_id must be 0
if (group_id > 0) {
if (group_id > 0 && group_id > start_partial_rollup_idx_ &&
group_id <= end_partial_rollup_idx_) {
// Group id greater than zero in sort based group by must be rollup,
// distinct set is sorted and iterated in rollup_process(), rewind here.
if (OB_FAIL(extra_info->unique_sort_op_->rewind())) {