rdblue commented on a change in pull request #1867:
URL: https://github.com/apache/iceberg/pull/1867#discussion_r536923570
##########
File path:
flink/src/main/java/org/apache/iceberg/flink/sink/IcebergStreamWriter.java
##########
@@ -62,7 +62,7 @@ public void open() {
@Override
public void prepareSnapshotPreBarrier(long checkpointId) throws Exception {
// close all open files and emit files to downstream committer operator
- for (DataFile dataFile : writer.complete()) {
+ for (DataFile dataFile : writer.complete().dataFiles()) {
Review comment:
Actually, it looks like this change happened in quite a few places. What
do you think about returning `DataFile[]` from a new `dataFiles()` method and
doing the precondition check for 0 delete files in that method?
Then we could update all of the places that call `complete().dataFiles()` to
just `dataFiles()` and ensure that the check is done whenever `dataFiles()` is
called to get the result rather than `complete`.
----------------------------------------------------------------
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]