You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/02/07 15:06:57 UTC

[GitHub] [spark] steven-aerts commented on a change in pull request #35426: [SPARK-38130][SQL] Remove array_sort orderable entries check

steven-aerts commented on a change in pull request #35426:
URL: https://github.com/apache/spark/pull/35426#discussion_r800750011



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/higherOrderFunctions.scala
##########
@@ -388,18 +388,13 @@ case class ArraySort(
     checkArgumentDataTypes() match {
       case TypeCheckResult.TypeCheckSuccess =>
         argument.dataType match {
-          case ArrayType(dt, _) if RowOrdering.isOrderable(dt) =>
+          case ArrayType(_, _) =>

Review comment:
       Hi @srowen ,
   currently this error message is never shown in the cases where it is relevant.  As the error message on `LessThan` (see above) takes precedence.
   
   I did some experiments but never got it right.  I ran into two problems:
   * `checkInputDataTypes` is always called before the `checkInputDataTypes` on the `array_sort` or the lambda function.
   * extending `LambdaFunction` is not possible because it is a `case class` and the `higherOrderFunctions` can only work with `LambdaFunction` objects.
   
   If somebody has an idea on how to show the error before `checkInputDataTypes` of `LessThan` is hit I am happy to try it out.
   
   Steven
   
   




-- 
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-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org