From f59e28006ac3a3b311a5a59012963084a46de1ec Mon Sep 17 00:00:00 2001 From: evenyag Date: Tue, 5 Nov 2024 15:24:07 +0800 Subject: [PATCH] feat: assert precision --- src/query/src/part_sort.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/query/src/part_sort.rs b/src/query/src/part_sort.rs index 03005edb13..729bb6e3bb 100644 --- a/src/query/src/part_sort.rs +++ b/src/query/src/part_sort.rs @@ -341,6 +341,17 @@ impl PartSortStream { )?, ); + match sort_column.data_type() { + arrow_schema::DataType::Timestamp(unit, _) => { + assert_eq!(cur_range.start.unit().as_arrow_time_unit(), *unit); + assert_eq!(cur_range.end.unit().as_arrow_time_unit(), *unit); + } + _ => panic!( + "Unsupported data type for sort column: {:?}", + sort_column.data_type() + ), + } + for (idx, val) in sort_column_iter { // ignore vacant time index data if let Some(val) = val {