LucaCappelletti94 opened a new pull request, #3027: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/3027
In SQLite `IS` and `IS NOT` are comparison operators that bind looser than `+`, so `a IS NULL + 1` means `a IS (NULL + 1)`. `SQLiteDialect` already parses `IS` as a binary operator, but the `IS NULL`, `IS TRUE` and `IS FALSE` shortcuts ran first and built `(a IS NULL) + 1`. For `a = 5` SQLite returns 0 where the misread tree means 1. Under `supports_is_operator` the parser now reads the right operand at `=` precedence and keeps `Expr::IsNull`, `Expr::IsTrue` and the rest only when that operand is a bare `NULL`, `TRUE` or `FALSE`, so `a IS NULL` alone keeps its tree. -- 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]
