strongduanmu commented on pull request #11996: URL: https://github.com/apache/shardingsphere/pull/11996#issuecomment-905238344
In different database dialects, the `and` operator has a higher priority than the `or` operator, so it should be parsed according to the priority when parsing. However, the parsing engine does not distinguish the priority of `and` and `or`, which results in incorrect parsing results of the following sentences, and ultimately leads to extremely complicated logic for extracting `AndPredicate` when using the parsing results. ```sql SELECT * FROM t_order WHERE a = 1 AND b = 2 OR c = 3 AND d = 4 OR e = 5 AND f = 6; ``` Current parse result:  Optimized parse result:  -- 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]
