mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-24 07:54:06 +00:00
Add support for snowflake exclusive create table options (#1233)
Co-authored-by: Ilson Roberto Balliego Junior <ilson@validio.io>
This commit is contained in:
parent
3c33ac15bd
commit
be77ce50ca
10 changed files with 1029 additions and 31 deletions
|
@ -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!(),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue