Hi,
I am trying to set the consumer-id option on a PAIMON SQL. The flink job is
written in Java and when I try to run the job, it throws a SQL parser
exception shown below.

Here is how I am setting the OPTIONS:

SELECT * FROM PAIMON_APPEND_TABLE WHERE topic='local-test-topic-ingest' /*+
OPTIONS('consumer-id' = 'paimonConsumer') */;

Here's the paimon documentation
<https://paimon.apache.org/docs/master/how-to/querying-tables/#consumer-id> on
how to add a consumer-id. Is there something special we need to do to
handle the '+' sign after '/*'?

Exception in thread "main" org.apache.flink.table.api.SqlParserException:
SQL parse failed. Encountered "/*+" at line 2, column 64.
Was expecting one of:
    <EOF>
    "EXCEPT" ...
    "FETCH" ...
    "GROUP" ...
    <OMMITTED for breivity>...
at
org.apache.flink.table.planner.parse.CalciteParser.parseSqlList(CalciteParser.java:81)
at
org.apache.flink.table.planner.delegation.ParserImpl.parse(ParserImpl.java:102)
at
org.apache.flink.table.api.internal.TableEnvironmentImpl.sqlQuery(TableEnvironmentImpl.java:708)

Caused by: org.apache.calcite.sql.parser.SqlParseException: Encountered
"/*+" at line 2, column 64.
Was expecting one of:
    <EOF>
    "EXCEPT" ...
    "FETCH" ...
    "GROUP" ...
Caused by: org.apache.calcite.sql.parser.SqlParseException: Encountered
"/*+" at line 2, column 64.

    "HAVING" ...
    "INTERSECT" ...
    "LIMIT" ...
    "OFFSET" ...

at
org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.convertException(FlinkSqlParserImpl.java:512)
at
org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.normalizeException(FlinkSqlParserImpl.java:265)
at
org.apache.calcite.sql.parser.SqlParser.handleException(SqlParser.java:156)
at org.apache.calcite.sql.parser.SqlParser.parseStmtList(SqlParser.java:211)
at
org.apache.flink.table.planner.parse.CalciteParser.parseSqlList(CalciteParser.java:76)

Reply via email to