mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-10-09 13:40:22 +00:00
Support DOUBLE data types with precision for Mysql (#1611)
This commit is contained in:
parent
eae5629fb8
commit
c973df35d6
4 changed files with 21 additions and 9 deletions
|
@ -3009,7 +3009,7 @@ fn parse_create_table() {
|
|||
},
|
||||
ColumnDef {
|
||||
name: "lat".into(),
|
||||
data_type: DataType::Double,
|
||||
data_type: DataType::Double(ExactNumberInfo::None),
|
||||
collation: None,
|
||||
options: vec![ColumnOptionDef {
|
||||
name: None,
|
||||
|
@ -3018,7 +3018,7 @@ fn parse_create_table() {
|
|||
},
|
||||
ColumnDef {
|
||||
name: "lng".into(),
|
||||
data_type: DataType::Double,
|
||||
data_type: DataType::Double(ExactNumberInfo::None),
|
||||
collation: None,
|
||||
options: vec![],
|
||||
},
|
||||
|
@ -3198,7 +3198,7 @@ fn parse_create_table_with_constraint_characteristics() {
|
|||
},
|
||||
ColumnDef {
|
||||
name: "lat".into(),
|
||||
data_type: DataType::Double,
|
||||
data_type: DataType::Double(ExactNumberInfo::None),
|
||||
collation: None,
|
||||
options: vec![ColumnOptionDef {
|
||||
name: None,
|
||||
|
@ -3207,7 +3207,7 @@ fn parse_create_table_with_constraint_characteristics() {
|
|||
},
|
||||
ColumnDef {
|
||||
name: "lng".into(),
|
||||
data_type: DataType::Double,
|
||||
data_type: DataType::Double(ExactNumberInfo::None),
|
||||
collation: None,
|
||||
options: vec![],
|
||||
},
|
||||
|
@ -3838,7 +3838,7 @@ fn parse_create_external_table() {
|
|||
},
|
||||
ColumnDef {
|
||||
name: "lat".into(),
|
||||
data_type: DataType::Double,
|
||||
data_type: DataType::Double(ExactNumberInfo::None),
|
||||
collation: None,
|
||||
options: vec![ColumnOptionDef {
|
||||
name: None,
|
||||
|
@ -3847,7 +3847,7 @@ fn parse_create_external_table() {
|
|||
},
|
||||
ColumnDef {
|
||||
name: "lng".into(),
|
||||
data_type: DataType::Double,
|
||||
data_type: DataType::Double(ExactNumberInfo::None),
|
||||
collation: None,
|
||||
options: vec![],
|
||||
},
|
||||
|
|
|
@ -3022,3 +3022,13 @@ fn parse_longblob_type() {
|
|||
fn parse_begin_without_transaction() {
|
||||
mysql().verified_stmt("BEGIN");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_double_precision() {
|
||||
mysql().verified_stmt("CREATE TABLE foo (bar DOUBLE)");
|
||||
mysql().verified_stmt("CREATE TABLE foo (bar DOUBLE(11,0))");
|
||||
mysql().one_statement_parses_to(
|
||||
"CREATE TABLE foo (bar DOUBLE(11, 0))",
|
||||
"CREATE TABLE foo (bar DOUBLE(11,0))",
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue