RussellSpitzer commented on code in PR #12840: URL: https://github.com/apache/iceberg/pull/12840#discussion_r2054786400
########## spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/actions/RewriteManifestsSparkAction.java: ########## @@ -251,12 +282,40 @@ private List<ManifestFile> writeUnpartitionedManifests( private List<ManifestFile> writePartitionedManifests( ManifestContent content, Dataset<Row> manifestEntryDF, int numManifests) { + // Extract desired clustering criteria into a dedicated column + Dataset<Row> clusteredManifestEntryDF; + + if (partitionFieldClustering != null) { + LOG.info( + "Clustering manifests for specId {} by partition columns by {} ", + spec.specId(), + partitionFieldClustering); + + // Map the top level partition column names to the column name referenced within the manifest + // entry dataframe + Column[] actualPartitionColumns = + partitionFieldClustering.stream() + .map(p -> col("data_file.partition." + p)) Review Comment: We should probably be using the constants for these fields rather than the raw string -- 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