mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-31 11:17:23 +00:00
Rename SQLStatement::SQLSelect to SQLQuery
The name was confusing: SQLStatement::SQLSelect( SQLQuery { body: SQLSetExpr::Select(SQLSelect) } ) Fix the `large_enum_variant` clippy lint for `SQLStatement::SQLQuery` `SQLStatement::SQLCreateView`, and `SQLSetExpr::Select`, while we're changing the AST anyway https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
This commit is contained in:
parent
08bbce8992
commit
50a2310173
5 changed files with 21 additions and 18 deletions
|
@ -1003,8 +1003,8 @@ fn only<T>(v: &[T]) -> &T {
|
|||
|
||||
fn verified_query(query: &str) -> SQLQuery {
|
||||
match verified_stmt(query) {
|
||||
SQLStatement::SQLSelect(select) => select,
|
||||
_ => panic!("Expected SELECT"),
|
||||
SQLStatement::SQLQuery(query) => *query,
|
||||
_ => panic!("Expected SQLQuery"),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1017,7 +1017,7 @@ fn expr_from_projection(item: &SQLSelectItem) -> &ASTNode {
|
|||
|
||||
fn verified_only_select(query: &str) -> SQLSelect {
|
||||
match verified_query(query).body {
|
||||
SQLSetExpr::Select(s) => s,
|
||||
SQLSetExpr::Select(s) => *s,
|
||||
_ => panic!("Expected SQLSetExpr::Select"),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue