@@ -35,7 +35,7 @@ class AdaptiveQueryExecSuite extends QueryTest with SharedSQLContext {
35
35
val planBefore = dfAdaptive.queryExecution.executedPlan
36
36
assert(planBefore.toString.startsWith(" AdaptiveSparkPlan(isFinalPlan=false)" ))
37
37
val result = dfAdaptive.collect()
38
- withSQLConf(SQLConf .RUNTIME_REOPTIMIZATION_ENABLED .key -> " false" ) {
38
+ withSQLConf(SQLConf .ADAPTIVE_EXECUTION_ENABLED .key -> " false" ) {
39
39
val df = sql(query)
40
40
QueryTest .sameRows(result.toSeq, df.collect().toSeq)
41
41
}
@@ -82,7 +82,7 @@ class AdaptiveQueryExecSuite extends QueryTest with SharedSQLContext {
82
82
83
83
test(" Change merge join to broadcast join" ) {
84
84
withSQLConf(
85
- SQLConf .RUNTIME_REOPTIMIZATION_ENABLED .key -> " true" ,
85
+ SQLConf .ADAPTIVE_EXECUTION_ENABLED .key -> " true" ,
86
86
SQLConf .AUTO_BROADCASTJOIN_THRESHOLD .key -> " 80" ) {
87
87
val (plan, adaptivePlan) = runAdaptiveAndVerifyResult(
88
88
" SELECT * FROM testData join testData2 ON key = a where value = '1'" )
@@ -95,7 +95,7 @@ class AdaptiveQueryExecSuite extends QueryTest with SharedSQLContext {
95
95
96
96
test(" Change merge join to broadcast join and reduce number of shuffle partitions" ) {
97
97
withSQLConf(
98
- SQLConf .RUNTIME_REOPTIMIZATION_ENABLED .key -> " true" ,
98
+ SQLConf .ADAPTIVE_EXECUTION_ENABLED .key -> " true" ,
99
99
SQLConf .REDUCE_POST_SHUFFLE_PARTITIONS_ENABLED .key -> " true" ,
100
100
SQLConf .AUTO_BROADCASTJOIN_THRESHOLD .key -> " 80" ,
101
101
SQLConf .SHUFFLE_TARGET_POSTSHUFFLE_INPUT_SIZE .key -> " 150" ) {
@@ -119,7 +119,7 @@ class AdaptiveQueryExecSuite extends QueryTest with SharedSQLContext {
119
119
120
120
test(" Scalar subquery" ) {
121
121
withSQLConf(
122
- SQLConf .RUNTIME_REOPTIMIZATION_ENABLED .key -> " true" ,
122
+ SQLConf .ADAPTIVE_EXECUTION_ENABLED .key -> " true" ,
123
123
SQLConf .AUTO_BROADCASTJOIN_THRESHOLD .key -> " 80" ) {
124
124
val (plan, adaptivePlan) = runAdaptiveAndVerifyResult(
125
125
" SELECT * FROM testData join testData2 ON key = a " +
@@ -133,7 +133,7 @@ class AdaptiveQueryExecSuite extends QueryTest with SharedSQLContext {
133
133
134
134
test(" Scalar subquery in later stages" ) {
135
135
withSQLConf(
136
- SQLConf .RUNTIME_REOPTIMIZATION_ENABLED .key -> " true" ,
136
+ SQLConf .ADAPTIVE_EXECUTION_ENABLED .key -> " true" ,
137
137
SQLConf .AUTO_BROADCASTJOIN_THRESHOLD .key -> " 80" ) {
138
138
val (plan, adaptivePlan) = runAdaptiveAndVerifyResult(
139
139
" SELECT * FROM testData join testData2 ON key = a " +
@@ -147,7 +147,7 @@ class AdaptiveQueryExecSuite extends QueryTest with SharedSQLContext {
147
147
148
148
test(" multiple joins" ) {
149
149
withSQLConf(
150
- SQLConf .RUNTIME_REOPTIMIZATION_ENABLED .key -> " true" ,
150
+ SQLConf .ADAPTIVE_EXECUTION_ENABLED .key -> " true" ,
151
151
SQLConf .AUTO_BROADCASTJOIN_THRESHOLD .key -> " 80" ) {
152
152
val (plan, adaptivePlan) = runAdaptiveAndVerifyResult(
153
153
"""
@@ -168,7 +168,7 @@ class AdaptiveQueryExecSuite extends QueryTest with SharedSQLContext {
168
168
169
169
test(" multiple joins with aggregate" ) {
170
170
withSQLConf(
171
- SQLConf .RUNTIME_REOPTIMIZATION_ENABLED .key -> " true" ,
171
+ SQLConf .ADAPTIVE_EXECUTION_ENABLED .key -> " true" ,
172
172
SQLConf .AUTO_BROADCASTJOIN_THRESHOLD .key -> " 80" ) {
173
173
val (plan, adaptivePlan) = runAdaptiveAndVerifyResult(
174
174
"""
@@ -191,7 +191,7 @@ class AdaptiveQueryExecSuite extends QueryTest with SharedSQLContext {
191
191
192
192
test(" multiple joins with aggregate 2" ) {
193
193
withSQLConf(
194
- SQLConf .RUNTIME_REOPTIMIZATION_ENABLED .key -> " true" ,
194
+ SQLConf .ADAPTIVE_EXECUTION_ENABLED .key -> " true" ,
195
195
SQLConf .AUTO_BROADCASTJOIN_THRESHOLD .key -> " 500" ) {
196
196
val (plan, adaptivePlan) = runAdaptiveAndVerifyResult(
197
197
"""
@@ -214,7 +214,7 @@ class AdaptiveQueryExecSuite extends QueryTest with SharedSQLContext {
214
214
215
215
test(" Exchange reuse" ) {
216
216
withSQLConf(
217
- SQLConf .RUNTIME_REOPTIMIZATION_ENABLED .key -> " true" ,
217
+ SQLConf .ADAPTIVE_EXECUTION_ENABLED .key -> " true" ,
218
218
SQLConf .AUTO_BROADCASTJOIN_THRESHOLD .key -> " 80" ) {
219
219
val (plan, adaptivePlan) = runAdaptiveAndVerifyResult(
220
220
" SELECT value FROM testData join testData2 ON key = a " +
@@ -230,7 +230,7 @@ class AdaptiveQueryExecSuite extends QueryTest with SharedSQLContext {
230
230
231
231
test(" Exchange reuse with subqueries" ) {
232
232
withSQLConf(
233
- SQLConf .RUNTIME_REOPTIMIZATION_ENABLED .key -> " true" ,
233
+ SQLConf .ADAPTIVE_EXECUTION_ENABLED .key -> " true" ,
234
234
SQLConf .AUTO_BROADCASTJOIN_THRESHOLD .key -> " 80" ) {
235
235
val (plan, adaptivePlan) = runAdaptiveAndVerifyResult(
236
236
" SELECT a FROM testData join testData2 ON key = a " +
@@ -246,7 +246,7 @@ class AdaptiveQueryExecSuite extends QueryTest with SharedSQLContext {
246
246
247
247
test(" Exchange reuse across subqueries" ) {
248
248
withSQLConf(
249
- SQLConf .RUNTIME_REOPTIMIZATION_ENABLED .key -> " true" ,
249
+ SQLConf .ADAPTIVE_EXECUTION_ENABLED .key -> " true" ,
250
250
SQLConf .AUTO_BROADCASTJOIN_THRESHOLD .key -> " 80" ,
251
251
SQLConf .SUBQUERY_REUSE_ENABLED .key -> " false" ) {
252
252
val (plan, adaptivePlan) = runAdaptiveAndVerifyResult(
@@ -266,7 +266,7 @@ class AdaptiveQueryExecSuite extends QueryTest with SharedSQLContext {
266
266
267
267
test(" Subquery reuse" ) {
268
268
withSQLConf(
269
- SQLConf .RUNTIME_REOPTIMIZATION_ENABLED .key -> " true" ,
269
+ SQLConf .ADAPTIVE_EXECUTION_ENABLED .key -> " true" ,
270
270
SQLConf .AUTO_BROADCASTJOIN_THRESHOLD .key -> " 80" ) {
271
271
val (plan, adaptivePlan) = runAdaptiveAndVerifyResult(
272
272
" SELECT a FROM testData join testData2 ON key = a " +
@@ -285,7 +285,7 @@ class AdaptiveQueryExecSuite extends QueryTest with SharedSQLContext {
285
285
286
286
test(" Broadcast exchange reuse across subqueries" ) {
287
287
withSQLConf(
288
- SQLConf .RUNTIME_REOPTIMIZATION_ENABLED .key -> " true" ,
288
+ SQLConf .ADAPTIVE_EXECUTION_ENABLED .key -> " true" ,
289
289
SQLConf .AUTO_BROADCASTJOIN_THRESHOLD .key -> " 20000000" ,
290
290
SQLConf .SUBQUERY_REUSE_ENABLED .key -> " false" ) {
291
291
val (plan, adaptivePlan) = runAdaptiveAndVerifyResult(
@@ -307,7 +307,7 @@ class AdaptiveQueryExecSuite extends QueryTest with SharedSQLContext {
307
307
}
308
308
309
309
test(" Union/Except/Intersect queries" ) {
310
- withSQLConf(SQLConf .RUNTIME_REOPTIMIZATION_ENABLED .key -> " true" ) {
310
+ withSQLConf(SQLConf .ADAPTIVE_EXECUTION_ENABLED .key -> " true" ) {
311
311
runAdaptiveAndVerifyResult(
312
312
"""
313
313
|SELECT * FROM testData
@@ -322,7 +322,7 @@ class AdaptiveQueryExecSuite extends QueryTest with SharedSQLContext {
322
322
}
323
323
324
324
test(" Subquery de-correlation in Union queries" ) {
325
- withSQLConf(SQLConf .RUNTIME_REOPTIMIZATION_ENABLED .key -> " true" ) {
325
+ withSQLConf(SQLConf .ADAPTIVE_EXECUTION_ENABLED .key -> " true" ) {
326
326
withTempView(" a" , " b" ) {
327
327
Seq (" a" -> 2 , " b" -> 1 ).toDF(" id" , " num" ).createTempView(" a" )
328
328
Seq (" a" -> 2 , " b" -> 1 ).toDF(" id" , " num" ).createTempView(" b" )
0 commit comments