Skip to content

Commit af11d36

Browse files
authored
fix: manifest pruning (#1828)
`extract_primary_filter()` incorrectly prunes manifests based on time filters even if they are not on `P_TIMESTAMP`
1 parent 44bd8db commit af11d36

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎src/query/stream_schema_provider.rs‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -966,6 +966,12 @@ impl PartialTimeFilter {
966966
let Expr::BinaryExpr(binexpr) = expr else {
967967
return None;
968968
};
969+
970+
let is_p_timestamp = expr
971+
.column_refs()
972+
.iter()
973+
.map(|c| &c.name)
974+
.contains(&DEFAULT_TIMESTAMP_KEY.to_string());
969975
let (op, time) = extract_timestamp_bound(binexpr, time_partition)?;
970976
let value = match op {
971977
Operator::Gt => PartialTimeFilter::Low(Bound::Excluded(time)),
@@ -976,7 +982,7 @@ impl PartialTimeFilter {
976982
Operator::IsNotDistinctFrom => PartialTimeFilter::Eq(time),
977983
_ => return None,
978984
};
979-
Some(value)
985+
if is_p_timestamp { Some(value) } else { None }
980986
}
981987

982988
pub fn binary_expr(&self, left: Expr) -> Expr {

0 commit comments

Comments
 (0)