-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Enable enum equality predicate pushdown for ClickHouse connector #21585
Conversation
7f3b9d7
to
88618fe
Compare
Rebased. |
assertQuerySucceeds(format("SELECT value FROM %s WHERE value = 'hello'", table.getName())); | ||
|
||
// ClickHouse shall fail when enum string is not exact | ||
assertQueryFails(format("SELECT value FROM %s WHERE value = 'Hello'", table.getName()), ".*Unknown\\s+element.*\\n*.*"); |
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.
This query succeeded without this PR's change. I don't think users want to face the query failure.
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.
Yes, with equality pushdown the behavior changes.
I'm thinking of the following workaround to preserve backward compatibility: SELECT value FROM %s WHERE toString(value) = 'Hello'
, note toString(value)
. Right now I'm looking at how I can rewrite expression to convert enum columns to string when it's necessary.
...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
Outdated
Show resolved
Hide resolved
...n/trino-clickhouse/src/test/java/io/trino/plugin/clickhouse/TestClickHouseConnectorTest.java
Show resolved
Hide resolved
This pull request has gone a while without any activity. Tagging the Trino developer relations team: @bitsondatadev @colebow @mosabua |
88618fe
to
2592308
Compare
2592308
to
44e0fcb
Compare
This pull request has gone a while without any activity. Tagging the Trino developer relations team: @bitsondatadev @colebow @mosabua |
Closing this pull request, as it has been stale for six weeks. Feel free to re-open at any time. |
Feel free to reopen and rebase or start a new PR if you want to continue working on this PR @sylph-eu |
Description
Partially addresses #7100 .
Enables equality predicate pushdown for enum types. It's similar to VARCHAR (from Trino's perspective), but is not that "general-purpose". Until ClickHouse fully supports collation (atm it's only implemented for ORDER BY clause) range predicates are not pushed down.
Additional context and related issues
Submitted ClickHouse/ClickHouse#62701 for unexpected behaviour.
Next I'll be looking at Decimals, time types and aggregate functions.
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: