You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Uroš Bojanić (Jira)" <ji...@apache.org> on 2026/08/28 10:34:00 UTC
[jira] [Commented] (SPARK-59079) Use Option.when in LiveEntity
[ 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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org