MCPcopy Create free account
hub / github.com/apache/datafusion / explain_option_format

Method explain_option_format

datafusion/expr/src/logical_plan/builder.rs:1323–1346  ·  view source on GitHub ↗

Create an expression to represent the explanation of the plan The`explain_option` is used to specify the format and verbosity of the explanation. Details see [`ExplainOption`].

(self, explain_option: ExplainOption)

Source from the content-addressed store, hash-verified

1321 /// The`explain_option` is used to specify the format and verbosity of the explanation.
1322 /// Details see [`ExplainOption`].
1323 pub fn explain_option_format(self, explain_option: ExplainOption) -> Result<Self> {
1324 let schema = LogicalPlan::explain_schema();
1325 let schema = schema.to_dfschema_ref()?;
1326
1327 if explain_option.analyze {
1328 Ok(Self::new(LogicalPlan::Analyze(Analyze {
1329 verbose: explain_option.verbose,
1330 input: self.plan,
1331 schema,
1332 })))
1333 } else {
1334 let stringified_plans =
1335 vec![self.plan.to_stringified(PlanType::InitialLogicalPlan)];
1336
1337 Ok(Self::new(LogicalPlan::Explain(Explain {
1338 verbose: explain_option.verbose,
1339 plan: self.plan,
1340 explain_format: explain_option.format,
1341 stringified_plans,
1342 schema,
1343 logical_optimization_succeeded: false,
1344 })))
1345 }
1346 }
1347
1348 /// Process intersect set operator
1349 pub fn intersect(

Callers 3

explainMethod · 0.80
try_into_logical_planMethod · 0.80
explain_with_optionsMethod · 0.80

Calls 4

newFunction · 0.85
AnalyzeClass · 0.85
ExplainClass · 0.85
to_dfschema_refMethod · 0.80

Tested by

no test coverage detected