atognolag commented on code in PR #38406:
URL: https://github.com/apache/beam/pull/38406#discussion_r3208811128
##########
sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/WritePartitionedRowsToFiles.java:
##########
@@ -130,7 +130,10 @@ public void processElement(
RecordWriter writer =
new RecordWriter(table, destination.getFileFormat(), fileName,
partitionData);
try {
- for (Row row : element.getValue()) {
+ Iterable<Row> sortedOrUnsortedRows =
+ IcebergRowSorter.sortRows(
+ element.getValue(), table.sortOrder(), table.schema(),
dataSchema);
+ for (Row row : sortedOrUnsortedRows) {
Review Comment:
IcebergRowSorter.sortRows() will only sort if the table schema defines any
sort configuration or else, it does nothing.
--
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]