Add support for snowflake exclusive create table options (#1233)

Co-authored-by: Ilson Roberto Balliego Junior <ilson@validio.io>
This commit is contained in:
Ilson Balliego 2024-06-09 23:47:21 +02:00 committed by GitHub
parent 3c33ac15bd
commit be77ce50ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 1029 additions and 31 deletions

View file

@ -4136,3 +4136,26 @@ fn parse_at_time_zone() {
expr
);
}
#[test]
fn parse_create_table_with_options() {
let sql = "CREATE TABLE t (c INT) WITH (foo = 'bar', a = 123)";
match pg().verified_stmt(sql) {
Statement::CreateTable(CreateTable { with_options, .. }) => {
assert_eq!(
vec![
SqlOption {
name: "foo".into(),
value: Expr::Value(Value::SingleQuotedString("bar".into())),
},
SqlOption {
name: "a".into(),
value: Expr::Value(number("123")),
},
],
with_options
);
}
_ => unreachable!(),
}
}