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

[Do not review][Native] Add e2e tests for UUID type #23301

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

aditi-pandit
Copy link
Contributor

Description

Velox supports UUID type already.
Add e2e tests for SQL using UUID and remove the restriction documented.

== NO RELEASE NOTE ==

@aditi-pandit aditi-pandit requested review from steveburnett, elharo and a team as code owners July 25, 2024 22:19
@aditi-pandit aditi-pandit requested a review from presto-oss July 25, 2024 22:19
@aditi-pandit
Copy link
Contributor Author

@amitkdutta

assertQuery("SELECT typeof(array_constructor(uuid(), uuid()))");

// Valid UUID.
assertQuery("SELECT cast('33355449-2c7d-43d7-967a-f53cd23215ad' AS uuid)");
Copy link
Contributor

Choose a reason for hiding this comment

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

Do these queries run on coordinator or worker?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mbasmanova :

Am following up with tests for CTAS + INSERTs etc. These SQL are largely co-ordinator.
The review went out too soon.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mbasmanova : UUID would need a few more changes to have a better user experience. It has equality comparison, but lt, lte, gt, gte, between comparisons are not available. So authoring SQL has limitations.

Copy link
Contributor

Choose a reason for hiding this comment

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

@aditi-pandit Aditi, thank you for sharing these findings. Will you be adding missing functionality to Velox?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mbasmanova : Created issues facebookincubator/velox#10584 and facebookincubator/velox#10585. We will follow up there.

@aditi-pandit aditi-pandit changed the title [Native] Add e2e tests for UUID type [Do not review][Native] Add e2e tests for UUID type Jul 25, 2024
@aditi-pandit aditi-pandit marked this pull request as draft July 25, 2024 23:20
"WHERE a = b", tmpTableName, tmpTableName));

// Velox missing lt for UUID.
assertQueryFails(format("SELECT CAST(a AS VARCHAR), CAST(b AS VARCHAR) FROM " +
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Query failures for lt, lte, gt, gte, between

@aditi-pandit aditi-pandit removed the request for review from presto-oss July 26, 2024 18:13
// Invalid cast on both Presto Java and Native.
assertQueryFails(format("SELECT CAST(CAST(c_uuid as uuid) AS INTEGER) FROM %s", tmpTableName), ".*Cannot cast uuid to integer.*");
// Cast from UUID->VARBINARY not supported on Velox.
assertQueryFails(format("SELECT CAST(CAST(c_uuid AS uuid) AS VARBINARY) FROM %s", tmpTableName), ".*Cannot cast UUID to VARBINARY.*");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cast to Varbinary failure.

Copy link
Contributor

@steveburnett steveburnett left a comment

Choose a reason for hiding this comment

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

LGTM! (docs)

Pull branch, local docs build, review the built doc. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants