VladBanar commented on code in PR #3447:
URL: https://github.com/apache/fluss/pull/3447#discussion_r3448264962
##########
fluss-client/src/main/java/org/apache/fluss/client/converter/FlussTypeToPojoTypeConverter.java:
##########
@@ -74,6 +75,17 @@ static Object convertTextValue(
ConverterCommons.charLengthExceptionMessage(fieldName,
v.length()));
}
return v.charAt(0);
+ } else if (pojoType.isEnum()) {
+ return Arrays.stream(pojoType.getEnumConstants())
+ .filter(e -> e.toString().equals(v.toUpperCase()))
+ .findAny()
+ .orElseThrow(
+ () ->
+ new IllegalArgumentException(
+ String.format(
+ "Could not parse value for
enum %s. Expected one of: [%s]",
Review Comment:
fixed
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]