Skip to content

Commit bb039d4

Browse files
BIGOBIGO
BIGO
authored and
BIGO
committed
fix ci
1 parent 7a50d8c commit bb039d4

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

backends-clickhouse/src/test/scala/org/apache/gluten/execution/GlutenFunctionValidateSuite.scala

+18-10
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,10 @@ class GlutenFunctionValidateSuite extends GlutenClickHouseWholeStageTransformerS
208208
spark.catalog.createTable("url_table", urlFilePath, fileFormat)
209209
}
210210

211+
override def afterAll(): Unit = {
212+
sparkConf.set("spark.gluten.sql.supported.collapseNestedFunctions", "")
213+
}
214+
211215
test("Test get_json_object 1") {
212216
runQueryAndCompare("SELECT get_json_object(string_field1, '$.a') from json_test") {
213217
checkGlutenOperatorMatch[ProjectExecTransformer]
@@ -395,17 +399,21 @@ class GlutenFunctionValidateSuite extends GlutenClickHouseWholeStageTransformerS
395399
}
396400
false
397401
}
398-
withSQLConf(("spark.gluten.sql.supported.collapseNestedFunctions", "and,or")) {
399-
runQueryAndCompare(
400-
"SELECT count(1) from json_test where int_field1 = 5 and double_field1 > 1.0" +
401-
" and string_field1 is not null") {
402-
x => assert(checkCollapsedFunctions(x.queryExecution.executedPlan, "and", 5))
403-
}
404-
runQueryAndCompare(
405-
"SELECT count(1) from json_test where int_field1 = 5 or double_field1 > 1.0" +
406-
" or string_field1 is not null") {
407-
x => assert(checkCollapsedFunctions(x.queryExecution.executedPlan, "or", 3))
402+
try {
403+
withSQLConf(("spark.gluten.sql.supported.collapseNestedFunctions", "and,or")) {
404+
runQueryAndCompare(
405+
"SELECT count(1) from json_test where int_field1 = 5 and double_field1 > 1.0" +
406+
" and string_field1 is not null") {
407+
x => assert(checkCollapsedFunctions(x.queryExecution.executedPlan, "and", 5))
408+
}
409+
runQueryAndCompare(
410+
"SELECT count(1) from json_test where int_field1 = 5 or double_field1 > 1.0" +
411+
" or string_field1 is not null") {
412+
x => assert(checkCollapsedFunctions(x.queryExecution.executedPlan, "or", 3))
413+
}
408414
}
415+
} finally {
416+
sparkConf.set("spark.gluten.sql.supported.collapseNestedFunctions", "")
409417
}
410418
}
411419

0 commit comments

Comments
 (0)