Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to terminate KSQL query with a - (hyphen, dash) in the query id #1888

Closed
DW-Pete opened this issue Sep 13, 2018 · 6 comments
Closed

Comments

@DW-Pete
Copy link

DW-Pete commented Sep 13, 2018

I created a CSAS stream like:

ksql> CREATE STREAM `O-WMS.ITEM_BARCODE_JSON` WITH (VALUE_FORMAT='JSON') AS SELECT \
ITM.C1, UPC.C2 FROM  ITM \
> INNER JOIN  UPC ON \
> (ITM.ITEM_ID = UPC.ITEM_ID);
 Message                    
----------------------------
 Stream created and running 
----------------------------

Note back quotes on stream name. I realised that I should have used a different name for the stream. I tried to terminate the stream using these:

ksql> terminate `CSAS_O-WMS.ITEM_BARCODE_JSON_62`;
java.lang.Exception: No running query with id `CSAS_O-WMS.ITEM_BARCODE_JSON_62` was found
ksql> terminate CSAS_O-WMS.ITEM_BARCODE_JSON_62;
line 1:17: mismatched input '-' expecting ';'
Caused by: org.antlr.v4.runtime.InputMismatchException

ksql> terminate 'CSAS_O-WMS.ITEM_BARCODE_JSON_62';

line 1:11: mismatched input ''CSAS_O-WMS.ITEM_BARCODE_JSON_62'' expecting {'ADD', 'APPROXIMATE', 'AT', 'CONFIDENCE', 'NO', 'SUBSTRING', 'POSITION', 'TINYINT', 'SMALLINT', 'INTEGER', 'DATE', 'TIME', 'TIMESTAMP', 'INTERVAL', 'YEAR', 'MONTH', 'DAY', 'HOUR', 'MINUTE', 'SECOND', 'ZONE', 'OVER', 'PARTITION', 'RANGE', 'ROWS', 'PRECEDING', 'FOLLOWING', 'CURRENT', 'ROW', 'STRUCT', 'VIEW', 'REPLACE', 'GRANT', 'REVOKE', 'PRIVILEGES', 'PUBLIC', 'OPTION', 'EXPLAIN', 'ANALYZE', 'FORMAT', 'TYPE', 'TEXT', 'GRAPHVIZ', 'LOGICAL', 'DISTRIBUTED', 'TRY', 'SHOW', 'TABLES', 'QUERY', 'SCHEMAS', 'CATALOGS', 'COLUMNS', 'COLUMN', 'USE', 'PARTITIONS', 'FUNCTIONS', 'FUNCTION', 'TO', 'SYSTEM', 'BERNOULLI', 'POISSONIZED', 'TABLESAMPLE', 'RESCALED', 'ARRAY', 'MAP', 'SET', 'RESET', 'SESSION', 'DATA', 'START', 'TRANSACTION', 'COMMIT', 'ROLLBACK', 'WORK', 'ISOLATION', 'LEVEL', 'SERIALIZABLE', 'REPEATABLE', 'COMMITTED', 'UNCOMMITTED', 'READ', 'WRITE', 'ONLY', 'CALL', 'NFD', 'NFC', 'NFKD', 'NFKC', 'IF', 'NULLIF', 'COALESCE', IDENTIFIER, DIGIT_IDENTIFIER, QUOTED_IDENTIFIER, BACKQUOTED_IDENTIFIER}
Caused by: org.antlr.v4.runtime.InputMismatchException

I need to find a way to terminate the query so I can drop the stream

@miguno miguno changed the title unable to terminate KSQL query with a - in the query id Unable to terminate KSQL query with a - (hyphen, dash) in the query id Oct 2, 2018
@saubury-iag
Copy link

I just hit the exact same problem. I have a misnamed stream (with a hyphen) and cannot terminate the query to remove it

@apurvam
Copy link
Contributor

apurvam commented Nov 6, 2018

Seems to be a dup of #1466

@apurvam
Copy link
Contributor

apurvam commented Nov 6, 2018

Related #1165

@DW-Pete
Copy link
Author

DW-Pete commented Nov 6, 2018

Seems to be a dup of #1466

However a fix for 1466 could be just a documentation change (to say not supported). This one is specifically for a query forced to have a hyphen in the name (and actually running!) not working with TERMINATE.

@big-andy-coates
Copy link
Contributor

Yeah #1466 is an issue with a hyphen in a field name - this is a hyphen in the stream name. Related, but not the same issue / fix.

@agavra
Copy link
Contributor

agavra commented Oct 28, 2019

@big-andy-coates I think this is a dup of #1466 - they are both about hyphens in stream/table names (hyphens in fields has been fixed as part of the quoted identifier work). Similarly, the fix for this is the same as #1466. If we prohibit streams/tables with hyphens, then there will not be queries with hyphens in their names so we won't run into this.

I will close this out and track the fix on #1466, but feel free to re-open if I misunderstood.

@agavra agavra closed this as completed Oct 28, 2019
Bugs automation moved this from Needs triage to Closed Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Bugs
  
Closed
Development

No branches or pull requests

6 participants