openinx commented on a change in pull request #1624:
URL: https://github.com/apache/iceberg/pull/1624#discussion_r508183953
##########
File path:
spark/src/main/java/org/apache/iceberg/actions/RewriteDataFilesAction.java
##########
@@ -112,170 +54,35 @@ protected RewriteDataFilesAction self() {
@Override
protected Table table() {
- return table;
- }
-
- /**
- * Pass a PartitionSpec id to specify which PartitionSpec should be used in
DataFile rewrite
- *
- * @param specId PartitionSpec id to rewrite
- * @return this for method chaining
- */
- public RewriteDataFilesAction outputSpecId(int specId) {
- Preconditions.checkArgument(table.specs().containsKey(specId), "Invalid
spec id %d", specId);
- this.spec = table.specs().get(specId);
- return this;
+ return getTable();
Review comment:
We usually don't use `getTable` in iceberg code because the prefix `get`
does not have much meaning. It's good to use `protected Table table()` directly
here.
Besides, I think we could just move the `protected Table table()` to the
parent class, don't have to override it here then.
----------------------------------------------------------------
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]