Skip to content

replaces the hard-coded dialect list in the tokenizer with a supports_hash_comment dialect method - #2674

Merged
LucaCappelletti94 merged 3 commits into
apache:mainfrom
s5dsn-eqee:clickhouse-hash-comment
Oct 18, 2026
Merged

LucaCappelletti94 merged 3 commits into
apache:mainfrom
s5dsn-eqee:clickhouse-hash-comment

Conversation

@s5dsn-eqee

Copy link
Copy Markdown
Contributor

Closes: #2673

Dialects: ClickHouse

@codecov-commenter

codecov-commenter commented Oct 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.28%. Comparing base (1aabd12) to head (34a5648).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2674      +/-   ##
==========================================
+ Coverage   81.25%   81.28%   +0.03%     
==========================================
  Files          42       42              
  Lines       33910    33949      +39     
  Branches    33910    33949      +39     
==========================================
+ Hits        27553    27595      +42     
+ Misses       2792     2789       -3     
  Partials     3565     3565              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@LucaCappelletti94 LucaCappelletti94 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ClickHouse requires an ASCII space or ! immediately after # to start a line comment, while at this time the tokenizer also accepts SELECT 1 #comment, SELECT 1 ####### comment, SELECT 1 #, and # followed by a tab, all of which the official lexer rejects.

Please do add the red tests and ensure the tokenizer properly tackles these cases.

@LucaCappelletti94 LucaCappelletti94 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

cc @alamb

@LucaCappelletti94
LucaCappelletti94 added this pull request to the merge queue Oct 18, 2026
Merged via the queue into apache:main with commit d32825d Oct 18, 2026
13 checks passed
@s5dsn-eqee
s5dsn-eqee deleted the clickhouse-hash-comment branch October 18, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ClickHouse: # comments are not recognized

3 participants