mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-31 03:07:20 +00:00
Support basic CTEs (WITH
)
Some unsupported features are noted as TODOs.
This commit is contained in:
parent
f958e9d3cf
commit
bf0c07bb1b
5 changed files with 217 additions and 91 deletions
|
@ -11,7 +11,10 @@ fn parse_simple_select() {
|
|||
let ast = Parser::parse_sql(&AnsiSqlDialect {}, sql).unwrap();
|
||||
assert_eq!(1, ast.len());
|
||||
match ast.first().unwrap() {
|
||||
SQLStatement::SQLSelect(SQLSelect { projection, .. }) => {
|
||||
SQLStatement::SQLSelect(SQLQuery {
|
||||
body: SQLSelect { projection, .. },
|
||||
..
|
||||
}) => {
|
||||
assert_eq!(3, projection.len());
|
||||
}
|
||||
_ => assert!(false),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue