@@ -2522,18 +2522,10 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
2522
2522
withTempDir { dir =>
2523
2523
val path = new Path (dir.toURI.toString, " test.parquet" )
2524
2524
makeParquetFileAllTypes(path, dictionaryEnabled, 10000 )
2525
-
2526
- // Test basic array_remove functionality
2527
- checkSparkAnswerAndOperator(sql(" SELECT array_remove(array(1, 2, 3, null, 3), 2)" ))
2528
-
2529
- // Test removing multiple occurrences
2530
- checkSparkAnswerAndOperator(sql(" SELECT array_remove(array(1, 3, 3, null, 3), 3)" ))
2531
-
2532
- // Test removing null
2533
- checkSparkAnswerAndOperator(sql(" SELECT array_remove(array(1, 2, null, 4, null), null)" ))
2534
-
2535
- // Test when element doesn't exist
2536
- checkSparkAnswerAndOperator(sql(" SELECT array_remove(array(1, 2, 3), 5)" ))
2525
+ spark.read.parquet(path.toString).createOrReplaceTempView(" t1" );
2526
+ checkSparkAnswerAndOperator(sql(" SELECT array_remove(array(_2, _3,_4), 2) from t1" ))
2527
+ checkSparkAnswerAndOperator(sql(" SELECT array_remove(array(_2, _3,_4), 3) from t1" ))
2528
+ checkSparkAnswerAndOperator(sql(" SELECT array_remove(array(_2, _3,_4), 5) from t1" ))
2537
2529
}
2538
2530
}
2539
2531
}
0 commit comments