Struct mz_expr::explain::ViewExplanation
source · pub struct ViewExplanation<'a> {
expr_humanizer: &'a dyn ExprHumanizer,
nodes: Vec<ExplanationNode<'a>>,
expr_chains: BTreeMap<*const MirRelationExpr, usize>,
local_id_chains: BTreeMap<LocalId, usize>,
chain_local_ids: BTreeMap<usize, LocalId>,
chain: usize,
}
explain_new
instead.Expand description
An ViewExplanation
facilitates pretty-printing of a MirRelationExpr
.
By default, the fmt::Display
implementation renders the expression as
described in the module docs. Additional information may be attached to the
explanation via the other public methods on the type.
Fields§
§expr_humanizer: &'a dyn ExprHumanizer
explain_new
instead.nodes: Vec<ExplanationNode<'a>>
explain_new
instead.One ExplanationNode
for each MirRelationExpr
in the plan, in
left-to-right post-order.
expr_chains: BTreeMap<*const MirRelationExpr, usize>
explain_new
instead.Records the chain ID that was assigned to each expression.
local_id_chains: BTreeMap<LocalId, usize>
explain_new
instead.Records the chain ID that was assigned to each let.
chain_local_ids: BTreeMap<usize, LocalId>
explain_new
instead.Records the local ID that corresponds to a chain ID, if any.
chain: usize
explain_new
instead.The ID of the current chain. Incremented while constructing the
Explanation
.
Implementations§
source§impl<'a> ViewExplanation<'a>
impl<'a> ViewExplanation<'a>
pub fn new(
expr: &'a MirRelationExpr,
expr_humanizer: &'a dyn ExprHumanizer
) -> ViewExplanation<'a>
explain_new
instead.sourcepub fn explain_types(&mut self)
👎Deprecated: Use explain_new
instead.
pub fn explain_types(&mut self)
explain_new
instead.Attach type information into the explanation.
fn fmt_node(&self, f: &mut Formatter<'_>, node: &ExplanationNode<'_>) -> Result
explain_new
instead.fn fmt_join_implementation(
&self,
f: &mut Formatter<'_>,
join_inputs: &[MirRelationExpr],
implementation: &JoinImplementation
) -> Result
explain_new
instead.sourcefn expr_chain(&self, expr: &MirRelationExpr) -> usize
👎Deprecated: Use explain_new
instead.
fn expr_chain(&self, expr: &MirRelationExpr) -> usize
explain_new
instead.Retrieves the chain ID for the specified expression.
The ExplanationNode
for expr
must have already been inserted into
the explanation.
Trait Implementations§
source§impl<'a> Debug for ViewExplanation<'a>
impl<'a> Debug for ViewExplanation<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ViewExplanation<'a>
impl<'a> !Send for ViewExplanation<'a>
impl<'a> !Sync for ViewExplanation<'a>
impl<'a> Unpin for ViewExplanation<'a>
impl<'a> !UnwindSafe for ViewExplanation<'a>
Blanket Implementations§
source§impl<T> DisplayExt for Twhere
T: Display,
impl<T> DisplayExt for Twhere
T: Display,
source§fn to_string_alt(&self) -> String
fn to_string_alt(&self) -> String
{:#}
) and returns it.source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
source§impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
source§fn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
RustType::from_proto
.source§fn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
RustType::into_proto
.