Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve ClickHouse LIKE pushdown for complex expression #23591

Conversation

ssheikin
Copy link
Contributor

@ssheikin ssheikin commented Sep 27, 2024

Description

This PR improves ClickHouse LIKE pushdown for complex expressions in Trino.
LIKE with ESCAPE is out of scope of this PR.
Trino syntax for LIKE without ESCAPE does not support escape characters.
However Clickhouse supports escape with \ is for escaping literals %, _ and .
When Trino LIKE pattern contains \ do not pushdown the expression to Clickhouse.

Additional context and related issues

Release notes

( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
(x) Release notes are required, with the following suggested text:

# Clickhouse
* Improve LIKE pushdown for complex expression ({issue}`23591`)

Copy link
Member

@Praveen2112 Praveen2112 left a comment

Choose a reason for hiding this comment

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

% test changes

@Praveen2112
Copy link
Member

@ssheikin Can we rebase it on top of the master ?

@ssheikin ssheikin force-pushed the ssheikin/49/trino/clickhouse-varchar-LIKE-pushdown branch from 53c2599 to a241bb8 Compare September 27, 2024 12:54
@ssheikin ssheikin force-pushed the ssheikin/49/trino/clickhouse-varchar-LIKE-pushdown branch from a241bb8 to 93d99d9 Compare September 27, 2024 13:00
Copy link
Member

@hashhar hashhar left a comment

Choose a reason for hiding this comment

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

LGTM % existing comments.

@ssheikin ssheikin force-pushed the ssheikin/49/trino/clickhouse-varchar-LIKE-pushdown branch 2 times, most recently from 20b6509 to e20b82f Compare September 30, 2024 11:09
@ssheikin ssheikin force-pushed the ssheikin/49/trino/clickhouse-varchar-LIKE-pushdown branch from e20b82f to e5e958c Compare September 30, 2024 12:01
@ssheikin ssheikin force-pushed the ssheikin/49/trino/clickhouse-varchar-LIKE-pushdown branch from e5e958c to 01859be Compare September 30, 2024 12:25
@Praveen2112 Praveen2112 merged commit 0f2d9e0 into trinodb:master Oct 1, 2024
16 checks passed
@github-actions github-actions bot added this to the 460 milestone Oct 1, 2024
@ssheikin ssheikin deleted the ssheikin/49/trino/clickhouse-varchar-LIKE-pushdown branch October 1, 2024 12:29
@mosabua mosabua mentioned this pull request Oct 1, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants