spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacek Laskowski (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SPARK-20320) AnalysisException: Columns of grouping_id (count(value#17L)) does not match grouping columns (count(value#17L))
Date Thu, 13 Apr 2017 09:47:41 GMT

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

Jacek Laskowski updated SPARK-20320:
------------------------------------
       Shepherd: Davies Liu  (was: Herman van Hovell)
    Description: 
I'm not questioning the {{AnalysisException}} (which I don't know whether should be reported
or not), but the exception message that tells...nothing helpful.

{code}
val records = spark.range(5).flatMap(n => Seq.fill(n.toInt)(n))
scala> records.cube(count("value")).agg(grouping_id(count("value"))).queryExecution.logical
org.apache.spark.sql.AnalysisException: Columns of grouping_id (count(value#17L)) does not
match grouping columns (count(value#17L));
  at org.apache.spark.sql.catalyst.analysis.Analyzer$ResolveGroupingAnalytics$$anonfun$org$apache$spark$sql$catalyst$analysis$Analyzer$ResolveGroupingAnalytics$$replaceGroupingFunc$1.applyOrElse(Analyzer.scala:313)
  at org.apache.spark.sql.catalyst.analysis.Analyzer$ResolveGroupingAnalytics$$anonfun$org$apache$spark$sql$catalyst$analysis$Analyzer$ResolveGroupingAnalytics$$replaceGroupingFunc$1.applyOrElse(Analyzer.scala:308)
{code}

> AnalysisException: Columns of grouping_id (count(value#17L)) does not match grouping
columns (count(value#17L))
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-20320
>                 URL: https://issues.apache.org/jira/browse/SPARK-20320
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.2.0
>            Reporter: Jacek Laskowski
>            Priority: Minor
>
> I'm not questioning the {{AnalysisException}} (which I don't know whether should be reported
or not), but the exception message that tells...nothing helpful.
> {code}
> val records = spark.range(5).flatMap(n => Seq.fill(n.toInt)(n))
> scala> records.cube(count("value")).agg(grouping_id(count("value"))).queryExecution.logical
> org.apache.spark.sql.AnalysisException: Columns of grouping_id (count(value#17L)) does
not match grouping columns (count(value#17L));
>   at org.apache.spark.sql.catalyst.analysis.Analyzer$ResolveGroupingAnalytics$$anonfun$org$apache$spark$sql$catalyst$analysis$Analyzer$ResolveGroupingAnalytics$$replaceGroupingFunc$1.applyOrElse(Analyzer.scala:313)
>   at org.apache.spark.sql.catalyst.analysis.Analyzer$ResolveGroupingAnalytics$$anonfun$org$apache$spark$sql$catalyst$analysis$Analyzer$ResolveGroupingAnalytics$$replaceGroupingFunc$1.applyOrElse(Analyzer.scala:308)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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


Mime
View raw message