1// Copyright Materialize, Inc. and contributors. All rights reserved.
2//
3// Use of this software is governed by the Business Source License
4// included in the LICENSE file.
5//
6// As of the Change Date specified in that file, in accordance with
7// the Business Source License, use of this software will be governed
8// by the Apache License, Version 2.0.
910//! `EXPLAIN` support for LIR structures.
1112use mz_compute_types::dataflows::DataflowDescription;
13use mz_compute_types::plan::Plan;
14use mz_repr::explain::{Explain, ExplainError};
1516use crate::explain::Explainable;
1718impl<'a> Explain<'a> for Explainable<'a, DataflowDescription<Plan>> {
19type Context = <DataflowDescription<Plan> as Explain<'a>>::Context;
2021type Text = <DataflowDescription<Plan> as Explain<'a>>::Text;
2223type VerboseText = <DataflowDescription<Plan> as Explain<'a>>::VerboseText;
2425type Json = <DataflowDescription<Plan> as Explain<'a>>::Json;
2627type Dot = <DataflowDescription<Plan> as Explain<'a>>::Dot;
2829fn explain_text(&'a mut self, context: &'a Self::Context) -> Result<Self::Text, ExplainError> {
30self.0.explain_text(context)
31 }
3233fn explain_verbose_text(
34&'a mut self,
35 context: &'a Self::Context,
36 ) -> Result<Self::VerboseText, ExplainError> {
37self.0.explain_verbose_text(context)
38 }
3940fn explain_json(&'a mut self, context: &'a Self::Context) -> Result<Self::Json, ExplainError> {
41self.0.explain_json(context)
42 }
4344fn explain_dot(&'a mut self, context: &'a Self::Context) -> Result<Self::Dot, ExplainError> {
45self.0.explain_dot(context)
46 }
47}