Function mz_sql::func::select_impl

source ·
pub fn select_impl<R>(
    ecx: &ExprContext<'_>,
    spec: FuncSpec<'_>,
    impls: &[FuncImpl<R>],
    args: Vec<CoercibleScalarExpr>,
    order_by: Vec<ColumnOrder>,
) -> Result<R, PlanError>
where R: Debug,
Expand description

Selects the best implementation given the provided args using a process similar to PostgreSQL’s parser, and returns the ScalarExpr to invoke that function.

Inline comments prefixed with number are taken from the “Function Type Resolution” section of the aforelinked page.

§Errors

  • When the provided arguments are not valid for any implementation, e.g. cannot be converted to the appropriate types.
  • When all implementations are equally valid.