zhjwpku commented on code in PR #17106:
URL: https://github.com/apache/iceberg/pull/17106#discussion_r3538116450
##########
api/src/main/java/org/apache/iceberg/types/Types.java:
##########
@@ -897,15 +897,46 @@ private static Literal<?> castDefault(Literal<?>
defaultValue, Type type) {
throw new IllegalArgumentException(
String.format("Invalid default value for %s: %s (must be null)",
type, defaultValue));
} else if (defaultValue != null) {
+ // Check before conversion so non-finite double-to-float defaults fail
clearly instead of
+ // converting to AboveMax or BelowMin sentinels.
Review Comment:
Tweaked a little bit, please take a look again.
--
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]