Expand description
Planner for ARRAY_* table-valued / scalar functions.
The functions live in two AST shapes:
- Read (
ARRAY_SLICE,ARRAY_PROJECT,ARRAY_AGG,ARRAY_ELEMENTWISE) —SELECT * FROM array_xxx(...). Parsed by sqlparser asTableFactor::Table { name, args: Some(_), .. }(Postgres-style table-valued function).try_plan_array_table_fnintercepts these before catalog resolution. - Maintenance (
ARRAY_FLUSH,ARRAY_COMPACT) — bareSELECT array_flush(name)with no FROM clause.try_plan_array_maint_fnintercepts these from the constant- query path.
Functions§
- try_
plan_ array_ maint_ fn - Try to intercept a no-FROM
SELECT array_flush(name)/SELECT array_compact(name). The single projection item must be a bare function call carrying one string-literal argument. - try_
plan_ array_ table_ fn - Try to intercept a
SELECT * FROM array_xxx(...)table-valued function call. ReturnsOk(Some(plan))on a match,Ok(None)if the FROM is not an array function (caller falls through to normal catalog resolution).