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

Hyukjin Kwon updated SPARK-47965:
---------------------------------
    Summary: Avoid orNull in TypedConfigBuilder and OptionalConfigEntry  (was: 
Avoid orNull in TypedConfigBuilder)

> Avoid orNull in TypedConfigBuilder and OptionalConfigEntry
> ----------------------------------------------------------
>
>                 Key: SPARK-47965
>                 URL: https://issues.apache.org/jira/browse/SPARK-47965
>             Project: Spark
>          Issue Type: Improvement
>          Components: Spark Core
>    Affects Versions: 4.0.0
>            Reporter: Hyukjin Kwon
>            Priority: Minor
>              Labels: pull-request-available
>
> Configuration values/keys cannot be nulls. We should fix:
> {code}
> diff --git 
> a/core/src/main/scala/org/apache/spark/internal/config/ConfigBuilder.scala 
> b/core/src/main/scala/org/apache/spark/internal/config/ConfigBuilder.scala
> index 1f19e9444d38..d06535722625 100644
> --- a/core/src/main/scala/org/apache/spark/internal/config/ConfigBuilder.scala
> +++ b/core/src/main/scala/org/apache/spark/internal/config/ConfigBuilder.scala
> @@ -94,7 +94,7 @@ private[spark] class TypedConfigBuilder[T](
>    import ConfigHelpers._
>    def this(parent: ConfigBuilder, converter: String => T) = {
> -    this(parent, converter, Option(_).map(_.toString).orNull)
> +    this(parent, converter, { v: T => v.toString })
>    }
>    /** Apply a transformation to the user-provided values of the config 
> entry. */
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to