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

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

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.3, 2.3.4, 2.4.6, 3.0.0
    • Fix Version/s: 2.4.7, 3.0.1, 3.1.0
    • Component/s: SQL
    • Labels:
      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

            • Assignee:
              maropu Takeshi Yamamuro
              Reporter:
              maropu Takeshi Yamamuro
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: