Skip to content

Fix pruning predicate for LIKE expressions with escape sequences#22375

Merged
Dandandan merged 3 commits into
apache:mainfrom
masonh22:fix-like-pruning-escape
May 19, 2026
Merged

Fix pruning predicate for LIKE expressions with escape sequences#22375
Dandandan merged 3 commits into
apache:mainfrom
masonh22:fix-like-pruning-escape

Conversation

@masonh22
Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

See #22374.

What changes are included in this PR?

This change includes a fix for the issue and a test that fails without this fix. The fix is straightforward: when splitting on the wildcard, we also unescape any escape sequences in the prefix.

Are these changes tested?

I added a test that fails without this fix.

Are there any user-facing changes?

No

Comment thread datafusion/pruning/src/pruning_predicate.rs Outdated
Comment thread datafusion/pruning/src/pruning_predicate.rs Outdated
@Dandandan Dandandan enabled auto-merge May 19, 2026 19:39
@Dandandan Dandandan added this pull request to the merge queue May 19, 2026
Merged via the queue into apache:main with commit 7b4d2e6 May 19, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The pruning predicate for LIKE expressions doesn't handle escape sequences in the compared string

3 participants