You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Kousuke Saruta (JIRA)" <ji...@apache.org> on 2015/12/17 11:03:46 UTC

[jira] [Updated] (SPARK-12404) Ensure objects passed to StaticInvoke is Serializable

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

Kousuke Saruta updated SPARK-12404:
-----------------------------------
    Description: 
Now `StaticInvoke` receives Any as a object and StaticInvoke can be serialized but sometimes the object passed is not serializable.

For example, following code raises Exception because RowEncoder#extractorsFor is invoked indirectly makes `StaticInvoke`.

<code>
case class TimestampContainer(timestamp: java.sql.Timestamp)
val rdd = sc.parallelize(1 to 2).map(_ => TimestampContainer(System.currentTimeMillis))
val df = rdd.toDF
val ds = df.as[TimestampContainer]
val rdd2 = ds.rdd                                 <----------------- invokes extractorsFor indirectory
<code>



  was:
Now `StaticInvoke` receives Any as a object and StaticInvoke can be serialized but sometimes the object passed is not serializable.

For example, following code raises Exception because RowEncoder#extractorsFor is invoked indirectly makes `StaticInvoke`.

<code>
case class TimestampContainer(timestamp: java.sql.Timestamp)
val rdd = sc.parallelize(1 to 2).map(_ => TimestampContainer(System.currentTimeMillis))
val df = rdd.toDF
val ds = df.as[TimestampContainer]
val rdd2 = ds.rdd                                 <----------------- invokes extractorsFor indirectory
</code>




> Ensure objects passed to StaticInvoke is Serializable
> -----------------------------------------------------
>
>                 Key: SPARK-12404
>                 URL: https://issues.apache.org/jira/browse/SPARK-12404
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.6.1, 2.0.0
>            Reporter: Kousuke Saruta
>            Assignee: Kousuke Saruta
>            Priority: Critical
>
> Now `StaticInvoke` receives Any as a object and StaticInvoke can be serialized but sometimes the object passed is not serializable.
> For example, following code raises Exception because RowEncoder#extractorsFor is invoked indirectly makes `StaticInvoke`.
> <code>
> case class TimestampContainer(timestamp: java.sql.Timestamp)
> val rdd = sc.parallelize(1 to 2).map(_ => TimestampContainer(System.currentTimeMillis))
> val df = rdd.toDF
> val ds = df.as[TimestampContainer]
> val rdd2 = ds.rdd                                 <----------------- invokes extractorsFor indirectory
> <code>



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