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_r276756969
##########
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:
Thanks for the context. Let's break these into smaller methods to reduce the
complexity.
I think what this change actually did was reduce the complexity in byte code
(the block is now a lambda), while not actually solving the problem. The code
is still looping here, where it was before. The code is just broken into a
different object in byte code only.
----------------------------------------------------------------
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]