File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
main/scala/org/apache/spark/sql/execution/debug
test/scala/org/apache/spark/sql/execution/debug Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -77,9 +77,9 @@ package object debug {
77
77
}
78
78
79
79
/**
80
- * Augments [[DataFrame ]]s with debug methods.
80
+ * Augments [[Dataset ]]s with debug methods.
81
81
*/
82
- implicit class DebugQuery (query : DataFrame ) extends Logging {
82
+ implicit class DebugQuery (query : Dataset [_] ) extends Logging {
83
83
def debug (): Unit = {
84
84
val plan = query.queryExecution.executedPlan
85
85
val visited = new collection.mutable.HashSet [TreeNodeRef ]()
Original file line number Diff line number Diff line change @@ -19,13 +19,19 @@ package org.apache.spark.sql.execution.debug
19
19
20
20
import org .apache .spark .SparkFunSuite
21
21
import org .apache .spark .sql .test .SharedSQLContext
22
+ import org .apache .spark .sql .test .SQLTestData .TestData
22
23
23
24
class DebuggingSuite extends SparkFunSuite with SharedSQLContext {
24
25
25
26
test(" DataFrame.debug()" ) {
26
27
testData.debug()
27
28
}
28
29
30
+ test(" Dataset.debug()" ) {
31
+ import testImplicits ._
32
+ testData.as[TestData ].debug()
33
+ }
34
+
29
35
test(" debugCodegen" ) {
30
36
val res = codegenString(sqlContext.range(10 ).groupBy(" id" ).count().queryExecution.executedPlan)
31
37
assert(res.contains(" Subtree 1 / 2" ))
You can’t perform that action at this time.
0 commit comments