uros-db commented on code in PR #47154:
URL: https://github.com/apache/spark/pull/47154#discussion_r1685753351


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/Mode.scala:
##########
@@ -86,6 +71,77 @@ case class Mode(
     buffer
   }
 
+  private def recursivelyGetBufferForArrayType(
+      a: ArrayType,
+      data: ArrayData): Seq[Any] = {
+    (0 until data.numElements()).map { i =>
+      data.get(i, a.elementType) match {
+        case k: UTF8String if !UnsafeRowUtils.isBinaryStable(a.elementType)
+          => CollationFactory.getCollationKey(k, 
a.elementType.asInstanceOf[StringType].collationId)

Review Comment:
   do we need a `case` for `StringType`? seems to me that array<string collate 
...> should generally be an ArrayType<StringType>



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