spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Spark (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (SPARK-25942) Dataset.groupByKey can't work on primitive data
Date Mon, 05 Nov 2018 09:05:00 GMT

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

Apache Spark reassigned SPARK-25942:
------------------------------------

    Assignee: Apache Spark

> Dataset.groupByKey can't work on primitive data
> -----------------------------------------------
>
>                 Key: SPARK-25942
>                 URL: https://issues.apache.org/jira/browse/SPARK-25942
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.4.0
>            Reporter: Liang-Chi Hsieh
>            Assignee: Apache Spark
>            Priority: Major
>
> Dataset.groupByKey can't work on primitive data now.
>  
> {code:java}
> val ds = Seq(1, 2, 3).toDS()
> val agg = ds.groupByKey(_ >= 2).agg(sum("value").as[Long], sum($"value" + 1).as[Long])
> {code}
> {code:java}
> org.apache.spark.sql.AnalysisException: Reference 'value' is ambiguous, could be: value,
value.;                                          
> [info]   at org.apache.spark.sql.catalyst.expressions.package$AttributeSeq.resolve(package.scala:247)
> [info]   at org.apache.spark.sql.catalyst.plans.logical.LogicalPlan.resolveChildren(LogicalPlan.scala:101)
> [info]   at org.apache.spark.sql.catalyst.analysis.Analyzer$ResolveReferences$$anonfun$38.apply(Analyzer.scala:889)
> [info]   at org.apache.spark.sql.catalyst.analysis.Analyzer$ResolveReferences$$anonfun$38.apply(Analyzer.scala:891)
> ...
> {code}



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


Mime
View raw message