You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Tian Gao (Jira)" <ji...@apache.org> on 2025/12/19 01:04:00 UTC

[jira] [Created] (SPARK-54769) Remove dead code based on coverage report

Tian Gao created SPARK-54769:
--------------------------------

             Summary: Remove dead code based on coverage report
                 Key: SPARK-54769
                 URL: https://issues.apache.org/jira/browse/SPARK-54769
             Project: Spark
          Issue Type: Umbrella
          Components: PySpark
    Affects Versions: 4.2.0
            Reporter: Tian Gao


Dead code is bad because it increases maintenance effort. It also confuses people when they read it. Also because it's not coverable by tests, in the future if the logic changed, we won't know something bad happened.

The proper way to label dead branch is assertion. Assertion has clear semantics that this code should never be reached, and it also has the advantage to fail in an expected and reproducible way.

We don't have to get everything in a single PR but we can put dead code under this umbrella JIRA.



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