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

Method new

src/expr/src/explain.rs:105–130  ·  view source on GitHub ↗
(
        id: GlobalId,
        op: Option<&'a MapFilterProject>,
        filter_pushdown: bool,
    )

Source from the content-addressed store, hash-verified

103
104impl<'a> ExplainSource<'a> {
105 pub fn new(
106 id: GlobalId,
107 op: Option<&'a MapFilterProject>,
108 filter_pushdown: bool,
109 ) -> ExplainSource<'a> {
110 let pushdown_info = if filter_pushdown {
111 op.map(|op| {
112 let mfp_mapped = MfpEval::new(&Trace, op.input_arity, &op.expressions);
113 let pushdown = op
114 .predicates
115 .iter()
116 .filter(|(_, e)| mfp_mapped.expr(e).pushdownable())
117 .map(|(_, e)| e)
118 .collect();
119 PushdownInfo { pushdown }
120 })
121 } else {
122 None
123 };
124
125 ExplainSource {
126 id,
127 op,
128 pushdown_info,
129 }
130 }
131
132 #[inline]
133 pub fn is_identity(&self) -> bool {

Callers

nothing calls this directly

Calls 6

pushdownableMethod · 0.80
mapMethod · 0.45
collectMethod · 0.45
filterMethod · 0.45
iterMethod · 0.45
exprMethod · 0.45

Tested by

no test coverage detected