cshuo commented on code in PR #19502:
URL: https://github.com/apache/hudi/pull/19502#discussion_r3710465309


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/io/BaseCreateHandle.java:
##########
@@ -133,9 +133,9 @@ public void write() {
     Iterator<String> keyIterator;
     if (hoodieTable.requireSortedRecords()) {
       // Sorting the keys limits the amount of extra memory required for 
writing sorted records.
-      // requireSortedRecords() is true only for HFile base files, which order 
keys by UTF-8 bytes,
-      // not String (UTF-16) order, so sort with the matching comparator.
-      keyIterator = 
recordMap.keySet().stream().sorted(StringUtils.UTF8_LEXICOGRAPHIC_COMPARATOR).iterator();
+      keyIterator = recordMap.keySet().stream()
+          
.sorted(HoodieRecordUtils.getRecordKeyComparator(hoodieTable.getBaseFileFormat()))

Review Comment:
   #19079 has not been included in a released version, and Spark LSM data-table 
support is completed by this PR. MDT remains HFile-based and continues to use 
UTF-8 ordering. Tables created from intermediate master builds may require 
rewriting, but there is no released data-at-rest compatibility requirement.



-- 
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]

Reply via email to