[
https://issues.apache.org/jira/browse/SPARK-58822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18105248#comment-18105248
]
Uroš Bojanić commented on SPARK-58822:
--------------------------------------
In progress: https://github.com/apache/spark/pull/58048.
> 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ć
> Priority: Major
> Labels: pull-request-available
>
> 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]