Skip to content

Commit fa7c991

Browse files
committed
add test in SQLMetricsSuite
1 parent aceab91 commit fa7c991

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

sql/core/src/test/scala/org/apache/spark/sql/execution/metric/SQLMetricsSuite.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,13 @@ class SQLMetricsSuite extends SparkFunSuite with SharedSQLContext {
153153
)
154154
}
155155

156+
test("Sort metrics") {
157+
// Assume the execution plan is
158+
// WholeStageCodegen(nodeId = 0, Range(nodeId = 2) -> Sort(nodeId = 1))
159+
val df = sqlContext.range(10).sort('id)
160+
testSparkPlanMetrics(df, 2, Map.empty)
161+
}
162+
156163
test("SortMergeJoin metrics") {
157164
// Because SortMergeJoin may skip different rows if the number of partitions is different, this
158165
// test should use the deterministic number of partitions.

0 commit comments

Comments
 (0)