infvg commented on code in PR #13199:
URL: https://github.com/apache/gluten/pull/13199#discussion_r4270094047
##########
gluten-iceberg/src/main/scala/org/apache/iceberg/spark/source/IcebergWriteUtil.scala:
##########
@@ -114,7 +119,27 @@ object IcebergWriteUtil {
}
def getSortOrder(write: Write): SortOrder = {
- getTable(write).sortOrder()
+ if (write.asInstanceOf[SparkWrite].requiredOrdering().nonEmpty) {
+ getTable(write).sortOrder()
Review Comment:
The table’s sort order tells us how the data should be sorted, but this is
for the individual write which can be unsorted. So if we return the table's
sort order it will just label the files sorted even if they aren't
--
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]