uros-db commented on code in PR #46526:
URL: https://github.com/apache/spark/pull/46526#discussion_r1598012310
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/Mode.scala:
##########
@@ -86,6 +102,14 @@ case class Mode(
}.getOrElse(buffer.maxBy(_._2))._1
}
+ private def isCollatedString(child: Expression): Boolean = {
+ child.dataType match {
+ case s: StringType if s.collationId !=
CollationFactory.UTF8_BINARY_COLLATION_ID => true
+ // maybe use supportsBinaryEquality or something else
+ case _ => false
+ }
+ }
+
Review Comment:
we generally shouldn't use collationIds to check equality, you correctly
noticed that we should go with `supportsBinaryEquality` instead - you can
remove this method, and perform the check above as suggested
--
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]