You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Harish Butani (JIRA)" <ji...@apache.org> on 2015/09/18 05:46:04 UTC

[jira] [Closed] (SPARK-10606) Cube/Rollup/GrpSet doesn't create the correct plan when group by is on something other than an AttributeReference

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

Harish Butani closed SPARK-10606.
---------------------------------
    Resolution: Duplicate

> Cube/Rollup/GrpSet doesn't create the correct plan when group by is on something other than an AttributeReference
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-10606
>                 URL: https://issues.apache.org/jira/browse/SPARK-10606
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>            Reporter: Harish Butani
>            Priority: Critical
>
> Consider the following table: t(a : String, b : String) and the query
> {code}
> select a, concat(b, '1'), count(*)
> from t
> group by a, concat(b, '1') with cube
> {code}
> The projections in the Expand operator are not setup correctly. The expand logic in Analyzer:expand is comparing grouping expressions against child.output. So {{concat(b, '1')}} is never mapped to a null Literal.  
> A simple fix is to add a Rule to introduce a Projection below the Cube/Rollup/GrpSet operator that additionally projects the   groupingExpressions that are missing in the child.
> Marking this as Critical, because you get wrong results.



--
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