spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xiao Li (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (SPARK-13221) GroupingSets Returns an Incorrect Results
Date Tue, 16 Feb 2016 07:44:18 GMT

     [ https://issues.apache.org/jira/browse/SPARK-13221?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Xiao Li resolved SPARK-13221.
-----------------------------
       Resolution: Resolved
    Fix Version/s: 2.0.0

> GroupingSets Returns an Incorrect Results
> -----------------------------------------
>
>                 Key: SPARK-13221
>                 URL: https://issues.apache.org/jira/browse/SPARK-13221
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.6.0, 2.0.0
>            Reporter: Xiao Li
>            Priority: Critical
>             Fix For: 2.0.0
>
>
> The following query returns a wrong result:
> {code}
> sql("select course, sum(earnings) as sum from courseSales group by course, earnings"
+
>      " grouping sets((), (course), (course, earnings))" +
>      " order by course, sum").show()
> {code}
> Before the fix, the results are like
> {code}
> [null,null]
> [Java,null]
> [Java,20000.0]
> [Java,30000.0]
> [dotNET,null]
> [dotNET,5000.0]
> [dotNET,10000.0]
> [dotNET,48000.0]
> {code}
> After the fix, the results are corrected:
> {code}
> [null,113000.0]
> [Java,20000.0]
> [Java,30000.0]
> [Java,50000.0]
> [dotNET,5000.0]
> [dotNET,10000.0]
> [dotNET,48000.0]
> [dotNET,63000.0]
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message