RussellSpitzer commented on a change in pull request #1427:
URL: https://github.com/apache/iceberg/pull/1427#discussion_r483953886
##########
File path: core/src/main/java/org/apache/iceberg/IncrementalDataTableScan.java
##########
@@ -74,7 +74,7 @@ public TableScan appendsAfter(long newFromSnapshotId) {
Set<Long> snapshotIds = Sets.newHashSet(Iterables.transform(snapshots,
Snapshot::snapshotId));
Set<ManifestFile> manifests = FluentIterable
.from(snapshots)
- .transformAndConcat(s -> s.dataManifests())
+ .transformAndConcat(Snapshot::dataManifests)
Review comment:
This is confusing. The this::reference is a call to the method within
the instance of the host class, not the instance within the stream.
For example
```java
class Actions {
void bark( Dog dog) {}
void barks ( List<Dog> dogs){
Dogs.stream.foreach(this::bark); // x -> this.bark(x)
}
```
Vs using the class name which applies the method of the stream's instance to
itself.
```java
class Actions{
class Dog {
void bark() {}
}
void barks ( List<Dog> dogs){
Dogs.stream.foreach(Dog::bark); // Dog x -> x.bark()
}
```
https://docs.oracle.com/javase/tutorial/java/javaOO/methodreferences.html
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]