spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xiao Li (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (SPARK-24788) RelationalGroupedDataset.toString throws errors when grouping by UnresolvedAttribute
Date Fri, 03 Aug 2018 05:44:00 GMT

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

Xiao Li resolved SPARK-24788.
-----------------------------
       Resolution: Fixed
         Assignee: Chris Horn
    Fix Version/s: 2.4.0

> RelationalGroupedDataset.toString throws errors when grouping by UnresolvedAttribute
> ------------------------------------------------------------------------------------
>
>                 Key: SPARK-24788
>                 URL: https://issues.apache.org/jira/browse/SPARK-24788
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.3.1
>            Reporter: Chris Horn
>            Assignee: Chris Horn
>            Priority: Minor
>             Fix For: 2.4.0
>
>
> This causes references to the RelationalGroupedDataset to break on the shell because
of the toString call:
> {code:java}
> scala> spark.range(0, 10).groupBy("id")
> res4: org.apache.spark.sql.RelationalGroupedDataset = RelationalGroupedDataset: [grouping
expressions: [id: bigint], value: [id: bigint], type: GroupBy]
> scala> spark.range(0, 10).groupBy('id)
> org.apache.spark.sql.catalyst.analysis.UnresolvedException: Invalid call to dataType
on unresolved object, tree: 'id
>   at org.apache.spark.sql.catalyst.analysis.UnresolvedAttribute.dataType(unresolved.scala:105)
>   at org.apache.spark.sql.RelationalGroupedDataset$$anonfun$12.apply(RelationalGroupedDataset.scala:474)
>   at org.apache.spark.sql.RelationalGroupedDataset$$anonfun$12.apply(RelationalGroupedDataset.scala:473)
>   at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
>   at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
>   at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
>   at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
>   at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)
>   at scala.collection.AbstractTraversable.map(Traversable.scala:104)
>   at org.apache.spark.sql.RelationalGroupedDataset.toString(RelationalGroupedDataset.scala:473)
>   at scala.runtime.ScalaRunTime$.scala$runtime$ScalaRunTime$$inner$1(ScalaRunTime.scala:332)
>   at scala.runtime.ScalaRunTime$.stringOf(ScalaRunTime.scala:337)
>   at scala.runtime.ScalaRunTime$.replStringOf(ScalaRunTime.scala:345)
> {code}
>  
> I will create a PR.



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