Skip to content

Commit 1b76bd0

Browse files
authored
[GLUTEN-3559][VL] Fix GlutenStringExpressionsSuite (apache#4579)
1 parent 74edc2a commit 1b76bd0

6 files changed

Lines changed: 2 additions & 77 deletions

File tree

gluten-ut/spark32/src/test/scala/io/glutenproject/utils/velox/VeloxTestSettings.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,6 @@ class VeloxTestSettings extends BackendTestSettings {
228228
enableSuite[GlutenSortOrderExpressionsSuite]
229229
enableSuite[GlutenBitwiseExpressionsSuite]
230230
enableSuite[GlutenStringExpressionsSuite]
231-
.exclude("concat")
232231
enableSuite[GlutenMiscExpressionsSuite]
233232
enableSuite[GlutenNondeterministicSuite]
234233
// No need due to testing framework change.

gluten-ut/spark32/src/test/scala/org/apache/spark/sql/catalyst/expressions/GlutenStringExpressionsSuite.scala

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@
1616
*/
1717
package org.apache.spark.sql.catalyst.expressions
1818

19-
import org.apache.spark.sql.GlutenTestConstants.GLUTEN_TEST
2019
import org.apache.spark.sql.GlutenTestsTrait
21-
import org.apache.spark.sql.types._
2220

2321
class GlutenStringExpressionsSuite extends StringExpressionsSuite with GlutenTestsTrait {
2422

@@ -33,26 +31,4 @@ class GlutenStringExpressionsSuite extends StringExpressionsSuite with GlutenTes
3331
c => checkEvaluation(Ascii(Chr(Literal(c.toLong))), c, create_row(c.toLong))
3432
}
3533
}
36-
37-
test(GLUTEN_TEST + "concat") {
38-
def testConcat(inputs: String*): Unit = {
39-
val expected = if (inputs.contains(null)) null else inputs.mkString
40-
checkEvaluation(Concat(inputs.map(Literal.create(_, StringType))), expected)
41-
}
42-
43-
// testConcat() velox not supported
44-
testConcat(null)
45-
testConcat("")
46-
testConcat("ab")
47-
testConcat("a", "b")
48-
testConcat("a", "b", "C")
49-
testConcat("a", null, "C")
50-
testConcat("a", null, null)
51-
testConcat(null, null, null)
52-
53-
// scalastyle:off
54-
// non ascii characters are not allowed in the code, so we disable the scalastyle here.
55-
testConcat("数据", null, "砖头")
56-
// scalastyle:on
57-
}
5834
}

gluten-ut/spark33/src/test/scala/io/glutenproject/utils/velox/VeloxTestSettings.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ class VeloxTestSettings extends BackendTestSettings {
158158
enableSuite[GlutenRegexpExpressionsSuite]
159159
enableSuite[GlutenSortOrderExpressionsSuite]
160160
enableSuite[GlutenStringExpressionsSuite]
161-
.exclude("concat")
162161
enableSuite[VeloxAdaptiveQueryExecSuite]
163162
.includeByPrefix(
164163
"gluten",

gluten-ut/spark33/src/test/scala/org/apache/spark/sql/catalyst/expressions/GlutenStringExpressionsSuite.scala

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,6 @@
1616
*/
1717
package org.apache.spark.sql.catalyst.expressions
1818

19-
import org.apache.spark.sql.GlutenTestConstants.GLUTEN_TEST
2019
import org.apache.spark.sql.GlutenTestsTrait
21-
import org.apache.spark.sql.types._
2220

23-
class GlutenStringExpressionsSuite extends StringExpressionsSuite with GlutenTestsTrait {
24-
test(GLUTEN_TEST + "concat") {
25-
def testConcat(inputs: String*): Unit = {
26-
val expected = if (inputs.contains(null)) null else inputs.mkString
27-
checkEvaluation(Concat(inputs.map(Literal.create(_, StringType))), expected)
28-
}
29-
30-
// testConcat() velox not supported
31-
testConcat(null)
32-
testConcat("")
33-
testConcat("ab")
34-
testConcat("a", "b")
35-
testConcat("a", "b", "C")
36-
testConcat("a", null, "C")
37-
testConcat("a", null, null)
38-
testConcat(null, null, null)
39-
40-
// scalastyle:off
41-
// non ascii characters are not allowed in the code, so we disable the scalastyle here.
42-
testConcat("数据", null, "砖头")
43-
// scalastyle:on
44-
}
45-
}
21+
class GlutenStringExpressionsSuite extends StringExpressionsSuite with GlutenTestsTrait {}

gluten-ut/spark34/src/test/scala/io/glutenproject/utils/velox/VeloxTestSettings.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ class VeloxTestSettings extends BackendTestSettings {
138138
enableSuite[GlutenRegexpExpressionsSuite]
139139
enableSuite[GlutenSortOrderExpressionsSuite]
140140
enableSuite[GlutenStringExpressionsSuite]
141-
.exclude("concat")
142141
enableSuite[VeloxAdaptiveQueryExecSuite]
143142
.includeByPrefix(
144143
"gluten",

gluten-ut/spark34/src/test/scala/org/apache/spark/sql/catalyst/expressions/GlutenStringExpressionsSuite.scala

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,6 @@
1616
*/
1717
package org.apache.spark.sql.catalyst.expressions
1818

19-
import org.apache.spark.sql.GlutenTestConstants.GLUTEN_TEST
2019
import org.apache.spark.sql.GlutenTestsTrait
21-
import org.apache.spark.sql.types._
2220

23-
class GlutenStringExpressionsSuite extends StringExpressionsSuite with GlutenTestsTrait {
24-
test(GLUTEN_TEST + "concat") {
25-
def testConcat(inputs: String*): Unit = {
26-
val expected = if (inputs.contains(null)) null else inputs.mkString
27-
checkEvaluation(Concat(inputs.map(Literal.create(_, StringType))), expected)
28-
}
29-
30-
// testConcat() velox not supported
31-
testConcat(null)
32-
testConcat("")
33-
testConcat("ab")
34-
testConcat("a", "b")
35-
testConcat("a", "b", "C")
36-
testConcat("a", null, "C")
37-
testConcat("a", null, null)
38-
testConcat(null, null, null)
39-
40-
// scalastyle:off
41-
// non ascii characters are not allowed in the code, so we disable the scalastyle here.
42-
testConcat("数据", null, "砖头")
43-
// scalastyle:on
44-
}
45-
}
21+
class GlutenStringExpressionsSuite extends StringExpressionsSuite with GlutenTestsTrait {}

0 commit comments

Comments
 (0)