sririshindra commented on a change in pull request #28330:
URL: https://github.com/apache/spark/pull/28330#discussion_r417357078



##########
File path: 
sql/core/src/test/scala/org/apache/spark/sql/execution/metric/SQLMetricsSuite.scala
##########
@@ -365,16 +384,19 @@ class SQLMetricsSuite extends SharedSparkSession with 
SQLMetricsTestUtils
       withTempView("testDataForJoin") {
         // Assume the execution plan is
         // ... -> BroadcastNestedLoopJoin(nodeId = 1) -> 
TungstenProject(nodeId = 0)
-        val query = "SELECT * FROM testData2 left JOIN testDataForJoin ON " +
+        val leftQuery = "SELECT * FROM testData2 LEFT JOIN testDataForJoin ON 
" +
           "testData2.a * testDataForJoin.a != testData2.a + testDataForJoin.a"
-        Seq(false, true).foreach { enableWholeStage =>
-          val df = spark.sql(query)
-          testSparkPlanMetrics(df, 2, Map(
-            0L -> (("BroadcastNestedLoopJoin", Map(
-              "number of output rows" -> 12L)))),
-            enableWholeStage
-          )
-        }
+        val rightQuery = "SELECT * FROM testData2 RIGHT JOIN testDataForJoin 
ON " +
+          "testData2.a * testDataForJoin.a != testData2.a + testDataForJoin.a"
+        Seq((leftQuery, false), (rightQuery, false), (leftQuery, true), 
(rightQuery, true))
+          .foreach { case (query, enableWholeStage) =>
+            val df = spark.sql(query)
+            testSparkPlanMetrics(df, 2, Map(
+              0L -> (("BroadcastNestedLoopJoin", Map(
+                "number of output rows" -> 12L)))),
+              enableWholeStage
+            )
+          }

Review comment:
       I tried reformatting this piece of code using intellij reformat feature 
and that didn't change anything. Could you please let me know where the 
indentation is wrong so that I can fix it.




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to