RussellSpitzer commented on a change in pull request #2932:
URL: https://github.com/apache/iceberg/pull/2932#discussion_r684328767
##########
File path:
core/src/main/java/org/apache/iceberg/actions/BaseRewriteDataFilesAction.java
##########
@@ -271,20 +272,30 @@ public RewriteDataFilesActionResult execute() {
private void replaceDataFiles(Iterable<DataFile> deletedDataFiles,
Iterable<DataFile> addedDataFiles,
long startingSnapshotId) {
try {
- RewriteFiles rewriteFiles = table.newRewrite()
- .validateFromSnapshot(startingSnapshotId)
- .rewriteFiles(Sets.newHashSet(deletedDataFiles),
Sets.newHashSet(addedDataFiles));
- commit(rewriteFiles);
+ doReplace(deletedDataFiles, addedDataFiles, startingSnapshotId);
Review comment:
I'm not sure if the modules work out correctly for this, but it may make
sense to use RewriteDataFilesCommitter
(https://github.com/apache/iceberg/blob/a1bd63d56751999ecee89b871992d7bac395fd52/core/src/main/java/org/apache/iceberg/actions/RewriteDataFilesCommitManager.java#L57)
here and re-use the commit code from the new path.
--
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]