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

Uroš Bojanić resolved SPARK-59079.
----------------------------------
    Fix Version/s: 4.4.0
       Resolution: Fixed

Issue resolved by pull request 58381
[https://github.com/apache/spark/pull/58381]

> Use Option.when in LiveEntity
> -----------------------------
>
>                 Key: SPARK-59079
>                 URL: https://issues.apache.org/jira/browse/SPARK-59079
>             Project: Spark
>          Issue Type: Improvement
>          Components: Spark Core
>    Affects Versions: 4.4.0
>            Reporter: Uroš Bojanić
>            Assignee: Uroš Bojanić
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 4.4.0
>
>
> LiveEntity.scala builds several Option values with the 'if (cond) Some(x) 
> else None' idiom. This replaces the five such occurrences with the more 
> idiomatic Option.when(cond)(x), which is already used across the Spark 
> codebase (e.g. InjectRuntimeFilter). No behavior change: Option.when 
> evaluates its by-name value only when the condition holds, exactly like the 
> if/else.



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

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

Reply via email to