MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / resolve_op

Function resolve_op

src/sql/src/func.rs:6125–6140  ·  view source on GitHub ↗

Resolves the operator to a set of function implementations.

(op: &str)

Source from the content-addressed store, hash-verified

6123
6124/// Resolves the operator to a set of function implementations.
6125pub fn resolve_op(op: &str) -> Result<&'static [FuncImpl<HirScalarExpr>], PlanError> {
6126 match OP_IMPLS.get(op) {
6127 Some(Func::Scalar(impls)) => Ok(impls),
6128 Some(_) => unreachable!("all operators must be scalar functions"),
6129 // TODO: these require sql arrays
6130 // JsonContainsAnyFields
6131 // JsonContainsAllFields
6132 // TODO: these require json paths
6133 // JsonGetPath
6134 // JsonGetPathAsText
6135 // JsonDeletePath
6136 // JsonContainsPath
6137 // JsonApplyPathPredicate
6138 None => bail_unsupported!(format!("[{}]", op)),
6139 }
6140}
6141
6142// Since ViewableVariables is unmaterializeable (which can't be eval'd) that
6143// depend on their arguments, implement directly with Hir.

Callers 1

plan_opFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected