mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-31 03:07:20 +00:00
Add support for JSONB
datatype (#1089)
This commit is contained in:
parent
7cb1654d81
commit
5d66dc5dc9
4 changed files with 17 additions and 1 deletions
|
@ -2172,6 +2172,17 @@ fn parse_cast() {
|
|||
},
|
||||
expr_from_projection(only(&select.projection))
|
||||
);
|
||||
|
||||
let sql = "SELECT CAST(details AS JSONB) FROM customer";
|
||||
let select = verified_only_select(sql);
|
||||
assert_eq!(
|
||||
&Expr::Cast {
|
||||
expr: Box::new(Expr::Identifier(Ident::new("details"))),
|
||||
data_type: DataType::JSONB,
|
||||
format: None,
|
||||
},
|
||||
expr_from_projection(only(&select.projection))
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue