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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]