fix granule op_ordering bug

This commit is contained in:
sdc
2023-05-30 08:17:54 +00:00
committed by ob-robot
parent 073ca1f40e
commit b74570f68e
2 changed files with 23 additions and 0 deletions

View File

@ -865,6 +865,13 @@ int ObGranuleSplitter::get_query_range(ObExecContext &ctx,
LOG_WARN("failed to final extract index skip query range", K(ret));
} else {
has_extract_query_range = true;
/* Here is an improvement made:
1. By default, access to each partition is always in sequential ascending order.
Compared to not sorting, this is an enhancement that is not always 100% necessary
(some scenarios do not require order), but the logic is acceptable.
2. If reverse order is required outside, then the reverse sorting should be done outside on its own.
*/
std::sort(scan_ranges.begin(), scan_ranges.end(), ObNewRangeCmp());
}
}