mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-22 15:04:04 +00:00
add support for MAX as a character length (#1038)
This commit is contained in:
parent
4cdaa40abe
commit
ff8312bfd8
5 changed files with 63 additions and 39 deletions
|
@ -349,10 +349,12 @@ fn parse_create_table_with_defaults() {
|
|||
},
|
||||
ColumnDef {
|
||||
name: "first_name".into(),
|
||||
data_type: DataType::CharacterVarying(Some(CharacterLength {
|
||||
length: 45,
|
||||
unit: None
|
||||
})),
|
||||
data_type: DataType::CharacterVarying(Some(
|
||||
CharacterLength::IntegerLength {
|
||||
length: 45,
|
||||
unit: None
|
||||
}
|
||||
)),
|
||||
collation: None,
|
||||
options: vec![ColumnOptionDef {
|
||||
name: None,
|
||||
|
@ -361,10 +363,12 @@ fn parse_create_table_with_defaults() {
|
|||
},
|
||||
ColumnDef {
|
||||
name: "last_name".into(),
|
||||
data_type: DataType::CharacterVarying(Some(CharacterLength {
|
||||
length: 45,
|
||||
unit: None
|
||||
})),
|
||||
data_type: DataType::CharacterVarying(Some(
|
||||
CharacterLength::IntegerLength {
|
||||
length: 45,
|
||||
unit: None
|
||||
}
|
||||
)),
|
||||
collation: Some(ObjectName(vec![Ident::with_quote('"', "es_ES")])),
|
||||
options: vec![ColumnOptionDef {
|
||||
name: None,
|
||||
|
@ -373,10 +377,12 @@ fn parse_create_table_with_defaults() {
|
|||
},
|
||||
ColumnDef {
|
||||
name: "email".into(),
|
||||
data_type: DataType::CharacterVarying(Some(CharacterLength {
|
||||
length: 50,
|
||||
unit: None
|
||||
})),
|
||||
data_type: DataType::CharacterVarying(Some(
|
||||
CharacterLength::IntegerLength {
|
||||
length: 50,
|
||||
unit: None
|
||||
}
|
||||
)),
|
||||
collation: None,
|
||||
options: vec![],
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue