Snowflake: support for extended column options in CREATE TABLE (#1454)

This commit is contained in:
Aleksei Piianin 2024-10-20 20:13:25 +02:00 committed by GitHub
parent 1dd7d26fbb
commit 3421e1e4d4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 723 additions and 45 deletions

View file

@ -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,