mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-07-10 02:14:58 +00:00
Support minimum display width for integer data types (#337)
* Support minimum display width for integers * make fmt happy, updated docstrings
This commit is contained in:
parent
9a5716d94b
commit
77d90d3b85
6 changed files with 81 additions and 36 deletions
|
@ -54,7 +54,7 @@ fn parse_create_table_with_defaults() {
|
|||
vec![
|
||||
ColumnDef {
|
||||
name: "customer_id".into(),
|
||||
data_type: DataType::Int,
|
||||
data_type: DataType::Int(None),
|
||||
collation: None,
|
||||
options: vec![ColumnOptionDef {
|
||||
name: None,
|
||||
|
@ -65,7 +65,7 @@ fn parse_create_table_with_defaults() {
|
|||
},
|
||||
ColumnDef {
|
||||
name: "store_id".into(),
|
||||
data_type: DataType::SmallInt,
|
||||
data_type: DataType::SmallInt(None),
|
||||
collation: None,
|
||||
options: vec![ColumnOptionDef {
|
||||
name: None,
|
||||
|
@ -98,7 +98,7 @@ fn parse_create_table_with_defaults() {
|
|||
},
|
||||
ColumnDef {
|
||||
name: "address_id".into(),
|
||||
data_type: DataType::SmallInt,
|
||||
data_type: DataType::SmallInt(None),
|
||||
collation: None,
|
||||
options: vec![ColumnOptionDef {
|
||||
name: None,
|
||||
|
@ -154,7 +154,7 @@ fn parse_create_table_with_defaults() {
|
|||
},
|
||||
ColumnDef {
|
||||
name: "active".into(),
|
||||
data_type: DataType::Int,
|
||||
data_type: DataType::Int(None),
|
||||
collation: None,
|
||||
options: vec![ColumnOptionDef {
|
||||
name: None,
|
||||
|
@ -574,7 +574,7 @@ fn parse_prepare() {
|
|||
..
|
||||
} => {
|
||||
assert_eq!(name, "a".into());
|
||||
assert_eq!(data_types, vec![DataType::Int, DataType::Text]);
|
||||
assert_eq!(data_types, vec![DataType::Int(None), DataType::Text]);
|
||||
|
||||
statement
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue