mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-07-07 17:04:59 +00:00
Support ALTER TABLE ... SET LOCATION
(#1154)
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
This commit is contained in:
parent
6f090e5547
commit
991dbab755
5 changed files with 59 additions and 7 deletions
|
@ -124,6 +124,19 @@ fn test_alter_partition() {
|
|||
hive().verified_stmt(alter);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_alter_with_location() {
|
||||
let alter =
|
||||
"ALTER TABLE db.table PARTITION (a = 2) RENAME TO PARTITION (a = 1) LOCATION 's3://...'";
|
||||
hive().verified_stmt(alter);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_alter_with_set_location() {
|
||||
let alter = "ALTER TABLE db.table PARTITION (a = 2) RENAME TO PARTITION (a = 1) SET LOCATION 's3://...'";
|
||||
hive().verified_stmt(alter);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_add_partition() {
|
||||
let add = "ALTER TABLE db.table ADD IF NOT EXISTS PARTITION (a = 'asdf', b = 2)";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue