amogh-jahagirdar commented on code in PR #7651:
URL: https://github.com/apache/iceberg/pull/7651#discussion_r1199232563
##########
core/src/main/java/org/apache/iceberg/actions/RewritePositionDeletesGroup.java:
##########
@@ -38,12 +38,18 @@
public class RewritePositionDeletesGroup {
private final FileGroupInfo info;
private final List<PositionDeletesScanTask> tasks;
+ private final long maxRewrittenDataSequenceNumber;
private Set<DeleteFile> addedDeleteFiles = Collections.emptySet();
public RewritePositionDeletesGroup(FileGroupInfo info,
List<PositionDeletesScanTask> tasks) {
this.info = info;
this.tasks = tasks;
+ this.maxRewrittenDataSequenceNumber =
+ tasks.stream()
+ .map(t -> t.file().dataSequenceNumber())
+ .max(Long::compare)
+ .orElseThrow(() -> new IllegalArgumentException("Empty file
group"));
Review Comment:
Nit: Could we just Preconditions.checkArgument the passed in task list to
make sure it's not empty?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]