snuyanzin commented on code in PR #29026:
URL: https://github.com/apache/flink/pull/29026#discussion_r3902747213
##########
flink-core/src/main/java/org/apache/flink/types/variant/BinaryVariantInternalBuilder.java:
##########
@@ -105,22 +103,34 @@ public BinaryVariantInternalBuilder(boolean
allowDuplicateKeys) {
public static BinaryVariant parseJson(String json, boolean
allowDuplicateKeys)
throws IOException {
try (JsonParser parser = JSON_FACTORY.createParser(json)) {
- parser.nextToken();
- return parseJson(parser, allowDuplicateKeys);
+ return parseJson(new JacksonJsonTokenSource(parser),
allowDuplicateKeys);
}
}
/**
- * Similar {@link #parseJson(String, boolean)}, but takes a JSON parser
instead of string input.
+ * Parse the JSON value read from a Jackson parser as a Variant value. The
parser must be
+ * positioned before the value, as after {@code createParser} or a tree's
{@code traverse()}.
+ *
+ * @throws IOException if any JSON parsing error happens.
Review Comment:
That is not true: you have tests expecting `NumberFormatException`
--
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]