-
Couldn't load subscription status.
- Fork 114
Add support for UUID as primitive type in SQL #3198
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
Conversation
29dbb31 to
247b596
Compare
ba6a83c to
dd1974d
Compare
83c8e5f to
3a87830
Compare
...-layer-core/src/main/java/com/apple/foundationdb/record/query/plan/cascades/typing/Type.java
Outdated
Show resolved
Hide resolved
...-layer-core/src/main/java/com/apple/foundationdb/record/query/plan/cascades/typing/Type.java
Show resolved
Hide resolved
...-core/src/main/java/com/apple/foundationdb/record/query/plan/cascades/values/FieldValue.java
Outdated
Show resolved
Hide resolved
...-core/src/main/java/com/apple/foundationdb/record/query/plan/cascades/values/FieldValue.java
Outdated
Show resolved
Hide resolved
...e/src/main/java/com/apple/foundationdb/record/query/plan/cascades/values/MessageHelpers.java
Show resolved
Hide resolved
fdb-relational-api/src/main/java/com/apple/foundationdb/relational/api/SqlTypeNamesSupport.java
Show resolved
Hide resolved
fdb-relational-core/src/main/java/com/apple/foundationdb/relational/api/SqlTypeSupport.java
Outdated
Show resolved
Hide resolved
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 resolved all comments except one or two. It's possible that those can be resolved as well without further code change (it's more that they are questions).
...-core/src/main/java/com/apple/foundationdb/record/query/plan/cascades/values/FieldValue.java
Outdated
Show resolved
Hide resolved
| 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.
It is a bit complex to understand why the handling of the UUID is done here and not in an outer if. But after some discussion I understand it better now. Thanks @g31pranjal for the explanation.
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, great work!
This PR reverts the SQL layer support for UUID that was introduced in #3198. However, the Record Layer support for UUID stays as it is. This makes this compatible with releases < `4.2.3.0` which was required to maintain plan continuation compatibility for plans serialized with non-UUID Type. Also adds a yaml-test for explicitly defining the RecordMetadata using proto, and using the `TupleField.UUID` message in it. Owing to difference in behavior in how this and versions (4.2.3.0 and 4.2.4.0) interprets `TupleField.UUID`, this PR also blocklists these versions from yaml-testing. fixes: #3285
No description provided.