Skip to main content

Module text

Module text 

Source
Expand description

EXPLAIN ... AS TEXT support for LIR structures.

The format adheres to the following conventions:

  1. In general, every line that starts with an uppercase character corresponds to a Plan variant.
  2. Whenever the variant has an attached ~Plan, the printed name is $V::$P where $V identifies the variant and $P the plan.
  3. The fields of a ~Plan struct attached to a Plan are rendered as if they were part of the variant themself.
  4. Non-recursive parameters of each sub-plan are written as $key=$val pairs on the same line or as lowercase $key fields on indented lines.
  5. A single non-recursive parameter can be written just as $val.

Structsยง

Arrangement ๐Ÿ”’
Helper struct for rendering an arrangement.
Permutation ๐Ÿ”’
Helper struct for rendering a permutation.
PlanAnnotations ๐Ÿ”’
Annotations for physical plans.

Functionsยง

fmt_join_chain ๐Ÿ”’
Format a join implementation chain like %0:t[#0{a}] ยป %1:u[#0{c}] ยป %2[ร—].
fmt_join_key_brackets ๐Ÿ”’
Render [k1, k2, โ€ฆ] for a non-empty join key, or [ร—] for a cross product.
humanize_input_name ๐Ÿ”’
Render a join input as %pos:name if we can dig a Get out of plan, otherwise just %pos. Mirrors dig_name_from_expr in src/expr/src/explain/text.rs for the MIR EXPLAIN OPTIMIZED PLAN output.