(&self, from: FromTable)
| 1599 | } |
| 1600 | |
| 1601 | fn get_delete_target(&self, from: FromTable) -> Result<ObjectName> { |
| 1602 | let mut from = match from { |
| 1603 | FromTable::WithFromKeyword(v) => v, |
| 1604 | FromTable::WithoutKeyword(v) => v, |
| 1605 | }; |
| 1606 | |
| 1607 | if from.len() != 1 { |
| 1608 | return not_impl_err!( |
| 1609 | "DELETE FROM only supports single table, got {}: {from:?}", |
| 1610 | from.len() |
| 1611 | ); |
| 1612 | } |
| 1613 | let table_factor = from.pop().unwrap(); |
| 1614 | if !table_factor.joins.is_empty() { |
| 1615 | return not_impl_err!("DELETE FROM only supports single table, got: joins"); |
| 1616 | } |
| 1617 | let TableFactor::Table { name, .. } = table_factor.relation else { |
| 1618 | return not_impl_err!( |
| 1619 | "DELETE FROM only supports single table, got: {table_factor:?}" |
| 1620 | ); |
| 1621 | }; |
| 1622 | |
| 1623 | Ok(name) |
| 1624 | } |
| 1625 | |
| 1626 | /// Generate a logical plan from a "SHOW TABLES" query |
| 1627 | fn show_tables_to_plan(&self) -> Result<LogicalPlan> { |
no test coverage detected