question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Comments not supported by sql language parser

See original GitHub issue

When -- 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:closed
  • Created 5 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
alex-zaitsevcommented, Jan 13, 2020

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 ‘/* */’.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found