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

Function describe_explain_pushdown

src/sql/src/plan/statement/dml.rs:341–359  ·  view source on GitHub ↗
(
    scx: &StatementContext,
    statement: ExplainPushdownStatement<Aug>,
)

Source from the content-addressed store, hash-verified

339}
340
341pub fn describe_explain_pushdown(
342 scx: &StatementContext,
343 statement: ExplainPushdownStatement<Aug>,
344) -> Result<StatementDesc, PlanError> {
345 let relation_desc = RelationDesc::builder()
346 .with_column("Source", SqlScalarType::String.nullable(false))
347 .with_column("Total Bytes", SqlScalarType::UInt64.nullable(false))
348 .with_column("Selected Bytes", SqlScalarType::UInt64.nullable(false))
349 .with_column("Total Parts", SqlScalarType::UInt64.nullable(false))
350 .with_column("Selected Parts", SqlScalarType::UInt64.nullable(false))
351 .finish();
352
353 Ok(
354 StatementDesc::new(Some(relation_desc)).with_params(match statement.explainee {
355 Explainee::Select(select, _) => describe_select(scx, *select)?.param_types,
356 _ => vec![],
357 }),
358 )
359}
360
361pub fn describe_explain_analyze_object(
362 _scx: &StatementContext,

Callers 1

describeFunction · 0.85

Calls 5

describe_selectFunction · 0.85
with_columnMethod · 0.80
with_paramsMethod · 0.80
finishMethod · 0.45
nullableMethod · 0.45

Tested by

no test coverage detected