You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "szehon-ho (via GitHub)" <gi...@apache.org> on 2023/03/23 18:25:00 UTC

[GitHub] [iceberg] szehon-ho commented on a diff in pull request #7132: Core, Spark: Fix delete with filter on nested columns

szehon-ho commented on code in PR #7132:
URL: https://github.com/apache/iceberg/pull/7132#discussion_r1146647169


##########
api/src/main/java/org/apache/iceberg/expressions/StrictMetricsEvaluator.java:
##########
@@ -489,5 +500,32 @@ private boolean containsNaNsOnly(Integer id) {
           && valueCounts != null
           && nanCounts.get(id).equals(valueCounts.get(id));
     }
+
+    private boolean supportsEvaluate(int fieldId) {
+      Boolean evaluable = canEvaluate.get(fieldId);
+      if (evaluable != null) {
+        return evaluable;
+      }
+
+      evaluable = true;
+      // Cannot evaluate on complex types or repeated primitive types.
+      if (!schema.findType(fieldId).isPrimitiveType()) {
+        evaluable = false;
+      } else {
+        Integer parent = idToParent.get(fieldId);
+        while (parent != null) {
+          Type type = schema.findType(parent);
+          if (type.isListType() || type.isMapType()) {
+            evaluable = false;

Review Comment:
   So you are skipping if list/map type, if I understand?  I think it makes sense to me, as I feel we have nested column stats.  but definitely like @rdblue @RussellSpitzer @aokolnychyi  to have a sanity check here on the overall direction. 



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