mccheah 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_r274062236
 
 

 ##########
 File path: core/src/main/java/org/apache/iceberg/MergingSnapshotUpdate.java
 ##########
 @@ -217,22 +214,20 @@ protected void add(DataFile file) {
         // open all of the manifest files in parallel, use index to avoid 
reordering
         Tasks.range(filtered.length)
             .stopOnFailure().throwFailureWhenFinished()
-            .executeWith(getWorkerPool())
+            .executeWith(ThreadPools.getWorkerPool())
             .run(index -> {
-              ManifestFile manifest = filterManifest(
-                  deleteExpression, metricsEvaluator,
-                  manifests.get(index));
+              ManifestFile manifest = filterManifest(metricsEvaluator, 
manifests.get(index));
               filtered[index] = manifest;
             }, IOException.class);
 
-        for (ManifestFile manifest : filtered) {
-          PartitionSpec spec = ops.current().spec(manifest.partitionSpecId());
+        Arrays.stream(filtered).forEach(manifest -> {
 
 Review comment:
   I'm using stream APIs in a bunch of places in order to reduce the 
[Cyclomatic 
Complexity.](http://checkstyle.sourceforge.net/config_metrics.html#CyclomaticComplexity)
 Cyclomatic Complexity is 12 here, thus placing a ceiling on the number of 
branch statements that are in the code. For loops, to my understanding, are 
considered as branching code that count towards the cyclomatic complexity. I'm 
open to exploring keeping for-each loops and looking at how we can reduce the 
cyclomatic complexity in other ways (e.g. more broken out methods).

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