mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-07-09 18:04:59 +00:00
Remove special handling of ::type1::type2 from parse_pg_cast
...it gets handled just as well by the infix parser. (Add a test while we're at it.)
This commit is contained in:
parent
f21cd697c3
commit
eff92a2dc1
2 changed files with 17 additions and 9 deletions
|
@ -532,6 +532,20 @@ fn parse_create_table_from_pg_dump() {
|
|||
assert_eq!(SQLType::Varchar(Some(45)), c_first_name.data_type);
|
||||
assert_eq!(false, c_first_name.allow_null);
|
||||
|
||||
let c_create_date1 = &columns[8];
|
||||
assert_eq!(
|
||||
Some(Box::new(ASTNode::SQLCast {
|
||||
expr: Box::new(ASTNode::SQLCast {
|
||||
expr: Box::new(ASTNode::SQLValue(Value::SingleQuotedString(
|
||||
"now".to_string()
|
||||
))),
|
||||
data_type: SQLType::Text
|
||||
}),
|
||||
data_type: SQLType::Date
|
||||
})),
|
||||
c_create_date1.default
|
||||
);
|
||||
|
||||
let c_release_year = &columns[10];
|
||||
assert_eq!(
|
||||
SQLType::Custom("public.year".to_string()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue