You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2020/12/09 22:22:13 UTC
[GitHub] [iceberg] yyanyy commented on a change in pull request #1892: API: move NaN validation from Expressions to Literals
yyanyy commented on a change in pull request #1892:
URL: https://github.com/apache/iceberg/pull/1892#discussion_r539692125
##########
File path: api/src/main/java/org/apache/iceberg/expressions/Literals.java
##########
@@ -57,6 +58,7 @@ private Literals() {
@SuppressWarnings("unchecked")
static <T> Literal<T> from(T value) {
Preconditions.checkNotNull(value, "Cannot create expression literal from null");
+ Preconditions.checkArgument(!NaNUtil.isNaN(value), "Cannot expression literal from NaN");
Review comment:
Yes, sorry should have double checked... I include the fix of this in #1857 since I think they are kind of related, but please let me know if you want a separate PR for that!
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org