GitHub user ssimeonov opened a pull request:
https://github.com/apache/spark/pull/23075
[SPARK-26084][SQL] Fixes unresolved AggregateExpression.references exception
## 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](https://issues.apache.org/jira/browse/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?
Local tests pass. I added no new tests as (a) the new behavior has no
failing case and (b) this is a simple refactoring.
@hvanhovell
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/swoop-inc/spark ss_SPARK-26084
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/23075.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #23075
----
commit 178f0a5dff9f7eb8887ed711727b2f83af40ae8a
Author: Simeon Simeonov <sim@...>
Date: 2018-11-18T01:05:07Z
[SPARK-26084][SQL] Fixes unresolved AggregateExpression.references exception
Implements the solution proposed in
[SPARK-26084](https://issues.apache.org/jira/browse/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`.
I added no new tests as (a) the new behavior has no failing case and (b)
this is a simple refactoring.
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]