Support ALTER TABLE ... SET LOCATION (#1154)

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
This commit is contained in:
Jonathan Lehto 2024-03-01 14:05:05 -05:00 committed by GitHub
parent 6f090e5547
commit 991dbab755
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 59 additions and 7 deletions

View file

@ -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)";