MsSQL TRY_CONVERT (#1477)

This commit is contained in:
Yoav Cohen 2024-10-20 22:29:55 +02:00 committed by GitHub
parent 3421e1e4d4
commit 45c5d69b22
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 40 additions and 5 deletions

View file

@ -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());