From b8ac19c480f9103fadb1b2923ccdf583e962406a Mon Sep 17 00:00:00 2001 From: Ruihang Xia Date: Tue, 5 Nov 2024 14:57:44 +0800 Subject: [PATCH] log on wrong range index Signed-off-by: Ruihang Xia --- src/query/src/part_sort.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/query/src/part_sort.rs b/src/query/src/part_sort.rs index e01f49f222..03005edb13 100644 --- a/src/query/src/part_sort.rs +++ b/src/query/src/part_sort.rs @@ -479,6 +479,14 @@ impl PartSortStream { // step to next proper PartitionRange loop { self.cur_part_idx += 1; + if self.cur_part_idx >= self.partition_ranges.len() { + common_telemetry::info!( + "[PartSortStream] Partition {} is finished its range with remaining {} rows", + self.partition, + next_sort_column.len() + ); + break; + } if next_sort_column.is_empty() || self.try_find_next_range(&next_sort_column)?.is_none() {