mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-03 22:08:16 +00:00
Add support for unit on char length units for small character string types. (#663)
This results in complete support for ANSI CHARACTER, CHAR, CHARACTER VARYING, CHAR VARYING, and VARCHAR.
This commit is contained in:
parent
777672625f
commit
cacdf3305f
6 changed files with 244 additions and 34 deletions
|
@ -1945,7 +1945,10 @@ fn parse_create_table() {
|
|||
vec![
|
||||
ColumnDef {
|
||||
name: "name".into(),
|
||||
data_type: DataType::Varchar(Some(100)),
|
||||
data_type: DataType::Varchar(Some(CharacterLength {
|
||||
length: 100,
|
||||
unit: None
|
||||
})),
|
||||
collation: None,
|
||||
options: vec![ColumnOptionDef {
|
||||
name: None,
|
||||
|
@ -2401,7 +2404,10 @@ fn parse_create_external_table() {
|
|||
vec![
|
||||
ColumnDef {
|
||||
name: "name".into(),
|
||||
data_type: DataType::Varchar(Some(100)),
|
||||
data_type: DataType::Varchar(Some(CharacterLength {
|
||||
length: 100,
|
||||
unit: None
|
||||
})),
|
||||
collation: None,
|
||||
options: vec![ColumnOptionDef {
|
||||
name: None,
|
||||
|
@ -2469,7 +2475,10 @@ fn parse_create_or_replace_external_table() {
|
|||
columns,
|
||||
vec![ColumnDef {
|
||||
name: "name".into(),
|
||||
data_type: DataType::Varchar(Some(100)),
|
||||
data_type: DataType::Varchar(Some(CharacterLength {
|
||||
length: 100,
|
||||
unit: None
|
||||
})),
|
||||
collation: None,
|
||||
options: vec![ColumnOptionDef {
|
||||
name: None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue