-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Support Clickhouse varchar comparison pushdown #23558
Support Clickhouse varchar comparison pushdown #23558
Conversation
42ab5c4
to
6cdf3fc
Compare
a_enum_1 Enum('hello', 'world', 'a', 'b', 'c'), | ||
a_enum_2 Enum('hello', 'world', 'a', 'b', 'c')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move this to a dedicated test for enums ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was initially implemented as a dedicated test, however it is duplicated in this test anyway to support:
assertThat(query("SELECT some_column FROM " + table.getName() + " WHERE a_string = a_string_alias")).isFullyPushedDown();
assertThat(query("SELECT some_column FROM " + table.getName() + " WHERE a_string = a_string_alias" + withConnectorExpression)).isFullyPushedDown();
assertThat(query("SELECT some_column FROM " + table.getName() + " WHERE a_string = a_enum_1")).isNotFullyPushedDown(FilterNode.class);
assertThat(query("SELECT some_column FROM " + table.getName() + " WHERE a_string = a_enum_1" + withConnectorExpression)).isNotFullyPushedDown(FilterNode.class);
scenarios. So let it be as it is.
...-clickhouse/src/main/java/io/trino/plugin/clickhouse/expression/RewriteStringComparison.java
Outdated
Show resolved
Hide resolved
6cdf3fc
to
15585ed
Compare
@Praveen2112 please approve |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM % changes on method name and additional test coverage for a few data types.
...-clickhouse/src/main/java/io/trino/plugin/clickhouse/expression/RewriteStringComparison.java
Outdated
Show resolved
Hide resolved
...n/trino-clickhouse/src/test/java/io/trino/plugin/clickhouse/TestClickHouseConnectorTest.java
Outdated
Show resolved
Hide resolved
...n/trino-clickhouse/src/test/java/io/trino/plugin/clickhouse/TestClickHouseConnectorTest.java
Outdated
Show resolved
Hide resolved
...n/trino-clickhouse/src/test/java/io/trino/plugin/clickhouse/TestClickHouseConnectorTest.java
Show resolved
Hide resolved
...n/trino-clickhouse/src/test/java/io/trino/plugin/clickhouse/TestClickHouseConnectorTest.java
Show resolved
Hide resolved
...n/trino-clickhouse/src/test/java/io/trino/plugin/clickhouse/TestClickHouseConnectorTest.java
Show resolved
Hide resolved
ffd6822
to
d774d3a
Compare
@Praveen2112 all comments are addressed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this.
6498658
to
3d8a123
Compare
3d8a123
to
fa2459a
Compare
Description
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: