Plans an expression in the AS OF position of a `SELECT` or `SUBSCRIBE`, or `CREATE MATERIALIZED VIEW` statement.
(
scx: &StatementContext,
as_of: Option<AsOf<Aug>>,
)
| 1002 | /// Plans an expression in the AS OF position of a `SELECT` or `SUBSCRIBE`, or `CREATE MATERIALIZED |
| 1003 | /// VIEW` statement. |
| 1004 | pub fn plan_as_of( |
| 1005 | scx: &StatementContext, |
| 1006 | as_of: Option<AsOf<Aug>>, |
| 1007 | ) -> Result<QueryWhen, PlanError> { |
| 1008 | match as_of { |
| 1009 | None => Ok(QueryWhen::Immediately), |
| 1010 | Some(as_of) => match as_of { |
| 1011 | AsOf::At(expr) => Ok(QueryWhen::AtTimestamp(plan_as_of_or_up_to(scx, expr)?)), |
| 1012 | AsOf::AtLeast(expr) => Ok(QueryWhen::AtLeastTimestamp(plan_as_of_or_up_to(scx, expr)?)), |
| 1013 | }, |
| 1014 | } |
| 1015 | } |
| 1016 | |
| 1017 | /// Plans and evaluates a scalar expression in a OneShot context to a non-null MzTimestamp. |
| 1018 | /// |
no test coverage detected