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

Method display

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

Return a `format`able structure with the a human readable description of this LogicalPlan node per node, not including children. See [crate::LogicalPlan::display] for an example

(&self)

Source from the content-addressed store, hash-verified

127 ///
128 /// See [crate::LogicalPlan::display] for an example
129 pub fn display(&self) -> impl Display + '_ {
130 struct Wrapper<'a>(&'a DdlStatement);
131 impl Display for Wrapper<'_> {
132 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
133 match self.0 {
134 DdlStatement::CreateExternalTable(CreateExternalTable {
135 name,
136 constraints,
137 ..
138 }) => {
139 if constraints.is_empty() {
140 write!(f, "CreateExternalTable: {name:?}")
141 } else {
142 write!(f, "CreateExternalTable: {name:?} {constraints}")
143 }
144 }
145 DdlStatement::CreateMemoryTable(CreateMemoryTable {
146 name,
147 constraints,
148 ..
149 }) => {
150 if constraints.is_empty() {
151 write!(f, "CreateMemoryTable: {name:?}")
152 } else {
153 write!(f, "CreateMemoryTable: {name:?} {constraints}")
154 }
155 }
156 DdlStatement::CreateView(CreateView { name, .. }) => {
157 write!(f, "CreateView: {name:?}")
158 }
159 DdlStatement::CreateCatalogSchema(CreateCatalogSchema {
160 schema_name,
161 ..
162 }) => {
163 write!(f, "CreateCatalogSchema: {schema_name:?}")
164 }
165 DdlStatement::CreateCatalog(CreateCatalog {
166 catalog_name, ..
167 }) => {
168 write!(f, "CreateCatalog: {catalog_name:?}")
169 }
170 DdlStatement::CreateIndex(CreateIndex { name, .. }) => {
171 write!(f, "CreateIndex: {name:?}")
172 }
173 DdlStatement::DropTable(DropTable {
174 name, if_exists, ..
175 }) => {
176 write!(f, "DropTable: {name:?} if not exist:={if_exists}")
177 }
178 DdlStatement::DropView(DropView {
179 name, if_exists, ..
180 }) => {
181 write!(f, "DropView: {name:?} if not exist:={if_exists}")
182 }
183 DdlStatement::DropCatalogSchema(DropCatalogSchema {
184 name,
185 if_exists,
186 cascade,

Callers 15

partitioned_fileMethod · 0.45
scanMethod · 0.45
csv_openerFunction · 0.45
criterion_benchmarkFunction · 0.45
narrow_benchmarksFunction · 0.45
wide_benchmarksFunction · 0.45
nested_benchmarksFunction · 0.45
criterion_benchmarkFunction · 0.45
register_avro_tablesFunction · 0.45

Calls 1

WrapperClass · 0.70

Tested by 7

register_avro_tablesFunction · 0.36
datafusion_test_dataFunction · 0.36
arrow_test_dataFunction · 0.36
parquet_test_dataFunction · 0.36
test_data_dirFunction · 0.36