MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / next

Method next

src/expr/src/relation/func.rs:3061–3083  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

3059
3060 #[inline]
3061 fn next(&mut self) -> Option<CheckedTimestamp<T>> {
3062 if !self.done
3063 && ((self.rev && self.state >= self.stop) || (!self.rev && self.state <= self.stop))
3064 {
3065 let result = self.state.clone();
3066 match add_timestamp_months(self.state.deref(), self.step.months) {
3067 Ok(state) => match state.checked_add_signed(self.step.duration_as_chrono()) {
3068 Some(v) => match CheckedTimestamp::from_timestamplike(v) {
3069 Ok(v) => self.state = v,
3070 Err(_) => self.done = true,
3071 },
3072 None => self.done = true,
3073 },
3074 Err(..) => {
3075 self.done = true;
3076 }
3077 }
3078
3079 Some(result)
3080 } else {
3081 None
3082 }
3083 }
3084}
3085
3086fn generate_series_ts<T: TimestampLike>(

Callers 15

string_aggFunction · 0.45
dict_aggFunction · 0.45
rank_no_listFunction · 0.45
dense_rank_no_listFunction · 0.45
lag_lead_no_listFunction · 0.45
first_value_no_listFunction · 0.45
last_value_no_listFunction · 0.45
window_aggr_no_listFunction · 0.45

Calls 5

add_timestamp_monthsFunction · 0.85
checked_add_signedMethod · 0.80
duration_as_chronoMethod · 0.80
cloneMethod · 0.45
derefMethod · 0.45

Tested by

no test coverage detected