jackye1995 commented on code in PR #9731:
URL: https://github.com/apache/iceberg/pull/9731#discussion_r1500220133


##########
spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/actions/RewriteManifestsSparkAction.java:
##########
@@ -160,6 +164,34 @@ public RewriteManifestsSparkAction stagingLocation(String 
newStagingLocation) {
     return this;
   }
 
+  /**
+   * Supply an optional set of partition transform column names to sort the 
rewritten manifests by.
+   * Expects exact transformed column names used for partitioning; not the raw 
column names used for
+   * partitioning. E.G. supply 'data_bucket' and not 'data' for a partition 
defined as bucket(N,
+   * data)
+   *
+   * @param partitionSortOrder - Order of partitions to sort manifests by
+   * @return this action
+   */
+  @Override
+  public RewriteManifestsSparkAction sort(List<String> partitionSortOrder) {
+    // Collect set of allowable partition columns to sort on
+    Set<String> availablePartitionNames =
+        
spec.fields().stream().map(PartitionField::name).collect(Collectors.toSet());
+
+    // Check if these partitions are included in the spec

Review Comment:
   ```suggestion
       // Check if these partition fields are included in the spec
   ```



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to