Comments not supported by sql language parser
See original GitHub issueWhen --
comment is used within query, it doesn’t behave like comment
SELECT
1
FROM
-- test
test2
The query produced is invalid and clickhouse server usually throws DB::Exception: Syntax error
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
An overview of SQL Comments - SQLShack
This article will show an overview of the SQL Comments.
Read more >Bug Report: SQL Commenting that screw up queries
Hi All, Just as a word or warning for people creating advanced queries and that use COMMENTS in those queries. There is a...
Read more >Add support for parsing comments · Issue #21 · joshtemple/lkml
As far as parsing goes, I'm imagining a comment key/value that's added to the dictionary, similar to name , that stores the full,...
Read more >MySQL 8.0 Reference Manual :: 9.7 Comments
The comment syntax just described applies to how the mysqld server parses SQL statements. The mysql client program also performs some parsing of...
Read more >Howto clean comments from raw sql file - Stack Overflow
Can you keep track of how many non-escaped quotes you've passed? An odd number means the comment is part of a string and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sure. I like the idea of stripping comments before sending them to the server. Looks like the easiest way to fix it. Alternatively, we can replace ‘–’ with ‘/* */’.
issue resolved via https://github.com/Altinity/clickhouse-grafana/commit/00d2e0bfb44a5fad623062cdde487e74fc211b1c