You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2018/09/21 15:42:00 UTC

[jira] [Commented] (SPARK-25505) The output order of grouping columns in Pivot is different from the input order

    [ https://issues.apache.org/jira/browse/SPARK-25505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16623784#comment-16623784 ] 

Apache Spark commented on SPARK-25505:
--------------------------------------

User 'maryannxue' has created a pull request for this issue:
https://github.com/apache/spark/pull/22519

> 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
>            Priority: Minor
>
> 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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org