mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-07-08 01:15:00 +00:00
truncate: table as optional keyword (#883)
Signed-off-by: Maciej Obuchowski <obuchowski.maciej@gmail.com>
This commit is contained in:
parent
097e7ad56e
commit
3be19c7666
3 changed files with 20 additions and 2 deletions
|
@ -2950,3 +2950,16 @@ fn parse_select_group_by_cube() {
|
|||
select.group_by
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_truncate() {
|
||||
let truncate = pg_and_generic().verified_stmt("TRUNCATE db.table_name");
|
||||
assert_eq!(
|
||||
Statement::Truncate {
|
||||
table_name: ObjectName(vec![Ident::new("db"), Ident::new("table_name")]),
|
||||
partitions: None,
|
||||
table: false
|
||||
},
|
||||
truncate
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue