[ 
https://issues.apache.org/jira/browse/SPARK-32051?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17143001#comment-17143001
 ] 

Frank Oosterhuis commented on SPARK-32051:
------------------------------------------

Looks like a similar conflict happens with Dataset.foreach.

 
{code:java}
Error:(22, 8) overloaded method value foreach with alternatives:
  (func: 
org.apache.spark.api.java.function.ForeachFunction[org.apache.spark.sql.Row])Unit
 <and>
  (f: org.apache.spark.sql.Row => Unit)Unit
 cannot be applied to (org.apache.spark.sql.Row => 
org.apache.spark.sql.DataFrame)
      .foreach((r : Row) => {
{code}
Workaround *.foreach((r: Row) =>*  does not work here.

> Dataset.foreachPartition returns object
> ---------------------------------------
>
>                 Key: SPARK-32051
>                 URL: https://issues.apache.org/jira/browse/SPARK-32051
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Frank Oosterhuis
>            Priority: Critical
>             Fix For: 3.0.1, 3.1.0
>
>
> I'm trying to map values from the Dataset[Row], but since 3.0.0 this fails.
> In 3.0.0 I'm dealing with an error: "Error:(28, 38) value map is not a member 
> of Object"
>  
> This is the simplest code that works in 2.4.x, but fails in 3.0.0:
> {code:scala}
> spark.range(100)
>   .repartition(10)
>   .foreachPartition(part => println(part.toList))
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to