[
https://issues.apache.org/jira/browse/SPARK-59079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18109167#comment-18109167
]
Uroš Bojanić commented on SPARK-59079:
--------------------------------------
In progress: 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ć
> Priority: Minor
>
> 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]