Skip to content

Commit 6daf9e1

Browse files
fix: query on stream with time partition (#886)
version v.0.9.0 - time partition was stored as Utf-8 in version 1.3.0 onwards - time partition is now stored as TimestampMillisecond. After migration, time partition gets converted from Utf-8 to TimestmapNanosecond fix is to match TimestampNanosecond to create the time filters for query
1 parent fef8f6d commit 6daf9e1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

server/src/query/stream_schema_provider.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,9 @@ fn extract_from_lit(expr: BinaryExpr, time_partition: Option<String>) -> Option<
718718
ScalarValue::TimestampMillisecond(Some(value), _) => {
719719
Some(DateTime::from_timestamp_millis(value).unwrap().naive_utc())
720720
}
721+
ScalarValue::TimestampNanosecond(Some(value), _) => {
722+
Some(DateTime::from_timestamp_nanos(value).naive_utc())
723+
}
721724
ScalarValue::Utf8(Some(str_value)) => {
722725
if time_partition.is_some() && column_name == time_partition.unwrap() {
723726
Some(str_value.parse::<NaiveDateTime>().unwrap())

0 commit comments

Comments
 (0)