(
&self,
statement: Statement,
planner_context: &mut PlannerContext,
)
| 255 | } |
| 256 | |
| 257 | fn sql_statement_to_plan_with_context_impl( |
| 258 | &self, |
| 259 | statement: Statement, |
| 260 | planner_context: &mut PlannerContext, |
| 261 | ) -> Result<LogicalPlan> { |
| 262 | match statement { |
| 263 | Statement::ExplainTable { |
| 264 | describe_alias: DescribeAlias::Describe | DescribeAlias::Desc, // only parse 'DESCRIBE table_name' or 'DESC table_name' and not 'EXPLAIN table_name' |
| 265 | table_name, |
| 266 | .. |
| 267 | } => self.describe_table_to_plan(table_name), |
| 268 | Statement::Explain { |
| 269 | describe_alias: DescribeAlias::Describe | DescribeAlias::Desc, // only parse 'DESCRIBE statement' or 'DESC statement' and not 'EXPLAIN statement' |
| 270 | statement, |
| 271 | .. |
| 272 | } => match *statement { |
| 273 | Statement::Query(query) => self.describe_query_to_plan(*query), |
| 274 | _ => { |
| 275 | not_impl_err!("Describing statements other than SELECT not supported") |
| 276 | } |
| 277 | }, |
| 278 | Statement::Explain { |
| 279 | verbose, |
| 280 | statement, |
| 281 | analyze, |
| 282 | format, |
| 283 | describe_alias: _, |
| 284 | .. |
| 285 | } => { |
| 286 | let format = format.map(|format| format.to_string()); |
| 287 | let statement = DFStatement::Statement(statement); |
| 288 | self.explain_to_plan(verbose, analyze, format, statement) |
| 289 | } |
| 290 | Statement::Query(query) => self.query_to_plan(*query, planner_context), |
| 291 | Statement::ShowVariable { variable } => self.show_variable_to_plan(&variable), |
| 292 | Statement::Set(statement) => self.set_statement_to_plan(statement), |
| 293 | Statement::CreateTable(CreateTable { |
| 294 | temporary, |
| 295 | external, |
| 296 | global, |
| 297 | transient, |
| 298 | volatile, |
| 299 | hive_distribution, |
| 300 | hive_formats, |
| 301 | file_format, |
| 302 | location, |
| 303 | query, |
| 304 | name, |
| 305 | columns, |
| 306 | constraints, |
| 307 | if_not_exists, |
| 308 | or_replace, |
| 309 | without_rowid, |
| 310 | like, |
| 311 | clone, |
| 312 | comment, |
| 313 | on_commit, |
| 314 | on_cluster, |
no test coverage detected