LucaCappelletti94 commented on code in PR #2470:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/2470#discussion_r4328071586


##########
src/parser/mod.rs:
##########
@@ -4154,6 +4154,31 @@ impl<'a> Parser<'a> {
                         self.parse_is_json_predicate(expr, false)
                     } else if self.parse_keywords(&[Keyword::NOT, 
Keyword::JSON]) {
                         self.parse_is_json_predicate(expr, true)
+                    } else if self.dialect.supports_is_operator() {
+                        if let Some((form, negated)) =
+                            self.maybe_parse(|parser| 
parser.parse_unicode_is_normalized_suffix())?
+                        {
+                            Ok(Expr::IsNormalized {
+                                expr: Box::new(expr),
+                                form,
+                                negated,
+                            })
+                        } else {
+                            let op = if self.parse_keyword(Keyword::NOT) {
+                                BinaryOperator::IsNot
+                            } else {
+                                BinaryOperator::Is
+                            };
+                            // SQLite parses `IS` at the same left-associative 
level as the
+                            // comparison operators, see 
<https://www.sqlite.org/syntax/expr.html>

Review Comment:
   The comment describes `IS` and `IS NOT` at the same precedence level as `=` 
and links SQLite’s operator table. The preexisting comparison-precedence 
limitation is handled separately in 
https://github.com/apache/datafusion-sqlparser-rs/pull/2678.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to