mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-04 14:28:22 +00:00
Add ICEBERG keyword support to ALTER TABLE statement (#1869)
This commit is contained in:
parent
394a534486
commit
5327f0ce13
7 changed files with 64 additions and 38 deletions
|
@ -2507,11 +2507,13 @@ fn parse_alter_table_add_column() {
|
|||
if_exists,
|
||||
only,
|
||||
operations,
|
||||
iceberg,
|
||||
location: _,
|
||||
on_cluster: _,
|
||||
} => {
|
||||
assert_eq!(name.to_string(), "tab");
|
||||
assert!(!if_exists);
|
||||
assert!(!iceberg);
|
||||
assert!(!only);
|
||||
assert_eq!(
|
||||
operations,
|
||||
|
@ -2536,8 +2538,7 @@ fn parse_alter_table_add_column() {
|
|||
if_exists,
|
||||
only,
|
||||
operations,
|
||||
location: _,
|
||||
on_cluster: _,
|
||||
..
|
||||
} => {
|
||||
assert_eq!(name.to_string(), "tab");
|
||||
assert!(!if_exists);
|
||||
|
@ -2574,8 +2575,7 @@ fn parse_alter_table_add_columns() {
|
|||
if_exists,
|
||||
only,
|
||||
operations,
|
||||
location: _,
|
||||
on_cluster: _,
|
||||
..
|
||||
} => {
|
||||
assert_eq!(name.to_string(), "tab");
|
||||
assert!(!if_exists);
|
||||
|
|
|
@ -834,8 +834,7 @@ fn parse_alter_table_add_columns() {
|
|||
if_exists,
|
||||
only,
|
||||
operations,
|
||||
location: _,
|
||||
on_cluster: _,
|
||||
..
|
||||
} => {
|
||||
assert_eq!(name.to_string(), "tab");
|
||||
assert!(if_exists);
|
||||
|
@ -915,8 +914,7 @@ fn parse_alter_table_owner_to() {
|
|||
if_exists: _,
|
||||
only: _,
|
||||
operations,
|
||||
location: _,
|
||||
on_cluster: _,
|
||||
..
|
||||
} => {
|
||||
assert_eq!(name.to_string(), "tab");
|
||||
assert_eq!(
|
||||
|
|
|
@ -1591,6 +1591,13 @@ fn test_alter_table_clustering() {
|
|||
snowflake_and_generic().verified_stmt("ALTER TABLE tbl RESUME RECLUSTER");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_alter_iceberg_table() {
|
||||
snowflake_and_generic().verified_stmt("ALTER ICEBERG TABLE tbl DROP CLUSTERING KEY");
|
||||
snowflake_and_generic().verified_stmt("ALTER ICEBERG TABLE tbl SUSPEND RECLUSTER");
|
||||
snowflake_and_generic().verified_stmt("ALTER ICEBERG TABLE tbl RESUME RECLUSTER");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_drop_stage() {
|
||||
match snowflake_and_generic().verified_stmt("DROP STAGE s1") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue