rdblue commented on a change in pull request #3977:
URL: https://github.com/apache/iceberg/pull/3977#discussion_r794848646
##########
File path: core/src/main/java/org/apache/iceberg/io/PartitionedFanoutWriter.java
##########
@@ -60,11 +93,18 @@ public void write(T row) throws IOException {
@Override
public void close() throws IOException {
- if (!writers.isEmpty()) {
- for (PartitionKey key : writers.keySet()) {
- writers.get(key).close();
+ ConcurrentMap<PartitionKey, RollingFileWriter> writersMap =
writers.asMap();
+ if (writersMap.size() > 0) {
Review comment:
Why not use `isEmpty` like before?
--
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]