Description
The Antlr4 parser throws a org.antlr.v4.runtime.NoViableAltException on the following valid ClickHouse query:
SqlParser parser = new SqlParser();
ParsedStatement stmt = parser.parsedStatement("SELECT INTERVAL '1 day'");
assertTrue(stmt.isHasErrors());
Without the string quotes, it parses the interval correctly:
SqlParser parser = new SqlParser();
ParsedStatement stmt = parser.parsedStatement("SELECT INTERVAL 1 day");
assertFalse(stmt.isHasErrors());
When debugging this in the test, you can see that inside parsedStatement() the parseTree.children.get(0).exception is org.antlr.v4.runtime.NoViableAltException.
While debugging this, I was also wondering: are the tests in SqlParserTest (and potentially all non-integration tests) even picked up in CI? I noticed that they are neither run in mvn verify nor in mvn test 🤔 (unless my local env is not setup correctly or I'm doing something wrong)
Edit: I think I found the cause for that and opened #2430