@@ -2522,18 +2522,10 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
25222522 withTempDir { dir =>
25232523 val path = new Path (dir.toURI.toString, " test.parquet" )
25242524 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" ))
25372529 }
25382530 }
25392531 }
0 commit comments