Skip to main content

try_plan_array_table_fn

Function try_plan_array_table_fn 

Source
pub fn try_plan_array_table_fn(
    from: &[TableWithJoins],
    catalog: &dyn SqlCatalog,
    temporal: TemporalScope,
) -> Result<Option<SqlPlan>>
Expand description

Try to intercept a SELECT * FROM array_xxx(...) table-valued function call. Returns Ok(Some(plan)) on a match, Ok(None) if the FROM is not an array function (caller falls through to normal catalog resolution).

temporal carries any AS OF SYSTEM TIME / AS OF VALID TIME qualifiers extracted by the pre-processor. It is propagated verbatim into SqlPlan::ArraySlice and SqlPlan::ArrayAgg so the planner-to-physical conversion can populate the corresponding ArrayOp fields. When neither clause was present, temporal is TemporalScope::default(), which maps to the live-state fast path in the Data Plane handler.