Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/21720#discussion_r200518399
--- Diff: sql/core/src/test/resources/sql-tests/inputs/pivot.sql ---
@@ -88,12 +93,12 @@ PIVOT (
);
-- pivot with aliases and projection
-SELECT 2012_s, 2013_s, 2012_a, 2013_a, c FROM (
+SELECT firstYear_s, secondYear_s, firstYear_a, secondYear_a, c FROM (
SELECT year y, course c, earnings e FROM courseSales
)
PIVOT (
sum(e) s, avg(e) a
- FOR y IN (2012, 2013)
+ FOR y IN (2012 as firstYear, 2013 secondYear)
--- End diff --
can we keep the original query? add a new one for this?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]