nastra commented on code in PR #16881:
URL: https://github.com/apache/iceberg/pull/16881#discussion_r3457835744
##########
core/src/main/java/org/apache/iceberg/SingleValueParser.java:
##########
@@ -168,20 +181,25 @@ public static Object fromJson(Type type, JsonNode
defaultValue) {
byte[] fixedBytes =
BaseEncoding.base16().decode(defaultValue.textValue().toUpperCase(Locale.ROOT));
return ByteBuffer.wrap(fixedBytes);
- case BINARY:
+ }
+ case BINARY -> {
Preconditions.checkArgument(
defaultValue.isTextual(), "Cannot parse default as a %s value:
%s", type, defaultValue);
byte[] binaryBytes =
BaseEncoding.base16().decode(defaultValue.textValue().toUpperCase(Locale.ROOT));
return ByteBuffer.wrap(binaryBytes);
- case LIST:
+ }
+ case LIST -> {
Review Comment:
can be simplified
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]