amogh-jahagirdar commented on code in PR #6598:
URL: https://github.com/apache/iceberg/pull/6598#discussion_r1070738205
##########
core/src/main/java/org/apache/iceberg/util/JsonUtil.java:
##########
@@ -98,6 +103,14 @@ public static <T> T parse(String json, FromJson<T> parser) {
}
}
+ public static <T, A> T parseWithArg(String json, FromJsonWithArgs<T, A>
parser, A args) {
+ try {
+ return parser.parse(JsonUtil.mapper().readValue(json, JsonNode.class),
args);
+ } catch (IOException e) {
+ throw new UncheckedIOException(e);
+ }
+ }
+
Review Comment:
Trying to think of a better abstraction so we don't need this and the
FromJsonWithArgs
--
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]