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:32:00 UTC

[jira] [Created] (SPARK-59079) Use Option.when in LiveEntity

Uroš Bojanić created SPARK-59079:
------------------------------------

             Summary: 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ć


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