lhadhazy commented on issue #2462:
URL:
https://github.com/apache/datafusion-sqlparser-rs/issues/2462#issuecomment-5874914106
Reproduced on `5cad906` in both `MySqlDialect` and `GenericDialect` — all
four cases in the table above group as reported.
Two things I found while confirming it, in case they change the shape of the
fix. `&` and `^` misgroup for the same reason and are not in the table:
`Ampersand` is 23 and `Caret` 22, both above `PgOther` at 21, so `c -> '$.a' &
1` parses as `c -> ('$.a' & 1)`. And `|` comes out correct today only by
coincidence — `Pipe` shares 21 with `PgOther`, and left associativity happens
to give MySQL's grouping — so it is worth a regression test alongside any
change rather than being left alone.
I have a failing test in the style of `parse_div_precedence`, covering both
dialects and the bitwise cases. Happy to open a PR with it — are you already on
this one, given #2461?
--
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]