uros-db commented on code in PR #46597:
URL: https://github.com/apache/spark/pull/46597#discussion_r1608242763
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/Mode.scala:
##########
@@ -48,6 +49,33 @@ case class Mode(
override def inputTypes: Seq[AbstractDataType] = Seq(AnyDataType)
+ override def checkInputDataTypes(): TypeCheckResult = {
+ checkDataType(child.dataType)
Review Comment:
related to the comment below, I think you may just go ahead and use
something we've already implemented - like
`UnsafeRowUtils.isBinaryStable(child.dataType)`
also, you'll likely need to allow `child.dataType.isInstanceOf[StringType]`
- since we do want to allow all binary stable types, as well as all string
types (some of them might be binary "unstable" - such as UTF8_BINARY_LCASE or
UNICODE_CI)
--
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]