mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-31 11:17:23 +00:00
Extract ASTNode::SQLSelect to a separate struct (1/5)
This will allow re-using it for SQLStatement in a later commit. (Also split the new struct into a separate file, other query-related types will be moved here in a follow-up commit.)
This commit is contained in:
parent
50b5724c39
commit
d8173d4196
5 changed files with 97 additions and 96 deletions
|
@ -11,7 +11,7 @@ fn parse_simple_select() {
|
|||
let sql = String::from("SELECT id, fname, lname FROM customer WHERE id = 1");
|
||||
let ast = parse_sql(&sql);
|
||||
match ast {
|
||||
ASTNode::SQLSelect { projection, .. } => {
|
||||
ASTNode::SQLSelect(SQLSelect { projection, .. }) => {
|
||||
assert_eq!(3, projection.len());
|
||||
}
|
||||
_ => assert!(false),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue