GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — MySQL bitwise |, &, and shifts still share one parser precedence tier · Issue #2834 · JSQLParser/JSqlParser Closed DescriptionReproductionAt current import net.sf.jsqlparser.expression.BinaryExpression; import net.sf.jsqlparser.expression.Expression; import net.sf.jsqlparser.parser.AbstractJSqlParser.Dialect; import net.sf.jsqlparser.parser.CCJSqlParserUtil; import net.sf.jsqlparser.statement.select.Select; public class Repro { static String shape(Expression e) { if (e instanceof BinaryExpression b) return "(" + shape(b.getLeftExpression()) + " " + e.getClass().getSimpleName() + " " + shape(b.getRightExpression()) + ")"; return e.toString(); } public static void main(String[] args) throws Exception { for (String x : new String[]{"1 | 2 & 4", "3 & 1 << 2"}) { Select s = (Select) CCJSqlParserUtil.parse("SELECT " + x + " AS x", p -> p.withDialect(Dialect.MYSQL)); System.out.println(x + " => " + shape(s.getPlainSelect().getSelectItem(0).getExpression())); } } } Observed on 2026-10-19: The arithmetic parser loop assigns precedence 4 to Activity
MetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |