wombatu-kun commented on code in PR #12772:
URL: https://github.com/apache/hudi/pull/12772#discussion_r2113303215


##########
hudi-common/src/main/java/org/apache/hudi/common/engine/HoodieReaderContext.java:
##########
@@ -361,6 +361,17 @@ public Comparable convertValueToEngineType(Comparable 
value) {
     return value;
   }
 
+  /**
+   * Compares two values.
+   * As [SPARK-46832] UTF8String doesn't support compareTo anymore, we need to 
have engine-specific implementations.
+   * @param a first value that is compared to
+   * @param b second value
+   * @return a negative integer, zero, or a positive integer as first object 
is less than, equal to, or greater than the second.
+   */
+  public int compareValues(Comparable a, Comparable b) {
+    return a.compareTo(b);
+  }

Review Comment:
   I think, we can not get rid of this API because this class is in 
`hudi-common` module, where we don't know neither `UTF8String` (Spark's inner 
class) nor `HoodieUTF8String` (Hudi's own class located in 
`hudi-spark-client`), so we can not wrap `UTF8String` with `HoodieUTF8String` 
here.



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