Fix for whitespace bug in LIKE formatting by yariks5s · Pull Request #101931 · ClickHouse/ClickHouse · GitHub
Skip to content

Fix for whitespace bug in LIKE formatting#101931

Merged
alexey-milovidov merged 8 commits into
masterfrom
yarik/fix-ilike-trailing-space-parsing
May 19, 2026
Merged

Fix for whitespace bug in LIKE formatting#101931
alexey-milovidov merged 8 commits into
masterfrom
yarik/fix-ilike-trailing-space-parsing

Conversation

@yariks5s

@yariks5s yariks5s commented Apr 7, 2026

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Fixes a small whitespace bug during parsing of LIKE statement. Closes #101877

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Version info

  • Merged into: 26.5.1.794

@clickhouse-gh

clickhouse-gh Bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

@clickhouse-gh clickhouse-gh Bot added the pr-bugfix Pull request with bugfix, not backported by default label Apr 7, 2026
@thevar1able thevar1able self-assigned this Apr 7, 2026
@alexey-milovidov

Copy link
Copy Markdown
Member

The 02346_text_index_bug101913 test failure is fixed by #102108 (already merged). Please rebase or merge master to pick up the fix.

@alexey-milovidov

Copy link
Copy Markdown
Member

The MSan stress test failure (MemorySanitizer: use-of-uninitialized-value, STID 4179-5154 or 4148-3044) is a known pre-existing issue unrelated to this PR. Fix: #102158

Comment thread src/Parsers/ASTDropQuery.cpp
@alexey-milovidov

Copy link
Copy Markdown
Member

The flaky check failure is fixed in #102148, let's update the branch.

Address review: apply the same fix symmetrically to
`ASTShowColumnsQuery::formatQueryImpl`, which used `" LIKE"` (no trailing
space) before `quoteString(like)` and produced malformed output like
`LIKE'%x%'`. Extend the stateless `formatQuery` test to cover this path.
@alexey-milovidov

Copy link
Copy Markdown
Member

This was fixed by #105146. Let's update the branch.

@alexey-milovidov alexey-milovidov changed the title Fix for whitespace bug in LIKE parsing Fix for whitespace bug in LIKE formatting May 17, 2026

@alexey-milovidov alexey-milovidov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you! LGTM.

@alexey-milovidov alexey-milovidov self-assigned this May 17, 2026
@clickhouse-gh

clickhouse-gh Bot commented May 17, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 84.20% 84.20% +0.00%
Functions 91.40% 91.40% +0.00%
Branches 76.60% 76.70% +0.10%

Changed lines: 100.00% (8/8) · Uncovered code

Full report · Diff report

@alexey-milovidov

Copy link
Copy Markdown
Member

@alexey-milovidov alexey-milovidov merged commit 3c26482 into master May 19, 2026
164 of 167 checks passed
@alexey-milovidov alexey-milovidov deleted the yarik/fix-ilike-trailing-space-parsing branch May 19, 2026 02:50
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label May 19, 2026
alexey-milovidov added a commit to vvo/ClickHouse that referenced this pull request May 19, 2026
* Fix for whitespace bug in LIKE parsing

* Fix whitespace bug in SHOW COLUMNS LIKE formatting

Address review: apply the same fix symmetrically to
`ASTShowColumnsQuery::formatQueryImpl`, which used `" LIKE"` (no trailing
space) before `quoteString(like)` and produced malformed output like
`LIKE'%x%'`. Extend the stateless `formatQuery` test to cover this path.

---------

Co-authored-by: Alexey Milovidov <milovidov@clickhouse.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-bugfix Pull request with bugfix, not backported by default pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing space between LIKE keyword and pattern in TRUNCATE TABLES formatting

4 participants