JSqlParser icon indicating copy to clipboard operation
JSqlParser copied to clipboard

[BUG] JSQLParser 4.6 : KsqlDB : Not able to parse Ksqldb queries

Open devanshusharma17 opened this issue 2 years ago • 2 comments

Always check against the Latest SNAPSHOT of JSQLParser and the Syntax Diagram

Failing SQL Feature:

  • When I tried to parse some ksql db queries not able to parse by CCJSqlParserUtil.parse method. I have tried some extra keywords added by ksql db like WITHIN, GRACE PERIOD and EMIT FINAL etc.
  • Example: WITHIN, GRACE PERIOD and EMIT FINAL can't be parsed. maybe more keywords for ksqldb. I tested only those one.

SQL Example:

  • Simplified Query Example, focusing on the failing feature
    -- select count(*) from log_data_testtopic_1b138324 t1 inner join TestTopic t2 WITHIN 1 MINUTES on t1.email = t2.email EMIT CHANGES;
    -- SELECT count(*), sum('id'), avg('id') FROM TestTopic WINDOW TUMBLING (SIZE 60 SECONDS) EMIT FINAL;
    

Software Information:

  • JSqlParser version - 4.6
  • Database (e. g. KsqlDB )

Tips:

Please write in English and avoid Screenshots (as we can't copy and paste content from it). Try your example online with the latest JSQLParser and share the link in the error report. Do provide Links or References to the specific Grammar and Syntax you are trying to use.

devanshusharma17 avatar Mar 21 '23 04:03 devanshusharma17

Greetings,

certainly not supported, since ksqlDB is a very specific/exotic DB for streaming/Kafka. You can either provide or sponsor an implementation of those syntax.

manticore-projects avatar Mar 21 '23 05:03 manticore-projects

Turns out, that there is some support for ksqlDB already. I found some KSQL related tests including support for WITHIN(..).

manticore-projects avatar Mar 22 '23 00:03 manticore-projects