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

Method describe_table_to_plan

datafusion/sql/src/statement.rs:1638–1651  ·  view source on GitHub ↗
(&self, table_name: ObjectName)

Source from the content-addressed store, hash-verified

1636 }
1637
1638 fn describe_table_to_plan(&self, table_name: ObjectName) -> Result<LogicalPlan> {
1639 let table_ref = self.object_name_to_table_reference(table_name)?;
1640
1641 let table_source = self.context_provider.get_table_source(table_ref)?;
1642
1643 let schema = table_source.schema();
1644
1645 let output_schema = DFSchema::try_from(LogicalPlan::describe_schema()).unwrap();
1646
1647 Ok(LogicalPlan::DescribeTable(DescribeTable {
1648 schema,
1649 output_schema: Arc::new(output_schema),
1650 }))
1651 }
1652
1653 fn describe_query_to_plan(&self, query: Query) -> Result<LogicalPlan> {
1654 let plan = self.query_to_plan(query, &mut PlannerContext::new())?;

Calls 5

DescribeTableClass · 0.85
newFunction · 0.85
get_table_sourceMethod · 0.45
schemaMethod · 0.45

Tested by

no test coverage detected