princejain756 opened a new pull request, #2701:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2701

   MySQL ranks bitwise XOR (`^`) above `*`, `/`, `DIV`, `%`, and `MOD` 
(https://dev.mysql.com/doc/refman/8.4/en/operator-precedence.html), so `SELECT 
2 ^ 3 * 4` groups as `(2 ^ 3) * 4` and evaluates to `4`. The default precedence 
table ranks `Token::Caret` below `Precedence::MulDivModOp`, causing 
`MySqlDialect` to parse `2 ^ 3 * 4` as `2 ^ (3 * 4)`.
   
   This change overrides `Token::Caret` in `MySqlDialect::get_next_precedence` 
to bind tighter than `Precedence::MulDivModOp`, while keeping `<<`, `>>`, `&`, 
and `|` at their existing precedence levels.
   
   Closes #2692
   
   Dialects: MySQL
   


-- 
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