You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Nick Dimiduk (JIRA)" <ji...@apache.org> on 2019/04/29 18:44:00 UTC

[jira] [Commented] (SPARK-27597) RuntimeConfig should be serializable

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

Nick Dimiduk commented on SPARK-27597:
--------------------------------------

It would nice nice if there was an API built into theĀ {{FunctionalInterface}} that let their implementation access the fully populated {{SparkSession}}.

> RuntimeConfig should be serializable
> ------------------------------------
>
>                 Key: SPARK-27597
>                 URL: https://issues.apache.org/jira/browse/SPARK-27597
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 2.4.1
>            Reporter: Nick Dimiduk
>            Priority: Major
>
> When implementing a UDF or similar, it's quite surprising to see that the {{SparkSession}} is {{Serializable}} but {{RuntimeConf}} is not. When modeling UDFs in an object-oriented way, this leads to quite a surprise, an ugly NPE from the {{call}} site.
> {noformat}
> Caused by: java.lang.NullPointerException
> at org.apache.spark.sql.SparkSession.sessionState$lzycompute(SparkSession.scala:143)
> at org.apache.spark.sql.SparkSession.sessionState(SparkSession.scala:141)
> at org.apache.spark.sql.SparkSession.conf$lzycompute(SparkSession.scala:170)
> at org.apache.spark.sql.SparkSession.conf(SparkSession.scala:170)
> ...{noformat}



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