Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
None
-
None
-
None
Description
Since I'm struggling with CALCITE-4746 I tried to use the SqlBabelParserImpl.FACTORY instead. Which works fine but then I found another problem.
It seems that there is no support for the Postgres Infix Cast operator in this ParserImplementation? So trying to run:
SqlParser.Config c = SqlParser.config()
.withParserFactory(SqlParserImpl.FACTORY);
SqlParser parser = SqlParser.create("SELECT bar::INT FROM foo", c);
parser.parseQuery();
gives
org.apache.calcite.sql.parser.SqlParseException: Encountered ":" at line 1, column 13. Was expecting one of: <EOF> "AS" ... "EXCEPT" ... "FETCH" ... "FROM" ... "INTERSECT" ... "LIMIT" ... "OFFSET" ... "ORDER" ... "MINUS" ... "UNION" ... <QUOTED_STRING> ... "," ... <BRACKET_QUOTED_IDENTIFIER> ... <QUOTED_IDENTIFIER> ... <BACK_QUOTED_IDENTIFIER> ... <HYPHENATED_IDENTIFIER> ... <IDENTIFIER> ... <UNICODE_QUOTED_IDENTIFIER> ... "." ... "NOT" ... "IN" ... "<" ... "<=" ... ">" ... ">=" ... "=" ... "<>" ... "!=" ... "BETWEEN" ... "LIKE" ... "SIMILAR" ... "+" ... "-" ... "*" ... "/" ... "%" ... "||" ... "AND" ... "OR" ... "IS" ... "MEMBER" ... "SUBMULTISET" ... "CONTAINS" ... "OVERLAPS" ... "EQUALS" ... "PRECEDES" ... "SUCCEEDS" ... "MULTISET" ... "[" ... "(" ...
Is this intentional or is this a bug?