Resolves the operator to a set of function implementations.
(op: &str)
| 6123 | |
| 6124 | /// Resolves the operator to a set of function implementations. |
| 6125 | pub 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. |