[
https://issues.apache.org/jira/browse/SPARK-21980?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Feng Zhu updated SPARK-21980:
-----------------------------
Description:
In our spark-2.1 cluster, when users sumbit queries like
{code:sql}
select a, grouping(b), sum(c) from table group by a, b with cube
{code}
It works well. However, when the query is
{code:sql}
select a, grouping(B), sum(c) from table group by a, b with cube
{code}
We will get the exception:
{code:java}
org.apache.spark.sql.AnalysisException: Column of grouping (B#11) can't be
found in grouping columns a#10,b#11
{code}
The root cause is the replaceGroupingFunc's incorrect logic in
ResolveGroupingAnalytics
rule. It indexes the column without resolver.
was:
In our spark-2.1 cluster, when users sumbit queries like
{code:sql}
select a, grouping(b), sum(c) from table group by a, b with cube
{code}
It works well. However, when the query is
{code:sql}
select a, grouping(B), sum(c) from table group by a, b with cube
{code}
We will get the exception:
{code:java}
org.apache.spark.sql.AnalysisException: Column of grouping (B#11) can't be
found in grouping columns a#10,b#11
{code}
The root cause is the replaceGroupingFunc's incorrect logic in
ResolveGroupingAnalytics
rule
> References in grouping functions should be indexed with resolver
> ----------------------------------------------------------------
>
> Key: SPARK-21980
> URL: https://issues.apache.org/jira/browse/SPARK-21980
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 2.1.0, 2.1.1, 2.2.0
> Reporter: Feng Zhu
>
> In our spark-2.1 cluster, when users sumbit queries like
> {code:sql}
> select a, grouping(b), sum(c) from table group by a, b with cube
> {code}
> It works well. However, when the query is
> {code:sql}
> select a, grouping(B), sum(c) from table group by a, b with cube
> {code}
> We will get the exception:
> {code:java}
> org.apache.spark.sql.AnalysisException: Column of grouping (B#11) can't be
> found in grouping columns a#10,b#11
> {code}
> The root cause is the replaceGroupingFunc's incorrect logic in
> ResolveGroupingAnalytics
> rule. It indexes the column without resolver.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]