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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to