1. [SPARK-26084][SQL] Fixes unresolved AggregateExpression.references (commit: 0fb830c49a09d292249496fc379d130e7097526e) (details)
Commit 0fb830c49a09d292249496fc379d130e7097526e by hvanhovell
[SPARK-26084][SQL] Fixes unresolved AggregateExpression.references
## What changes were proposed in this pull request?
This PR fixes an exception in `AggregateExpression.references` called on
unresolved expressions. It implements the solution proposed in
[SPARK-26084](, a
minor refactoring that removes the unnecessary dependence on
`AttributeSet.toSeq`, which requires expression IDs and, therefore, can
only execute successfully for resolved expressions.
The refactored implementation is both simpler and faster, eliminating
the conversion of a `Set` to a
`Seq` and back to `Set`.
## How was this patch tested?
Added a new test based on the failing case in
Closes #23075 from ssimeonov/ss_SPARK-26084.
Authored-by: Simeon Simeonov <> Signed-off-by: Herman
van Hovell <>
(cherry picked from commit db136d360e54e13f1d7071a0428964a202cf7e31)
Signed-off-by: Herman van Hovell <>
(commit: 0fb830c49a09d292249496fc379d130e7097526e)
The file was modifiedsql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/interfaces.scala (diff)
The file was addedsql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/aggregate/AggregateExpressionSuite.scala