rdsarvar commented on code in PR #11368: URL: https://github.com/apache/iceberg/pull/11368#discussion_r1808956633
########## spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/procedures/RewriteDataFilesProcedure.java: ########## @@ -107,10 +122,22 @@ public InternalRow[] call(InternalRow args) { String sortOrderString = input.asString(SORT_ORDER_PARAM, null); Map<String, String> options = input.asStringMap(OPTIONS_PARAM, ImmutableMap.of()); String where = input.asString(WHERE_PARAM, null); + String partitionedByString = input.asString(PARTITIONED_BY_PARAM, null); + Boolean createPartitionIfNotExists = + input.asBoolean(CREATE_PARTITION_IF_NOT_EXISTS_PARAM, false); return modifyIcebergTable( tableIdent, table -> { + if (partitionedByString != null || createPartitionIfNotExists) { + Integer partitionSpecId = + checkAndPreparePartitionSpec( + table, partitionedByString, createPartitionIfNotExists, options); + options.put(OUTPUT_SPEC_ID, partitionSpecId.toString()); Review Comment: nitpick: I guess I could set this inside of the `checkAndPreparePartitionSpec` method -- 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