aokolnychyi commented on a change in pull request #2500:
URL: https://github.com/apache/iceberg/pull/2500#discussion_r617900080
##########
File path: spark3/src/main/java/org/apache/iceberg/spark/source/SparkWrite.java
##########
@@ -367,6 +375,26 @@ private void commitWithSnapshotIsolation(OverwriteFiles
overwriteFiles,
}
}
+ private class RewriteFiles extends BaseBatchWrite {
+ private final String fileSetID;
+
+ private RewriteFiles(String fileSetID) {
+ this.fileSetID = fileSetID;
+ }
+
+ @Override
+ public void commit(WriterCommitMessage[] messages) {
+ FileRewriteCoordinator coordinator = FileRewriteCoordinator.get();
+
+ Set<DataFile> newDataFiles =
Sets.newHashSetWithExpectedSize(messages.length);
Review comment:
There may be more files than the commit messages but it will be rare and
it is still better to start with a rough estimate rather than with a small
value and do multiple resizing steps. I think we will have at most one resizing
in the current logic.
--
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]