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 2021/05/20 22:14:19 UTC

[GitHub] [iceberg] jackye1995 commented on a change in pull request #2372: Spark: add position delete row reader

jackye1995 commented on a change in pull request #2372:
URL: https://github.com/apache/iceberg/pull/2372#discussion_r636510383



##########
File path: data/src/main/java/org/apache/iceberg/data/DeleteFilter.java
##########
@@ -96,6 +98,29 @@ public Schema requiredSchema() {
     return requiredSchema;
   }
 
+  protected int deleteMarkerIndex() {
+    if (deleteMarkerIndex != null) {
+      return deleteMarkerIndex;
+    }
+
+    int index = 0;
+    for (Types.NestedField field : requiredSchema().columns()) {
+      if (field.fieldId() != MetadataColumns.DELETE_MARK.fieldId()) {
+        index = index + 1;

Review comment:
       this feels a bit fragile to me, looks like it assumes the delete marker is the last metadata column, but if we in the future add another column it would break.




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