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

             Summary: Extract a nonEmptyLines helper in 
LogicalPlanDifferenceSuite
                 Key: SPARK-58822
                 URL: https://issues.apache.org/jira/browse/SPARK-58822
             Project: Spark
          Issue Type: Improvement
          Components: SQL
    Affects Versions: 4.3.0
            Reporter: Uroš Bojanić


LogicalPlanDifferenceSuite repeats the idiom 
text.split("\n").filter(_.nonEmpty) twenty times, twice per test, to turn a 
rendered plan or diff into its non-empty lines. The repetition obscures what 
each test actually asserts.

This extracts a single private helper, nonEmptyLines(text: String): 
Array[String], and routes all 20 call sites through it. The helper body is the 
extracted expression verbatim and keeps the Array[String] return type, so 
downstream .length, indexing and mkString usage is unchanged. Test-only 
refactor with identical behavior; the suite is otherwise untouched.



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