You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/07/28 00:09:00 UTC

[GitHub] [spark] maropu commented on a change in pull request #25274: [SPARK-28537][SQL] DebugExec cannot debug broadcast or columnar related queries.

maropu commented on a change in pull request #25274: [SPARK-28537][SQL] DebugExec cannot debug broadcast or columnar related queries.
URL: https://github.com/apache/spark/pull/25274#discussion_r307981077
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/execution/debug/DebuggingSuite.scala
 ##########
 @@ -48,4 +50,25 @@ class DebuggingSuite extends SparkFunSuite with SharedSQLContext {
     assert(res.forall{ case (subtree, code) =>
       subtree.contains("Range") && code.contains("Object[]")})
   }
+
+  test("debug() or broadcast and columnar") {
+    val rightDF = spark.range(10)
+    val leftDF = spark.range(10)
+    val joinedDF = leftDF.join(rightDF, leftDF("id") === rightDF("id"))
+    Try {
 
 Review comment:
   How about checking the actual output like this instead of using `Try`?
   ```
       assert(joinedDF.queryExecution.sparkPlan.collect { case _: BroadcastHashJoinExec => true }.nonEmpty)
       val output = new java.io.ByteArrayOutputStream()
       Console.withOut(output) {
         joinedDF.debug()
       }
       assert(output.toString.contains("BroadcastHashJoin"))
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org