fix: time window filter expr use OR

This commit is contained in:
discord9
2025-03-27 15:38:35 +08:00
parent ff0828230e
commit 1540d9b815

View File

@@ -405,11 +405,8 @@ impl RecordingRuleTask {
.expect("Time went backwards");
let low_bound = self
.expire_after
.map(|e| since_the_epoch.as_secs() - e as u64);
let Some(low_bound) = low_bound else {
return Ok(Some(self.query.clone()));
};
.map(|e| since_the_epoch.as_secs() - e as u64)
.unwrap_or(u64::MIN);
let low_bound = Timestamp::new_second(low_bound as i64);
@@ -598,7 +595,7 @@ impl DirtyTimeWindows {
};
expr_lst.push(expr);
}
let expr = expr_lst.into_iter().reduce(|a, b| a.and(b));
let expr = expr_lst.into_iter().reduce(|a, b| a.or(b));
Ok(expr)
}