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 2022/06/15 17:50:34 UTC

[GitHub] [iceberg] rdblue commented on a diff in pull request #5049: Spark: Fixes NPE when convert NOT IN filter

rdblue commented on code in PR #5049:
URL: https://github.com/apache/iceberg/pull/5049#discussion_r898259719


##########
spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/SparkFilters.java:
##########
@@ -178,6 +178,7 @@ public static Expression convert(Filter filter) {
             In childInFilter = (In) childFilter;
             Expression notIn = notIn(unquote(childInFilter.attribute()),
                 Stream.of(childInFilter.values())
+                    .filter(Objects::nonNull)

Review Comment:
   > should we support NULL literal in Iceberg?
   
   No. `null` is purposely not allowed as a literal because that brings in differences between SQL 3-valued boolean semantics and normal semantics. Engines are responsible for interpreting and rewriting filters. Similarly, in cases like this we actually want to reject null values in IN predicates. The user or the engine needs to rewrite before passing to Iceberg.



-- 
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: issues-unsubscribe@iceberg.apache.org

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