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


##########
flink-core/src/main/java/org/apache/flink/types/variant/BinaryVariantInternalBuilder.java:
##########
@@ -345,6 +350,29 @@ public void appendDecimal(long unscaled, int scale) {
         }
     }
 
+    /**
+     * Appends a JSON number literal the way {@link #parseJson(String, 
boolean)} stores it: as the
+     * smallest integer that holds it, else as a decimal, else as a double. A 
caller that holds JSON
+     * in another form, such as a tree built by its own Jackson, uses this so 
its numbers match
+     * {@code PARSE_JSON}. The literal is read with the same parser and number 
handling as {@code
+     * PARSE_JSON}, so surrounding whitespace is allowed.
+     *
+     * @throws IOException if {@code literal} is not exactly one JSON number, 
or is out of the range
+     *     of a double. The builder must not be used after that.
+     */
+    public void appendJsonNumber(String literal) throws IOException {

Review Comment:
   Made it package private so tests can still cover it



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