dbatomic commented on code in PR #45592:
URL: https://github.com/apache/spark/pull/45592#discussion_r1535377436


##########
common/unsafe/src/main/java/org/apache/spark/sql/catalyst/util/CollationFactory.java:
##########
@@ -68,23 +68,30 @@ public static class Collation {
      * Binary collation implies that UTF8Strings are considered equal only if 
they are
      * byte for byte equal. All accent or case-insensitive collations are 
considered non-binary.
      */
-    public final boolean isBinaryCollation;
+    public final boolean supportsBinaryEquality;
+    /**
+     * Binary collation implies that UTF8Strings are compared on byte level.

Review Comment:
   Can you extend a bit comment description of these two fields?
   
   E.g.:
   1) Update comment for supportsBinaryEquality to reflect name change
   2) Update comment in supportsBinaryOrdering.
   3) Say that supportsBinaryEq means that it's safe to call binaryEquals in 
UTF8String, which is more performant.
   4) Say that supportsBinaryOrdering means that its safe to call binaryCompare.
   5) Say that supportsBinaryOrdering implies supportsBinaryEquality (we can 
add an assert in constructor for this).



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

Reply via email to