Module mz_repr::explain

source ·
Expand description

A set of traits for modeling things that can be explained by a SQL EXPLAIN statement.

The main trait in this module is Explain.

An explainable subject S implements Explain, and as part of that:

  1. Fixes the context type required for the explanation. in Explain::Context.
  2. Fixes the explanation type for each ExplainFormat in Explain::Text, Explain::Json, ….
  3. Provides an explanation type constructor for each supported ExplainFormat from references to S, ExplainConfig , and the current Explain::Context in Explain::explain_text, Explain::explain_json, ….

The same explanation type can be shared by more than one ExplainFormat.

Use UnsupportedFormat and the default explain_$format constructor for Explain to indicate that the implementation does not support this $format.

Re-exports

Modules

  • Structs and traits for EXPLAIN AS DOT.
  • Structs and traits for EXPLAIN AS JSON.
  • Structs and traits for EXPLAIN AS TEXT.
  • Tracing utilities for explainable plans.

Structs

Enums

Constants

Traits

  • A trait that provides a unified interface for objects that can be explained.
  • A trait for humanizing components of an expression.