cloud-fan commented on code in PR #45064:
URL: https://github.com/apache/spark/pull/45064#discussion_r1482888220
##########
common/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java:
##########
@@ -46,7 +47,7 @@
* <p>
* Note: This is not designed for general use cases, should not be used
outside SQL.
*/
-public final class UTF8String implements Comparable<UTF8String>,
Externalizable, KryoSerializable,
+public final class UTF8String implements Externalizable, KryoSerializable,
Review Comment:
This class has been in Spark for many years, and I'm afraid that many
third-party libraries are already using it and it's better to not make breaking
changes.
How about we keep the `Comparable<UTF8String>` interface, and add comments
to the `compare` function to highlight that it's binary comparison.
To avoid Spark mistakenly calling it for string with collation, we can add
test-only failure if it's called. e.g.
```
public int compareTo(... {
if (Utils.isTesing) throw ...
...
}
```
--
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]