You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "uros-b (via GitHub)" <gi...@apache.org> on 2026/08/17 10:32:09 UTC

[PR] [SPARK-58822][SQL][TESTS] Extract a nonEmptyLines helper in LogicalPlanDifferenceSuite [spark]

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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-58822][SQL][TESTS] Extract a nonEmptyLines helper in LogicalPlanDifferenceSuite [spark]

Posted by "uros-b (via GitHub)" <gi...@apache.org>.
uros-b commented on PR #58048:
URL: https://github.com/apache/spark/pull/58048#issuecomment-5329666737

   Thank you @dongjoon-hyun!


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-58822][SQL][TESTS] Extract a nonEmptyLines helper in LogicalPlanDifferenceSuite [spark]

Posted by "uros-b (via GitHub)" <gi...@apache.org>.
uros-b commented on PR #58048:
URL: https://github.com/apache/spark/pull/58048#issuecomment-5329715641

   **Merge Summary:**
   - merged into master https://github.com/apache/spark/commit/67e731741f6c71558e0b0711b6dda4fe8eff9b76
   - merged into branch-4.x https://github.com/apache/spark/commit/e35305859e31df802f5cad0b70fd0150f5409d3f
   - merged into branch-4.3 https://github.com/apache/spark/commit/52bb9b468a59802f43c97647c458be7ed0a7b55c
   
   *Posted by `merge_spark_pr.py`*


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-58822][SQL][TESTS] Extract a nonEmptyLines helper in LogicalPlanDifferenceSuite [spark]

Posted by "uros-b (via GitHub)" <gi...@apache.org>.
uros-b closed pull request #58048: [SPARK-58822][SQL][TESTS] Extract a nonEmptyLines helper in LogicalPlanDifferenceSuite
URL: https://github.com/apache/spark/pull/58048


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org