GitHub user sarutak opened a pull request:

    https://github.com/apache/spark/pull/10357

    [SPARK-12404] [SQL] Ensure objects passed to StaticInvoke is Serializable

    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`.
    
    ```
    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
    ```
    
    I'll add test cases.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sarutak/spark SPARK-12404

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/10357.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #10357
    
----
commit e92ae87e9a5e9258277ff8a0243a84992c12414c
Author: Kousuke Saruta <[email protected]>
Date:   2015-12-17T10:01:48Z

    Fixed StaticInvoke to ensure receiving Class object which is serializable

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to