-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add lt, lte, gt, gte, neq, between for UUID type #10584
Comments
@mbasmanova : Any particular reason we don't support these ? Don't think this has the logical type comparison issue as Timestamp with Timezone. |
Hi @aditi-pandit I'll work on this one |
@aditi-pandit No particular reason. Let's add missing functionality. @BryanCutler Thank you for offering to work on this. |
CC: @amitkdutta |
Just a quick update - I have the basic implementation done for comparisons, working on adding tests and will put up a PR soon. |
Summary: This adds binary comparison functions <, >, <=, >= to the UUID custom data type. Equality functions are already present. Added unit tests for testing a query with comparisons between UUID values. The ordering is done lexicographically to conforms with IETF RFC 4122 https://datatracker.ietf.org/doc/html/rfc4122.html, and also matches Presto Java after prestodb/presto#23311. Related UUID serialization fix at #11197 From #10584 Pull Request resolved: #10791 Reviewed By: Yuhta Differential Revision: D66707660 Pulled By: xiaoxmeng fbshipit-source-id: f49ee07cf172735eadb8a85e533a2919d0bb48b2
Completed in #10791, can we close this @aditi-pandit ? |
@BryanCutler Will be great if we can add casting uuid to varbinary support as well. We are seeing queries fail with |
@amitkdutta : Had created issue for CAST(uuid() AS VARBINARY) with the rest of the UUID testing at the time #10585. Have pinged the engineer who wanted to work on this. |
Description
Presto UUID type supports neq, lt, lte, gt, gte, between operations UUIDOperators
This allows more flexible use in SQL.
The lack of these operators causes exceptions today
https://github.com/prestodb/presto/pull/23301/files#r1693434020
Since we support equality on UUID, it seems strange not to support the rest of these operations.
The text was updated successfully, but these errors were encountered: