mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-31 19:27:21 +00:00
fix: Add support for MAX
for NVARCHAR
(#1232)
This commit is contained in:
parent
547c5cde14
commit
b51f2a0c25
4 changed files with 10 additions and 6 deletions
|
@ -2258,7 +2258,10 @@ fn parse_cast() {
|
|||
&Expr::Cast {
|
||||
kind: CastKind::Cast,
|
||||
expr: Box::new(Expr::Identifier(Ident::new("id"))),
|
||||
data_type: DataType::Nvarchar(Some(50)),
|
||||
data_type: DataType::Nvarchar(Some(CharacterLength::IntegerLength {
|
||||
length: 50,
|
||||
unit: None,
|
||||
})),
|
||||
format: None,
|
||||
},
|
||||
expr_from_projection(only(&select.projection))
|
||||
|
|
|
@ -431,6 +431,7 @@ fn parse_for_json_expect_ast() {
|
|||
#[test]
|
||||
fn parse_cast_varchar_max() {
|
||||
ms_and_generic().verified_expr("CAST('foo' AS VARCHAR(MAX))");
|
||||
ms_and_generic().verified_expr("CAST('foo' AS NVARCHAR(MAX))");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue