rdblue commented on a change in pull request #2829:
URL: https://github.com/apache/iceberg/pull/2829#discussion_r731130394
##########
File path:
spark/src/main/java/org/apache/iceberg/spark/actions/BaseRewriteDataFilesSparkAction.java
##########
@@ -100,12 +105,29 @@ protected Table table() {
*/
protected abstract BinPackStrategy binPackStrategy();
+ /**
+ * The framework specific {@link SortStrategy}
+ */
+ protected abstract SortStrategy sortStrategy();
+
@Override
public RewriteDataFiles binPack() {
this.strategy = binPackStrategy();
return this;
}
+ @Override
+ public RewriteDataFiles sort(SortOrder sortOrder) {
+ this.strategy = sortStrategy().sortOrder(sortOrder);
Review comment:
Should we add a check that this is only replacing the default `binPack`
strategy? Right now, we would allow calling
`binPack().sort(SortOrder...build()).execuite()` which would be strange.
--
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]