GideonPotok commented on code in PR #46597: URL: https://github.com/apache/spark/pull/46597#discussion_r1610561627
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/Mode.scala: ########## @@ -48,6 +49,22 @@ case class Mode( override def inputTypes: Seq[AbstractDataType] = Seq(AnyDataType) + override def checkInputDataTypes(): TypeCheckResult = { + val defaultCheck = super.checkInputDataTypes() + if (defaultCheck.isFailure) { + defaultCheck + } else { + child.dataType match { + case _: StructType | _: ArrayType if !UnsafeRowUtils.isBinaryStable(child.dataType) => + TypeCheckResult.TypeCheckFailure( + s"Input to function mode was a complex type" + + s" with non-binary collated fields," + + s" which is not yet supported by mode.") + case _ => TypeCheckResult.TypeCheckSuccess + } Review Comment: @uros-db done -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org