uros-db commented on code in PR #47154:
URL: https://github.com/apache/spark/pull/47154#discussion_r1723068016
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/Mode.scala:
##########
@@ -50,17 +50,19 @@ case class Mode(
override def inputTypes: Seq[AbstractDataType] = Seq(AnyDataType)
override def checkInputDataTypes(): TypeCheckResult = {
- if (UnsafeRowUtils.isBinaryStable(child.dataType) ||
child.dataType.isInstanceOf[StringType]) {
+ if (UnsafeRowUtils.isBinaryStable(child.dataType) ||
+ !child.dataType.existsRecursively(f => f.isInstanceOf[MapType] &&
+ !UnsafeRowUtils.isBinaryStable(f))) {
/*
* The Mode class uses collation awareness logic to handle string data.
* Complex types with collated fields are not yet supported.
Review Comment:
```suggestion
* All complex types except MapType with collated fields are
supported.
```
--
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]