MikeThomsen commented on a change in pull request #4648:
URL: https://github.com/apache/nifi/pull/4648#discussion_r518407403
##########
File path:
nifi-commons/nifi-record/src/main/java/org/apache/nifi/serialization/record/util/DataTypeUtils.java
##########
@@ -1025,6 +1029,17 @@ public static boolean isStringTypeCompatible(final
Object value) {
return value != null;
}
+ public static boolean isEnumTypeCompatible(final Object value, final
EnumDataType enumType) {
+ return enumType.getEnums() != null &&
enumType.getEnums().contains(value);
+ }
+
+ private static Object toEnum(Object value, EnumDataType dataType, String
fieldName) {
+ if(dataType.getEnums() != null && dataType.getEnums().contains(value))
{
Review comment:
Yeah, I know the spec only allows strings, but I was wondering if wanted
to allow boolean values to be converted to strings here.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]