Skip to content

Commit

Permalink
fix watermark derivation
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangjinwu committed Oct 5, 2023
1 parent 5b4971f commit 4d728ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/frontend/src/expr/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -535,10 +535,10 @@ impl WatermarkAnalyzer {
ExprImpl::Literal(lit) => lit.get_data().as_ref().map(|s| s.as_utf8()),
_ => return WatermarkDerivation::None,
};
let interval = match &func_call.inputs()[1] {
ExprImpl::Literal(lit) => lit.get_data().as_ref().map(|s| s.as_interval()),
_ => return WatermarkDerivation::None,
let Some(Ok(interval)) = &func_call.inputs()[1].try_fold_const() else {
return WatermarkDerivation::None;
};
let interval = interval.as_ref().map(|s| s.as_interval());
// null zone or null interval is treated same as const `interval '1' second`, to be
// consistent with other match arms.
let zone_without_dst = time_zone.map_or(true, |s| s.eq_ignore_ascii_case("UTC"));
Expand Down

0 comments on commit 4d728ff

Please sign in to comment.