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 2020/04/26 18:25:27 UTC
[GitHub] [spark] sririshindra commented on a change in pull request #28330: [SPARK-31377][SQL][TEST] Added unit tests to 'number of output rows metric' for some joins in SQLMetricSuite
sririshindra commented on a change in pull request #28330:
URL: https://github.com/apache/spark/pull/28330#discussion_r415369992
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/execution/metric/SQLMetricsSuite.scala
##########
@@ -341,6 +341,62 @@ class SQLMetricsSuite extends SharedSparkSession with SQLMetricsTestUtils
}
}
+ test("ShuffledHashJoin(outer) metrics") {
+ withSQLConf(SQLConf.AUTO_BROADCASTJOIN_THRESHOLD.key -> "40",
Review comment:
Setting it to -1 would trigger SortMergeJoin instead of ShuffledHashJoin based on the rules in Spark Strategies.
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/execution/metric/SQLMetricsSuite.scala
##########
@@ -341,6 +341,62 @@ class SQLMetricsSuite extends SharedSparkSession with SQLMetricsTestUtils
}
}
+ test("ShuffledHashJoin(outer) metrics") {
+ withSQLConf(SQLConf.AUTO_BROADCASTJOIN_THRESHOLD.key -> "40",
+ SQLConf.SHUFFLE_PARTITIONS.key -> "2",
+ SQLConf.PREFER_SORTMERGEJOIN.key -> "false") {
+ val df1 = Seq((1, "1"), (2, "2")).toDF("key", "value")
+ val df2 = (1 to 10).map(i => (i, i.toString)).toSeq.toDF("key2", "value")
+
+ Seq(("right_outer", 0L, df1, df2, false), ("left_outer", 0L, df2, df1, false),
+ ("right_outer", 0L, df1, df2, true), ("left_outer", 0L, df2, df1, true))
+ .foreach { case (joinType, nodeId, df1, df2, enableWholeStage) =>
Review comment:
fixed in the latest commit
----------------------------------------------------------------
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
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org