You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2026/10/22 23:09:43 UTC

[GH] (shardingsphere/fix/40295-mysql-or-xor-precedence): Workflow run "E2E - SQL" failed!

The GitHub Actions job "E2E - SQL" on shardingsphere.git/fix/40295-mysql-or-xor-precedence has failed.
Run started by GitHub user Rainmemery (triggered by terrymanu).

Head commit for run:
979b648ab1b7034fe075582972f18103b0a2fead / Rainmemery <15...@users.noreply.github.com>
Fix MySQL OR and XOR operator precedence

MySQL evaluates `AND` tighter than `XOR`, and `XOR` tighter than `OR`.
In ANTLR4 a directly left-recursive rule assigns precedence by the order
of its alternatives, so `expr` had to list `XOR` before `orOperator`.
It listed them the other way around, grouping `1 OR 1 XOR 1` as
`(1 OR 1) XOR 1`.

Apply the same reordering to the Doris grammar, which keeps its own copy
of this shared rule. Doris documents the same precedence (`AND, &&` = 9,
`XOR` = 10, `OR` = 11), so both dialects now match their vendors.

Cover both dialects with one Parser IT case; its expected AST carries no
`db-types`, so MySQL and Doris assert the same tree from the same SQL.

Reported in #40295. Reverting either grammar alone reproduces the
failures in the corresponding `Internal*ParserIT`.

Report URL: https://github.com/apache/shardingsphere/actions/runs/39771507828

With regards,
GitHub Actions via GitBox