You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (JIRA)" <ji...@apache.org> on 2017/01/10 09:21:58 UTC
[jira] [Resolved] (SPARK-17896) Dataset groupByKey + reduceGroups
fails with codegen-related exception
[ https://issues.apache.org/jira/browse/SPARK-17896?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hyukjin Kwon resolved SPARK-17896.
----------------------------------
Resolution: Cannot Reproduce
I am resolving this as {{Cannot Reproduce}} because this does not throw an exception in the current master.
{code}
scala> case class Zip(city:String, zip:String, state:String)
defined class Zip
scala> val z1 = Zip("New York", "10000", "NY")
z1: Zip = Zip(New York,10000,NY)
scala> val z2 = Zip("New York", "10001", "NY")
z2: Zip = Zip(New York,10001,NY)
scala> val z3 = Zip("Chicago", "60606", "IL")
z3: Zip = Zip(Chicago,60606,IL)
scala> val zips = sc.parallelize(Seq(z1, z2, z3)).toDS
zips: org.apache.spark.sql.Dataset[Zip] = [city: string, zip: string ... 1 more field]
scala> zips.groupByKey(_.state).reduceGroups((z1, z2) => Zip("*", z1.zip + " " + z2.zip, z1.state)).show
+-----+-------------------------------------------+
|value|ReduceAggregator($line48.$read$$iw$$iw$Zip)|
+-----+-------------------------------------------+
| IL| [Chicago,60606,IL]|
| NY| [*,10000 10001,NY]|
+-----+-------------------------------------------+
scala>
scala> spark.version
res13: String = 2.2.0-SNAPSHOT
{code}
Please feel free to reopen if anyone still faces this issue. It'd be great if we can find the PR and backport.
> Dataset groupByKey + reduceGroups fails with codegen-related exception
> ----------------------------------------------------------------------
>
> Key: SPARK-17896
> URL: https://issues.apache.org/jira/browse/SPARK-17896
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 2.0.1
> Environment: Databricks, MacOS
> Reporter: Adam Breindel
>
> possible regression: works on 2.0, fails on 2.0.1
> following code raises exception related to wholestage codegen:
> case class Zip(city:String, zip:String, state:String)
> val z1 = Zip("New York", "10000", "NY")
> val z2 = Zip("New York", "10001", "NY")
> val z3 = Zip("Chicago", "60606", "IL")
> val zips = sc.parallelize(Seq(z1, z2, z3)).toDS
> zips.groupByKey(_.state).reduceGroups((z1, z2) => Zip("*", z1.zip + " " + z2.zip, z1.state)).show
--
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