rdblue commented on a change in pull request #2960:
URL: https://github.com/apache/iceberg/pull/2960#discussion_r687043662
##########
File path: spark3/src/main/java/org/apache/iceberg/spark/source/SparkWrite.java
##########
@@ -262,10 +262,16 @@ public void commit(WriterCommitMessage[] messages) {
private class DynamicOverwrite extends BaseBatchWrite {
@Override
public void commit(WriterCommitMessage[] messages) {
+ Iterable<DataFile> files = files(messages);
+ if (Iterables.size(files) == 0) {
Review comment:
What about using `!files.hasNext` instead? I'm not sure we want to
assume that the iterable can be consumed multiple times.
--
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]