From abe8c3f701038b33d26271aa65db6e786454ba59 Mon Sep 17 00:00:00 2001 From: Anant Vindal Date: Wed, 21 Oct 2026 14:58:45 +0530 Subject: [PATCH] fix: manifest pruning `extract_primary_filter()` incorrectly prunes manifests based on time filters even if they are not on `P_TIMESTAMP` --- src/query/stream_schema_provider.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/query/stream_schema_provider.rs b/src/query/stream_schema_provider.rs index c6d673d68..afbba0a20 100644 --- a/src/query/stream_schema_provider.rs +++ b/src/query/stream_schema_provider.rs @@ -966,6 +966,12 @@ impl PartialTimeFilter { let Expr::BinaryExpr(binexpr) = expr else { return None; }; + + let is_p_timestamp = expr + .column_refs() + .iter() + .map(|c| &c.name) + .contains(&DEFAULT_TIMESTAMP_KEY.to_string()); let (op, time) = extract_timestamp_bound(binexpr, time_partition)?; let value = match op { Operator::Gt => PartialTimeFilter::Low(Bound::Excluded(time)), @@ -976,7 +982,7 @@ impl PartialTimeFilter { Operator::IsNotDistinctFrom => PartialTimeFilter::Eq(time), _ => return None, }; - Some(value) + if is_p_timestamp { Some(value) } else { None } } pub fn binary_expr(&self, left: Expr) -> Expr {