query::range_select::plan_rewrite

Function parse_duration_expr

source
fn parse_duration_expr(args: &[Expr], i: usize) -> Result<Duration>
Expand description

Parse a duraion expr:

  1. duration string (e.g. '1h')
  2. Interval expr (e.g. INTERVAL '1 year 3 hours 20 minutes')
  3. An interval expr can be evaluated at the logical plan stage (e.g. INTERVAL '2' day - INTERVAL '1' day)