Skip to content
Snippets Groups Projects
Commit 5dbcd4fc authored by Andrew Ray's avatar Andrew Ray Committed by Herman van Hovell
Browse files

[SPARK-17760][SQL] AnalysisException with dataframe pivot when groupBy column is not attribute


## What changes were proposed in this pull request?

Fixes AnalysisException for pivot queries that have group by columns that are expressions and not attributes by substituting the expressions output attribute in the second aggregation and final projection.

## How was this patch tested?

existing and additional unit tests

Author: Andrew Ray <ray.andrew@gmail.com>

Closes #16177 from aray/SPARK-17760.

(cherry picked from commit f1fca81b)
Signed-off-by: default avatarHerman van Hovell <hvanhovell@databricks.com>
parent 4432a2a8
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment