@@ -208,6 +208,10 @@ class GlutenFunctionValidateSuite extends GlutenClickHouseWholeStageTransformerS
208
208
spark.catalog.createTable(" url_table" , urlFilePath, fileFormat)
209
209
}
210
210
211
+ override def afterAll (): Unit = {
212
+ sparkConf.set(" spark.gluten.sql.supported.collapseNestedFunctions" , " " )
213
+ }
214
+
211
215
test(" Test get_json_object 1" ) {
212
216
runQueryAndCompare(" SELECT get_json_object(string_field1, '$.a') from json_test" ) {
213
217
checkGlutenOperatorMatch[ProjectExecTransformer ]
@@ -395,17 +399,21 @@ class GlutenFunctionValidateSuite extends GlutenClickHouseWholeStageTransformerS
395
399
}
396
400
false
397
401
}
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
+ }
408
414
}
415
+ } finally {
416
+ sparkConf.set(" spark.gluten.sql.supported.collapseNestedFunctions" , " " )
409
417
}
410
418
}
411
419
0 commit comments