rdblue commented on a change in pull request #153: [Baseline] Apply baseline 
linting to iceberg-core
URL: https://github.com/apache/incubator-iceberg/pull/153#discussion_r276755931
 
 

 ##########
 File path: core/src/main/java/org/apache/iceberg/MergingSnapshotUpdate.java
 ##########
 @@ -198,9 +197,7 @@ protected void add(DataFile file) {
     try {
       if (newFiles.size() > 0) {
         // add all of the new files to the summary builder
-        for (DataFile file : newFiles) {
-          summaryBuilder.addedFile(spec, file);
-        }
+        newFiles.forEach(file -> summaryBuilder.addedFile(spec, file));
 
 Review comment:
   Just wondering if there's a penalty for changing iteration from a loop to a 
lambda call. If these are equivalent in byte code, then we can just pick the 
style we prefer. If there are times when the labmda is going to be slower, then 
it makes sense to continue using the old for syntax.
   
   I'm also reluctant to make this change because it seems like it is mostly 
churn. The two are equivalent, why change existing code and touch more lines 
with this commit?

----------------------------------------------------------------
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]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to