Fix the correctness problem of vectorized merge distinct

This commit is contained in:
obdev 2024-02-02 20:51:55 +00:00 committed by ob-robot
parent 7b71e1bd5d
commit d2cceb736b

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())) {