You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Liang-Chi Hsieh (JIRA)" <ji...@apache.org> on 2018/11/05 08:51:00 UTC
[jira] [Created] (SPARK-25942) Dataset.groupByKey can't work on
primitive data
Liang-Chi Hsieh created SPARK-25942:
---------------------------------------
Summary: 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
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