add support for MAX as a character length (#1038)

This commit is contained in:
Ophir LOJKINE 2023-11-10 21:57:56 +01:00 committed by GitHub
parent 4cdaa40abe
commit ff8312bfd8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 63 additions and 39 deletions

View file

@ -127,7 +127,7 @@ fn parse_create_procedure() {
value: "@bar".into(),
quote_style: None
},
data_type: DataType::Varchar(Some(CharacterLength {
data_type: DataType::Varchar(Some(CharacterLength::IntegerLength {
length: 256,
unit: None
}))
@ -431,6 +431,11 @@ fn parse_like() {
chk(true);
}
#[test]
fn parse_cast_varchar_max() {
ms_and_generic().verified_expr("CAST('foo' AS VARCHAR(MAX))");
}
#[test]
fn parse_similar_to() {
fn chk(negated: bool) {