WZhuo commented on code in PR #19279:
URL: https://github.com/apache/iceberg/pull/19279#discussion_r4795342207


##########
core/src/main/java/org/apache/iceberg/SingleValueParser.java:
##########
@@ -72,17 +72,11 @@ public static Object fromJson(Type type, JsonNode 
defaultValue) {
         return defaultValue.longValue();
       case FLOAT:
         Preconditions.checkArgument(
-            defaultValue.isFloatingPointNumber(),
-            "Cannot parse default as a %s value: %s",
-            type,
-            defaultValue);
+            defaultValue.isNumber(), "Cannot parse default as a %s value: %s", 
type, defaultValue);

Review Comment:
   Done, float and double values that overflow are now rejected.



##########
core/src/test/java/org/apache/iceberg/TestSingleValueParser.java:
##########


Review Comment:
   Done, added separate tests for float/double values, including out-of-range 
integers, rounding, overflow, and quoted numbers.



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

Reply via email to