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

Method describe_query_to_plan

datafusion/sql/src/statement.rs:1653–1664  ·  view source on GitHub ↗
(&self, query: Query)

Source from the content-addressed store, hash-verified

1651 }
1652
1653 fn describe_query_to_plan(&self, query: Query) -> Result<LogicalPlan> {
1654 let plan = self.query_to_plan(query, &mut PlannerContext::new())?;
1655
1656 let schema = Arc::new(plan.schema().as_arrow().clone());
1657
1658 let output_schema = DFSchema::try_from(LogicalPlan::describe_schema()).unwrap();
1659
1660 Ok(LogicalPlan::DescribeTable(DescribeTable {
1661 schema,
1662 output_schema: Arc::new(output_schema),
1663 }))
1664 }
1665
1666 fn copy_to_plan(&self, statement: CopyToStatement) -> Result<LogicalPlan> {
1667 // Determine if source is table or query and handle accordingly

Calls 6

newFunction · 0.85
DescribeTableClass · 0.85
query_to_planMethod · 0.80
as_arrowMethod · 0.80
cloneMethod · 0.45
schemaMethod · 0.45

Tested by

no test coverage detected