-
Notifications
You must be signed in to change notification settings - Fork 114
Bring back full support for UUID #3510
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
Bring back full support for UUID #3510
Conversation
|
We probably want to cut a release with the intermediate support for UUID in JDBC server, before bringing this PR in. |
This PR (1) adds the missing support in `DataType` and gRPC-related classes for the future UUID type. This is needed to maintain compatibility in mixed-mode testing with the future full-support version. It is relatively difficult to test this on the `main` as we cannot bring in the support in the current PR. However, here is the PR for re-introducing the full support: #3510 (2). I have tested that (2) is backward compatible with fixes in (1). Hence, if (1) releases first, and then we bring in (2) we will maintain compatibility to "older" version JDBC servers.
|
This is good to review now! |
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, very minor comments.
| --- | ||
| test_block: | ||
| name: uuid-as-a-field-tests | ||
| preset: single_repetition_ordered |
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.
is there a reason for adding an explicit preset? if not, can we remove it?
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.
Yeah, that was stray code. Removed!
| {4, !uuid '5394a912-aa8e-40fc-a4bb-ddf3f89ac45b'}] | ||
| - | ||
| - query: select * from ta where b >= !! !uuid '99e8e8b1-ac34-4f4d-9f01-1f4a7debf4d6' !! | ||
| - unorderedResult: [{3, !uuid 'c35ba01f-f8fc-47d7-bb00-f077e8a75682'}, |
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 you please verify the plan as well?
| final var elementField = messageDescriptor.findFieldByName(NullableArrayTypeUtils.getRepeatedFieldName()); | ||
| final var elementTypeCode = TypeCode.fromProtobufType(elementField.getType()); | ||
| return fromProtoTypeToArray(descriptor, protoType, elementTypeCode, true); | ||
| } else if (TupleFieldsProto.UUID.getDescriptor().equals(messageDescriptor)) { |
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.
I think we may have discussed this before, but can you please remind me again why are handling the conversion of UUID PB message within a Struct but not within and Array?
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.
We are adding an extra check here for the case of RECORD, since the descriptor could be that representing a UUID. If so, we do not consider it a "Record" type, but a "UUID" type. This is only needed for this particular case, and not also in Arrays as that dispatches the element processing to this function only.
80e60b7 to
2d20510
Compare
This PR is a follow-up PR in the series for deprecating using sql_type_codes in JDBC, and instead using "richer" Relational types. The support for relational types were introduced some time bakc in #3510. This PR shifts to relational type usage, away from sql_type usage, to make way for retiring the latter field completely from the protobuf. After this, we could remove the field in 2 steps: 1. stop setting jdbcSqlType fields in JDBC proto and mark them deprecated. 2. remove from protobuf
This PR brings back the complete support for UUID as a primitive data type. The support was first brought in with PR:#3198, but was later partially rolled back in #3293.
It also brings in UUID-relevant parts from patch: #3395, that was based on top 4.2.4.0, onto the main.