snuyanzin commented on code in PR #29026:
URL: https://github.com/apache/flink/pull/29026#discussion_r3904419777
##########
flink-core/src/main/java/org/apache/flink/types/variant/BinaryVariantInternalBuilder.java:
##########
@@ -548,22 +568,36 @@ public int compareTo(FieldEntry other) {
}
}
- private void buildJson(JsonParser parser) throws IOException {
- JsonToken token = parser.currentToken();
+ /**
+ * Build an IOException enriched with the source's location, mirroring the
location that a
+ * Jackson JsonParseException used to carry before the builder was
decoupled from Jackson.
+ */
+ private static IOException parseError(JsonTokenSource source, String
message) {
+ final String location = source.currentLocation();
+ if (location == null) {
+ return new IOException(message);
+ }
+ return new IOException(message + "\n at " + location);
+ }
Review Comment:
Do I understand correctly: if there is an error with json it will show the
position from token where it happened?
However if there is `NumberFormatException`: we can only wish good luck to
user to find the problem number in a giant `VARIANT`?
--
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]