Hi, I want to parse the query of PostgreSQL via Calcite and while I am
parsing the query using the calcite parser it gives me exception for system
keyword.

This is the program:
This is the query :
" select system from my_table;"

val  parser:SqlParser = SqlParser.create(query)
parser.parseQuery()

Exception I got.
org.apache.calcite.sql.parser.SqlParseException: Encountered "*system*" at
line 1, column 8.
Was expecting one of:
    "ABS" ...
    "ALL" ...

And I also got exception for this scenario to :
query :
INSERT INTO my_table(id,system_state)
 VALUES (?, ?::system_state_type)

exception I got:
org.apache.calcite.sql.parser.SqlParseException: Encountered "*:*" at line.
Was expecting one of:
    <EOF>
    "EXCEPT" ...

Please help me
1. How to parse these queries?
2. Can we parse query using  PostgresqlSqlDialect, if yes then how.

Thanks.

*Shivraj Singh*
Software Consultant
Knoldus Inc. <http://www.knoldus.com>
+91-8800782123
Canada - USA - India - Singapore
<https://in.linkedin.com/company/knoldus> <https://twitter.com/Knolspeak>
<https://www.facebook.com/KnoldusSoftware/> <https://blog.knoldus.com/>

Reply via email to