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

Method as_explain_single_plan

src/transform/tests/test_runner.rs:631–652  ·  view source on GitHub ↗
(
            &'a mut self,
            context: &'a ExplainContext<'a>,
        )

Source from the content-addressed store, hash-verified

629
630 impl<'a> Explainable<'a, MirRelationExpr> {
631 fn as_explain_single_plan(
632 &'a mut self,
633 context: &'a ExplainContext<'a>,
634 ) -> Result<ExplainSinglePlan<'a, MirRelationExpr>, ExplainError> {
635 // normalize the representation as linear chains
636 // (this implies !context.config.raw_plans by construction)
637 if context.config.linear_chains {
638 enforce_linear_chains(self.0)?;
639 };
640 // unless raw plans are explicitly requested
641 // normalize the representation of nested Let bindings
642 // and enforce sequential Let binding IDs
643 if !context.config.raw_plans {
644 normalize_lets(self.0, context.features)
645 .map_err(|e| ExplainError::UnknownError(e.to_string()))?;
646 }
647
648 Ok(ExplainSinglePlan {
649 context,
650 plan: annotate_plan(self.0, context)?,
651 })
652 }
653 }
654}

Callers 1

explain_textMethod · 0.45

Calls 4

enforce_linear_chainsFunction · 0.85
normalize_letsFunction · 0.85
annotate_planFunction · 0.85
to_stringMethod · 0.45

Tested by

no test coverage detected