PostgresClient.parseQuery(String sqlQuery) uses net.sf.jsqlparser to parse the SQL query returned by CQL2PgJson.
net.sf.jsqlparser does not support these features:
- boolean comparator. Example: "SELECT * FROM t WHERE TRUE IS NOT UNKNOWN"
This is standard SQL:
- Postgres' JSON operator. Example: The JSON operator "@>" in the query "SELECT * FROM t WHERE a@>b" is split into two operators and results in "SELECT * FROM t WHERE a@ > b"
Both features are used by CQL2PgJson.
Suggestion: Drop net.sf.jsqlparser and let CQL2PgJson return a data structure where the caller has access to the where, order by, limit and offset clause. That way the caller does not need to parse the sql string.