Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-32344

Unevaluable expr is set to FIRST/LAST ignoreNullsExpr in distinct aggregates

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.2.3, 2.3.4, 2.4.6, 3.0.0
    • 2.4.7, 3.0.1, 3.1.0
    • SQL
    • None

    Description

      scala> sql("SELECT FIRST(DISTINCT v) FROM VALUES 1, 2, 3 t(v)").show()
      ...
      Caused by: java.lang.UnsupportedOperationException: Cannot evaluate expression: false#37
        at org.apache.spark.sql.catalyst.expressions.Unevaluable$class.eval(Expression.scala:258)
        at org.apache.spark.sql.catalyst.expressions.AttributeReference.eval(namedExpressions.scala:226)
        at org.apache.spark.sql.catalyst.expressions.aggregate.First.ignoreNulls(First.scala:68)
        at org.apache.spark.sql.catalyst.expressions.aggregate.First.updateExpressions$lzycompute(First.scala:82)
        at org.apache.spark.sql.catalyst.expressions.aggregate.First.updateExpressions(First.scala:81)
        at org.apache.spark.sql.execution.aggregate.HashAggregateExec$$anonfun$15.apply(HashAggregateExec.scala:268)
      

      Attachments

        Activity

          People

            maropu Takeshi Yamamuro
            maropu Takeshi Yamamuro
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: