questdb / questdb/questdb

Escape mechanism doesn't work in like/ilike functions

Open
#2,623 14 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug Good first issue hacktoberfest
Dominant language
Java
Stars
17.3k
Forks
1.7k
Avg merge
5d 10h
Merged PRs (30d)
28

Description

Describe the bug

Like and ilike functions don't recognize default escape character '\' nor allow using a different one via ESCAPE clause .

To reproduce
SELECT '\quest' LIKE '\_uest'; 
--true but should be false

SELECT 'quest_' LIKE 'quest\_'
--false but should be true 

select 'quest' like 'quest' escape 'Z'
--found [tok=''Z'', len=3] ',', 'from' or 'over' expected
Expected Behavior

No response

Environment
- **QuestDB version**:6.5.4/master
- **OS**:
- **Browser**:
Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no source files or tests. Start by reproducing the three LIKE and ILIKE queries against QuestDB 6.5.4 or master, then trace the SQL parsing and execution entry points for pattern matching. Done means the shown default backslash cases behave as expected and the ESCAPE clause parses and affects matching.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, sql
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.