nastra commented on code in PR #5780:
URL: https://github.com/apache/iceberg/pull/5780#discussion_r974929474
##########
api/src/test/java/org/apache/iceberg/metrics/TestScanReport.java:
##########
@@ -66,11 +83,12 @@ public void fromEmptyScanMetrics() {
Schema projection =
new Schema(Types.NestedField.required(1, "c1", Types.StringType.get(),
"c1"));
ScanReport scanReport =
- ScanReport.builder()
- .withTableName(tableName)
- .withProjection(projection)
- .withFilter(Expressions.alwaysTrue())
- .fromScanMetrics(ScanReport.ScanMetrics.NOOP)
+ ImmutableScanReport.builder()
+ .tableName(tableName)
+ .snapshotId(-1L)
Review Comment:
we could also add validation to make sure snapshotId is always > 0. All that
would be required is adding the below method to `ScanReport`:
```
@Check
default void check() {
Preconditions.checkArgument(snapshotId() > 0, "...");
}
```
--
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]