mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-07-07 17:04:59 +00:00
MsSQL TRY_CONVERT (#1477)
This commit is contained in:
parent
3421e1e4d4
commit
45c5d69b22
8 changed files with 40 additions and 5 deletions
|
@ -464,6 +464,7 @@ fn parse_cast_varchar_max() {
|
|||
fn parse_convert() {
|
||||
let sql = "CONVERT(INT, 1, 2, 3, NULL)";
|
||||
let Expr::Convert {
|
||||
is_try,
|
||||
expr,
|
||||
data_type,
|
||||
charset,
|
||||
|
@ -473,6 +474,7 @@ fn parse_convert() {
|
|||
else {
|
||||
unreachable!()
|
||||
};
|
||||
assert!(!is_try);
|
||||
assert_eq!(Expr::Value(number("1")), *expr);
|
||||
assert_eq!(Some(DataType::Int(None)), data_type);
|
||||
assert!(charset.is_none());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue