MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / dig

Function dig

src/compute-types/src/explain/text.rs:1149–1165  ·  view source on GitHub ↗
(humanizer: &dyn ExprHumanizer, plan: &Plan)

Source from the content-addressed store, hash-verified

1147/// `src/expr/src/explain/text.rs` for the MIR `EXPLAIN OPTIMIZED PLAN` output.
1148fn humanize_input_name(humanizer: &dyn ExprHumanizer, plan: &Plan, pos: usize) -> String {
1149 fn dig(humanizer: &dyn ExprHumanizer, plan: &Plan) -> Option<String> {
1150 use crate::plan::PlanNode::*;
1151 match &plan.node {
1152 Get { id, .. } => match id {
1153 Id::Local(lid) => Some(lid.to_string()),
1154 Id::Global(gid) => Some(
1155 humanizer
1156 .humanize_id_unqualified(*gid)
1157 .unwrap_or_else(|| gid.to_string()),
1158 ),
1159 },
1160 // Transparent wrappers: keep digging.
1161 ArrangeBy { input, .. } => dig(humanizer, input),
1162 Mfp { input, .. } => dig(humanizer, input),
1163 _ => None,
1164 }
1165 }
1166 match dig(humanizer, plan) {
1167 Some(name) => format!("%{pos}:{name}"),
1168 None => format!("%{pos}"),

Callers 1

humanize_input_nameFunction · 0.85

Calls 2

to_stringMethod · 0.45

Tested by

no test coverage detected