From 5449d01f7653d8ca15f3ea1fd0b976c9b1baf17b Mon Sep 17 00:00:00 2001 From: Hiranmaya Gundu Date: Fri, 19 Apr 2024 17:50:50 -0700 Subject: [PATCH] fix: pr comments --- src/parser/mod.rs | 2 +- tests/sqlparser_snowflake.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/parser/mod.rs b/src/parser/mod.rs index a2244ddc6..8c68a13aa 100644 --- a/src/parser/mod.rs +++ b/src/parser/mod.rs @@ -8780,7 +8780,7 @@ impl<'a> Parser<'a> { } else { None }; - let opt_exclude = if !opt_ilike.is_some() + let opt_exclude = if opt_ilike.is_none() && dialect_of!(self is GenericDialect | DuckDbDialect | SnowflakeDialect) { self.parse_optional_select_item_exclude()? diff --git a/tests/sqlparser_snowflake.rs b/tests/sqlparser_snowflake.rs index c3d41f2a1..326b36259 100644 --- a/tests/sqlparser_snowflake.rs +++ b/tests/sqlparser_snowflake.rs @@ -1642,7 +1642,7 @@ fn test_select_wildcard_with_ilike_number() { let res = snowflake().parse_sql_statements(r#"SELECT * ILIKE 42 FROM tbl"#); assert_eq!( res.unwrap_err().to_string(), - "sql parser error: Expected literal string, found: 42" + "sql parser error: Expected single quoted string, found: 42" ); }