mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-07-07 17:04:59 +00:00
Snowflake: support for extended column options in CREATE TABLE
(#1454)
This commit is contained in:
parent
1dd7d26fbb
commit
3421e1e4d4
8 changed files with 723 additions and 45 deletions
|
@ -921,7 +921,12 @@ fn parse_create_table_with_identity_column() {
|
|||
vec![
|
||||
ColumnOptionDef {
|
||||
name: None,
|
||||
option: ColumnOption::Identity(None),
|
||||
option: ColumnOption::Identity(IdentityPropertyKind::Identity(
|
||||
IdentityProperty {
|
||||
parameters: None,
|
||||
order: None,
|
||||
},
|
||||
)),
|
||||
},
|
||||
ColumnOptionDef {
|
||||
name: None,
|
||||
|
@ -934,19 +939,17 @@ fn parse_create_table_with_identity_column() {
|
|||
vec![
|
||||
ColumnOptionDef {
|
||||
name: None,
|
||||
#[cfg(not(feature = "bigdecimal"))]
|
||||
option: ColumnOption::Identity(Some(IdentityProperty {
|
||||
seed: Expr::Value(Value::Number("1".to_string(), false)),
|
||||
increment: Expr::Value(Value::Number("1".to_string(), false)),
|
||||
})),
|
||||
#[cfg(feature = "bigdecimal")]
|
||||
option: ColumnOption::Identity(Some(IdentityProperty {
|
||||
seed: Expr::Value(Value::Number(bigdecimal::BigDecimal::from(1), false)),
|
||||
increment: Expr::Value(Value::Number(
|
||||
bigdecimal::BigDecimal::from(1),
|
||||
false,
|
||||
)),
|
||||
})),
|
||||
option: ColumnOption::Identity(IdentityPropertyKind::Identity(
|
||||
IdentityProperty {
|
||||
parameters: Some(IdentityPropertyFormatKind::FunctionCall(
|
||||
IdentityParameters {
|
||||
seed: Expr::Value(number("1")),
|
||||
increment: Expr::Value(number("1")),
|
||||
},
|
||||
)),
|
||||
order: None,
|
||||
},
|
||||
)),
|
||||
},
|
||||
ColumnOptionDef {
|
||||
name: None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue