nastra commented on code in PR #19143:
URL: https://github.com/apache/iceberg/pull/19143#discussion_r4782490199


##########
core/src/main/java/org/apache/iceberg/SchemaParser.java:
##########
@@ -210,6 +216,21 @@ private static Literal<?> defaultFromJson(String 
defaultField, Type type, JsonNo
     return null;
   }
 
+  // non-finite float and double defaults are written as strings; 
Expressions.lit rejects NaN
+  private static Literal<?> nonFiniteDefaultFromJson(Type type, JsonNode 
defaultJson) {

Review Comment:
   why aren't we putting this fix into SingleValueParser.fromJSON? I think the 
issue isn't limited to default values only and can also happen with a 
Float/Double in a List/Map/Struct



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