Skip to content

Commit 4b9b0e8

Browse files
committed
For comments.
1 parent 8e39ed7 commit 4b9b0e8

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

sql/core/src/test/scala/org/apache/spark/sql/execution/adaptive/AdaptiveQueryExecSuite.scala

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,11 +1048,8 @@ class AdaptiveQueryExecSuite
10481048
assert(partitionsNum1 === 6)
10491049
}
10501050

1051-
val partitionsNum2 = df2.rdd.collectPartitions().length
1052-
assert(partitionsNum2 == 10)
1053-
1054-
val partitionsNum3 = df3.rdd.collectPartitions().length
1055-
assert(partitionsNum3 == 10)
1051+
assert(df2.rdd.collectPartitions().length == 10)
1052+
assert(df3.rdd.collectPartitions().length == 10)
10561053
}
10571054
}
10581055
}
@@ -1064,17 +1061,22 @@ class AdaptiveQueryExecSuite
10641061
SQLConf.COALESCE_PARTITIONS_ENABLED.key -> "true",
10651062
SQLConf.COALESCE_PARTITIONS_INITIAL_PARTITION_NUM.key -> "50",
10661063
SQLConf.SHUFFLE_PARTITIONS.key -> "10") {
1064+
10671065
val partitionsNum1 = (1 to 10).toDF.repartition($"value")
10681066
.rdd.collectPartitions().length
1069-
10701067
val partitionsNum2 = (1 to 10).toDF.repartitionByRange($"value".asc)
10711068
.rdd.collectPartitions().length
1069+
val partitionsNum3 = (1 to 10).toDF.repartition($"value" + 1)
1070+
.rdd.collectPartitions().length
1071+
10721072
if (enableAQE) {
10731073
assert(partitionsNum1 < 10)
10741074
assert(partitionsNum2 < 10)
1075+
assert(partitionsNum3 < 10)
10751076
} else {
10761077
assert(partitionsNum1 === 10)
10771078
assert(partitionsNum2 === 10)
1079+
assert(partitionsNum3 === 10)
10781080
}
10791081
}
10801082
}

0 commit comments

Comments
 (0)