[ 
https://issues.apache.org/jira/browse/SPARK-34395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17280493#comment-17280493
 ] 

Apache Spark commented on SPARK-34395:
--------------------------------------

User 'yikf' has created a pull request for this issue:
https://github.com/apache/spark/pull/31510

> Clean up unused code for code simplifications
> ---------------------------------------------
>
>                 Key: SPARK-34395
>                 URL: https://issues.apache.org/jira/browse/SPARK-34395
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.0.0, 3.2.0
>            Reporter: yikf
>            Priority: Minor
>
> Currently, we pass the default value `EmptyRow` to method `checkEvaluation` 
> in the StringExpressionsSuite, but the default value of the 'checkEvaluation' 
> method parameter is the `emptyRow`.
> We can clean the parameter for Code Simplifications.
>  
> example:
> *before:*
> {code:java}
> def testConcat(inputs: String*): Unit = {
>   val expected = if (inputs.contains(null)) null else inputs.mkString
>   checkEvaluation(Concat(inputs.map(Literal.create(_, StringType))), 
> expected, EmptyRow)
> }{code}
> *after:*
> {code:java}
> def testConcat(inputs: String*): Unit = {
>   val expected = if (inputs.contains(null)) null else inputs.mkString
>   checkEvaluation(Concat(inputs.map(Literal.create(_, StringType))), expected)
> }{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to