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 HIR structures.
1112use mz_repr::explain::{Explain, ExplainError};
13use mz_sql::plan::HirRelationExpr;
1415use crate::explain::Explainable;
1617impl<'a> Explain<'a> for Explainable<'a, HirRelationExpr> {
18type Context = <HirRelationExpr as Explain<'a>>::Context;
1920type Text = <HirRelationExpr as Explain<'a>>::Text;
2122type VerboseText = <HirRelationExpr as Explain<'a>>::VerboseText;
2324type Json = <HirRelationExpr as Explain<'a>>::Json;
2526type Dot = <HirRelationExpr as Explain<'a>>::Dot;
2728fn explain_text(&'a mut self, context: &'a Self::Context) -> Result<Self::Text, ExplainError> {
29self.0.explain_text(context)
30 }
3132fn explain_verbose_text(
33&'a mut self,
34 context: &'a Self::Context,
35 ) -> Result<Self::VerboseText, ExplainError> {
36self.0.explain_verbose_text(context)
37 }
3839fn explain_json(&'a mut self, context: &'a Self::Context) -> Result<Self::Json, ExplainError> {
40self.0.explain_json(context)
41 }
4243fn explain_dot(&'a mut self, context: &'a Self::Context) -> Result<Self::Dot, ExplainError> {
44self.0.explain_dot(context)
45 }
46}