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

Function op

src/sql/src/normalize.rs:91–105  ·  view source on GitHub ↗

Normalizes an operator reference. Qualified operators outside of the pg_catalog schema are rejected.

(op: &Op)

Source from the content-addressed store, hash-verified

89///
90/// Qualified operators outside of the pg_catalog schema are rejected.
91pub fn op(op: &Op) -> Result<&str, PlanError> {
92 if let Some(namespace) = &op.namespace {
93 if namespace.len() != 0
94 && (namespace.len() != 1
95 || namespace[0].as_str() != mz_repr::namespaces::PG_CATALOG_SCHEMA)
96 {
97 sql_bail!(
98 "operator does not exist: {}.{}",
99 namespace.iter().map(|n| n.to_string()).join("."),
100 op.op,
101 )
102 }
103 }
104 Ok(&op.op)
105}
106
107#[derive(Debug, Clone)]
108pub enum SqlValueOrSecret {

Callers 3

plan_expr_innerFunction · 0.85
checked_opMethod · 0.85

Calls 2

lenMethod · 0.45
as_strMethod · 0.45

Tested by

no test coverage detected