MaxGekk commented on code in PR #50590: URL: https://github.com/apache/spark/pull/50590#discussion_r2055996285
########## sql/core/src/test/scala/org/apache/spark/sql/DataFrameAggregateSuite.scala: ########## @@ -1397,7 +1397,7 @@ class DataFrameAggregateSuite extends QueryTest "paramIndex" -> "second", "inputSql" -> "\"a\"", "inputType" -> "\"STRING\"", - "requiredType" -> "\"INTEGRAL\""), + "requiredType" -> "\"INT\""), Review Comment: Why the requirement become more strict? ########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/complexTypeExtractors.scala: ########## @@ -314,6 +315,30 @@ case class GetArrayItem( }) } + override def checkInputDataTypes(): TypeCheckResult = { + (left.dataType, right.dataType) match { + case (_: ArrayType, e2) if !e2.isInstanceOf[IntegralType] => + DataTypeMismatch( + errorSubClass = "UNEXPECTED_INPUT_TYPE", + messageParameters = Map( + "paramIndex" -> ordinalNumber(1), + "requiredType" -> toSQLType(IntegerType), Review Comment: Why it is `IntegerType` if you check for `IntegralType` above? -- 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