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

Function parse_get

src/expr-parser/src/parser.rs:174–190  ·  view source on GitHub ↗
(ctx: CtxRef, input: ParseStream)

Source from the content-addressed store, hash-verified

172 }
173
174 fn parse_get(ctx: CtxRef, input: ParseStream) -> Result {
175 input.parse::<kw::Get>()?;
176
177 let ident = input.parse::<syn::Ident>()?;
178 match ctx.catalog.get(&ident.to_string()) {
179 Some((id, _cols, typ)) => Ok(MirRelationExpr::Get {
180 id: Id::Global(*id),
181 typ: ReprRelationType::from(typ),
182 access_strategy: AccessStrategy::UnknownOrLocal,
183 }),
184 None => Ok(MirRelationExpr::Get {
185 id: Id::Local(parse_local_id(ident)?),
186 typ: ReprRelationType::empty(),
187 access_strategy: AccessStrategy::UnknownOrLocal,
188 }),
189 }
190 }
191
192 /// Parses a Let or a LetRec with the old order: Return first, and then CTEs in descending order.
193 fn parse_let_or_letrec_old(ctx: CtxRef, input: ParseStream) -> Result {

Callers 1

parse_exprFunction · 0.85

Calls 3

parse_local_idFunction · 0.85
getMethod · 0.45
to_stringMethod · 0.45

Tested by

no test coverage detected