rdblue commented on code in PR #18884:
URL: https://github.com/apache/iceberg/pull/18884#discussion_r4569371376
##########
core/src/main/java/org/apache/iceberg/FilePlanner.java:
##########
@@ -87,14 +88,14 @@ FilePlanner filterData(Expression expr) {
return this;
}
- FilePlanner projectStats(int... fieldIds) {
+ FilePlanner projectStats(Set<Integer> fieldIds) {
Review Comment:
Same here. This should be a new method:
```java
FilePlanner projectStats(int... fieldIds) {
Preconditions.checkArgument(fieldIds != null, "Invalid field IDs: null");
return projectStats(ArrayUtil.toIntList(fieldIds));
}
FilePlanner projectStats(Iterable<Integer> fieldIds) {
Preconditions.checkArgument(fieldIds != null, "Invalid field IDs: null");
this.statsFieldIds = Sets.newLinkedHashSet(fieldIds);
return this;
}
```
##########
core/src/main/java/org/apache/iceberg/FilePlanner.java:
##########
@@ -87,14 +88,14 @@ FilePlanner filterData(Expression expr) {
return this;
}
- FilePlanner projectStats(int... fieldIds) {
+ FilePlanner projectStats(Set<Integer> fieldIds) {
Preconditions.checkArgument(fieldIds != null, "Invalid field IDs: null");
- this.statsFieldIds = Arrays.copyOf(fieldIds, fieldIds.length);
+ this.statsFieldIds = ImmutableSet.copyOf(fieldIds);
return this;
}
- FilePlanner ignoreResiduals() {
- this.ignoreResiduals = true;
+ FilePlanner ignoreResiduals(boolean shouldIgnoreResiduals) {
+ this.ignoreResiduals = shouldIgnoreResiduals;
Review Comment:
This should be a new method instead of changing the API.
```java
FilePlanner ignoreResiduals(boolean shouldIgnoreResiduals) {
this.ignoreResiduals = shouldIgnoreResiduals;
return this;
}
```
--
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]