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

             Summary: Add tests for SparkStringUtils padding and abbreviation 
helpers
                 Key: SPARK-58689
                 URL: https://issues.apache.org/jira/browse/SPARK-58689
             Project: Spark
          Issue Type: Test
          Components: Spark Core
    Affects Versions: 4.3.0
            Reporter: Uroš Bojanić


SparkStringUtils has no test suite. Its helpers are not incidental: leftPad and 
rightPad format the column output of Dataset.show, and abbreviate is used to 
build Kubernetes application name labels. The methods were added across a 
series of migration changes that replaced Apache Commons and Guava equivalents, 
and none of those added direct tests.

This adds SparkStringUtilsSuite covering isBlank and isNotBlank, leftPad, both 
rightPad overloads, both abbreviate overloads, strip, and stringToSeq, 
including the null pass-through paths and the pad-repetition truncation 
arithmetic in the three argument rightPad, which currently has no caller and 
therefore no coverage of any kind.

Tests only, no production change. The suite extends AnyFunSuite with the 
scalastyle marker used by the sibling suites in the same module, since 
common/utils does not depend on spark-core and therefore cannot use 
SparkFunSuite.



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