-
Notifications
You must be signed in to change notification settings - Fork 104
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
Support enums in rel ops #3012
base: main
Are you sure you want to change the base?
Support enums in rel ops #3012
Conversation
Result of fdb-record-layer-pr on Linux CentOS 7
|
24bc744
to
352a83d
Compare
Result of fdb-record-layer-pr on Linux CentOS 7
|
Result of fdb-record-layer-pr on Linux CentOS 7
|
352a83d
to
c59de90
Compare
Result of fdb-record-layer-pr on Linux CentOS 7
|
Result of fdb-record-layer-pr on Linux CentOS 7
|
@@ -67,7 +67,7 @@ | |||
* A value representing the contents of a (non-repeated, arbitrarily-nested) field of a quantifier. | |||
*/ | |||
@API(API.Status.EXPERIMENTAL) | |||
public class FieldValue extends AbstractValue implements ValueWithChild { | |||
public class FieldValue extends AbstractValue implements ValueWithChild, CreatesDynamicTypesValue { |
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.
That should not be necessary, the inner type should already have been declared elsewhere.
@@ -87,7 +87,7 @@ enum PhysicalOperator { | |||
NULL_TO_RECORD(Type.TypeCode.NULL, Type.TypeCode.RECORD, (descriptor, in) -> null), | |||
NONE_TO_ARRAY(Type.TypeCode.NONE, Type.TypeCode.ARRAY, (descriptor, in) -> in), | |||
NULL_TO_ENUM(Type.TypeCode.NULL, Type.TypeCode.ENUM, (descriptor, in) -> null), | |||
STRING_TO_ENUM(Type.TypeCode.STRING, Type.TypeCode.ENUM, ((descriptor, in) -> ((Descriptors.EnumDescriptor)descriptor).findValueByName((String)in))); | |||
STRING_TO_ENUM(Type.TypeCode.STRING, Type.TypeCode.ENUM, ((descriptor, in) -> stringToEnumValue((Descriptors.EnumDescriptor) descriptor, (String) in))); |
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.
STRING_TO_ENUM(Type.TypeCode.STRING, Type.TypeCode.ENUM, ((descriptor, in) -> stringToEnumValue((Descriptors.EnumDescriptor) descriptor, (String) in))); | |
STRING_TO_ENUM(Type.TypeCode.STRING, Type.TypeCode.ENUM, ((descriptor, in) -> stringToEnumValue((Descriptors.EnumDescriptor)descriptor, (String)in))); |
@@ -139,6 +139,12 @@ public static PhysicalOperator fromProto(@Nonnull final PlanSerializationContext | |||
return Objects.requireNonNull(getProtoEnumBiMap().inverse().get(physicalOperatorProto)); | |||
} | |||
|
|||
public static Descriptors.EnumValueDescriptor stringToEnumValue(Descriptors.EnumDescriptor enumDescriptor, String value) { |
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.
add @Nonnull
fixes #3011