pub fn find_time_window_lower_bound(
expr: &ScalarExpr,
ts_col_idx: usize,
current: Timestamp,
) -> Result<Option<Timestamp>>
Expand description
Find the lower bound of time window in given expr
and current
timestamp.
i.e. for current="2021-07-01 00:01:01.000"
and expr=date_bin(INTERVAL '5 minutes', ts) as time_window
and ts_col=ts
,
return Some("2021-07-01 00:00:00.000")
since it’s the lower bound
of current time window given the current timestamp
if return None, meaning this time window have no lower bound