[ https://issues.apache.org/jira/browse/SPARK-25505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16631700#comment-16631700 ]
Apache Spark commented on SPARK-25505: -------------------------------------- User 'mgaido91' has created a pull request for this issue: https://github.com/apache/spark/pull/22582 > The output order of grouping columns in Pivot is different from the input > order > ------------------------------------------------------------------------------- > > Key: SPARK-25505 > URL: https://issues.apache.org/jira/browse/SPARK-25505 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 2.4.0 > Reporter: Maryann Xue > Assignee: Maryann Xue > Priority: Minor > Fix For: 2.4.0 > > > For example, > {code} > SELECT * FROM ( > SELECT course, earnings, "a" as a, "z" as z, "b" as b, "y" as y, "c" as c, > "x" as x, "d" as d, "w" as w > FROM courseSales > ) > PIVOT ( > sum(earnings) > FOR course IN ('dotNET', 'Java') > ) > {code} > The output columns should be "a, z, b, y, c, x, d, w, ..." but now it is "a, > b, c, d, w, x, y, z, ..." -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org