uros-b opened a new pull request, #58048:
URL: https://github.com/apache/spark/pull/58048
### What changes were proposed in this pull request?
Extracts a single private helper in `LogicalPlanDifferenceSuite` and routes
20 call sites through it:
```scala
/** Splits `text` into lines, dropping any empty ones. */
private def nonEmptyLines(text: String): Array[String] =
text.split("\n").filter(_.nonEmpty)
```
### Why are the changes needed?
The idiom `X.split("\n").filter(_.nonEmpty)` was repeated 20 times, twice
per test, which buries what each test is actually asserting under a parsing
incantation. Naming it once reduces the per-test maintenance surface in this
suite.
### Does this PR introduce _any_ user-facing change?
No. Test-only refactor.
### How was this patch tested?
Existing suite. The helper body is the extracted expression verbatim and
keeps the `Array[String]` return type, so every downstream `.length`, index
access, and `mkString` is unchanged; equivalence holds for empty, single-line,
multi-line, and trailing-newline inputs. Scoped to this one file.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 4.8)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]