You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Jiaan Geng (Jira)" <ji...@apache.org> on 2023/11/30 10:51:00 UTC

[jira] [Updated] (SPARK-46184) Reduce stack depth by replace isDefined with isEmpty

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

Jiaan Geng updated SPARK-46184:
-------------------------------
    Summary: Reduce stack depth by replace isDefined with isEmpty  (was: Reduce stack depth by replace isDefined to isEmpty)

> Reduce stack depth by replace isDefined with isEmpty
> ----------------------------------------------------
>
>                 Key: SPARK-46184
>                 URL: https://issues.apache.org/jira/browse/SPARK-46184
>             Project: Spark
>          Issue Type: Improvement
>          Components: Connect, MLlib, Spark Core, SQL
>    Affects Versions: 4.0.0
>            Reporter: Jiaan Geng
>            Assignee: Jiaan Geng
>            Priority: Major
>
> There are a lot of Option.isDefined used with !, this behavior increase the stack length.
> The reason is isDefined calls isEmpty.
> final def isDefined: Boolean = !isEmpty
> We also get the compile waring Replace with . isEmpty



--
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