-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Fix UUID distinct operation issue #23732
base: master
Are you sure you want to change the base?
Fix UUID distinct operation issue #23732
Conversation
|
Code looks good @abhibongale, thanks for the pull request! It looks like this is a cherry pick from Trino. Please attribute it in the commit message (see contributing guide). |
2abd273
to
c20a15c
Compare
Almost there. Please use this commit message which will show attribution in Github.
|
@@ -272,4 +272,14 @@ public void testMixedDistinctWithFilter() | |||
"FROM (VALUES (1, 3), (2, 4), (2, 4), (4, 5)) t (x, y)", | |||
"VALUES (BIGINT '0', CAST(NULL AS BIGINT))"); | |||
} | |||
|
|||
@Test | |||
public void testUuidDistinct() |
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.
@BryanCutler : We should check how this works in Prestissimo as well. Don't anticipate a problem, but it would be good to make it part of the tests.
c20a15c
to
297f398
Compare
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.
@abhibongale Thanks for the contribution, I have re-triggered your failed test.
A small request, please rebase your branch on master rather than using merge. Merge results in an extra commit as you can see.
Cherry-pick of trinodb/trino#1180 by guyco33 Co-authored-by: Guy Cohen <[email protected]>
a3c1a8f
to
73b546f
Compare
Description
This commit resolves an issue with the UUID type in PrestoDB, where performing a GROUP BY operation on UUIDs resulted in an UnsupportedOperationException. The fix aligns with a solution implemented in Trino, ensuring that UUID comparison works correctly during aggregation.
Motivation and Context
This change is required to allow users to perform GROUP BY operations on UUIDs without encountering errors. It addresses the bug reported in issue #23554, enabling proper usage of UUIDs in queries.
Test Plan
The solution was tested by adding unit tests in TestDistinctAggregations, which cover various scenarios of using distinct operations on UUIDs. All tests passed successfully, confirming the correctness of the implementation.
Contributor checklist