snuyanzin commented on code in PR #29026:
URL: https://github.com/apache/flink/pull/29026#discussion_r3894056953


##########
flink-core/src/main/java/org/apache/flink/types/variant/BinaryVariantInternalBuilder.java:
##########
@@ -604,12 +627,44 @@ private void buildJson(JsonParser parser) throws 
IOException {
                 appendNull();
                 break;
             default:
-                throw new JsonParseException(parser, "Unexpected token " + 
token);
+                throw parseError(source, "Unexpected token " + token + ".");
+        }
+    }
+
+    /**
+     * Classifies a raw JSON number literal and appends it as an integer, 
decimal, or double.
+     * Centralizing the choice here keeps every {@link JsonTokenSource} 
consistent.
+     */
+    private void appendNumber(JsonTokenSource source, String text) throws 
IOException {
+        if (isIntegerLiteral(text)) {
+            try {
+                appendNumeric(Long.parseLong(text));

Review Comment:
   what if a number greater than `Long.MAX_VALUE`?



-- 
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]

Reply via email to