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

Method schema

datafusion/expr/src/logical_plan/ddl.rs:67–85  ·  view source on GitHub ↗

Get a reference to the logical plan's schema

(&self)

Source from the content-addressed store, hash-verified

65impl DdlStatement {
66 /// Get a reference to the logical plan's schema
67 pub fn schema(&self) -> &DFSchemaRef {
68 match self {
69 DdlStatement::CreateExternalTable(CreateExternalTable { schema, .. }) => {
70 schema
71 }
72 DdlStatement::CreateMemoryTable(CreateMemoryTable { input, .. })
73 | DdlStatement::CreateView(CreateView { input, .. }) => input.schema(),
74 DdlStatement::CreateCatalogSchema(CreateCatalogSchema { schema, .. }) => {
75 schema
76 }
77 DdlStatement::CreateCatalog(CreateCatalog { schema, .. }) => schema,
78 DdlStatement::CreateIndex(CreateIndex { schema, .. }) => schema,
79 DdlStatement::DropTable(DropTable { schema, .. }) => schema,
80 DdlStatement::DropView(DropView { schema, .. }) => schema,
81 DdlStatement::DropCatalogSchema(DropCatalogSchema { schema, .. }) => schema,
82 DdlStatement::CreateFunction(CreateFunction { schema, .. }) => schema,
83 DdlStatement::DropFunction(DropFunction { schema, .. }) => schema,
84 }
85 }
86
87 /// Return a descriptive string describing the type of this
88 /// [`DdlStatement`]

Callers 6

to_json_valueMethod · 0.45
f_downMethod · 0.45
hashMethod · 0.45
eqMethod · 0.45
fmtMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected