[ 
https://issues.apache.org/jira/browse/SPARK-34395?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

yikf updated SPARK-34395:
-------------------------
    Description: 
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}

  was:
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:*

*after:*

 


> 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: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to