(
&'a mut self,
context: &'a ExplainContext<'a>,
)
| 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 | } |
no test coverage detected