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

Function transform

src/sql/src/plan/transform_ast.rs:31–42  ·  view source on GitHub ↗
(scx: &StatementContext, node: &mut N)

Source from the content-addressed store, hash-verified

29use crate::{ORDINALITY_COL_NAME, normalize};
30
31pub(crate) fn transform<N>(scx: &StatementContext, node: &mut N) -> Result<(), PlanError>
32where
33 N: for<'a> VisitMutNode<'a, Aug>,
34{
35 let mut func_rewriter = FuncRewriter::new(scx);
36 node.visit_mut(&mut func_rewriter);
37 func_rewriter.status?;
38
39 let mut desugarer = Desugarer::new(scx);
40 node.visit_mut(&mut desugarer);
41 desugarer.status
42}
43
44// Transforms various functions to forms that are more easily handled by the
45// planner.

Callers 15

useSqlTypedFunction · 0.85
sql_implFunction · 0.85
plan_root_queryFunction · 0.85
plan_insert_queryFunction · 0.85
plan_copy_itemFunction · 0.85
plan_copy_from_rowsFunction · 0.85
plan_delete_queryFunction · 0.85
plan_update_queryFunction · 0.85
plan_as_of_or_up_toFunction · 0.85
plan_secret_asFunction · 0.85

Calls 1

visit_mutMethod · 0.80

Tested by 1

test_string_literalsFunction · 0.68