cloud-fan commented on a change in pull request #26434: [SPARK-29544] [SQL] 
optimize skewed partition based on data size
URL: https://github.com/apache/spark/pull/26434#discussion_r358060127
 
 

 ##########
 File path: 
sql/core/src/test/scala/org/apache/spark/sql/execution/adaptive/AdaptiveQueryExecSuite.scala
 ##########
 @@ -32,6 +33,30 @@ class AdaptiveQueryExecSuite
 
   import testImplicits._
 
+  protected lazy val skewData1: DataFrame = {
+    val df1 =
+      spark
+        .range(0, 1000, 1, 10)
+        .selectExpr("id % 5 as key1", "id as value1").toDF()
+    df1.createOrReplaceTempView("skewData1")
+    df1
+  }
+
+  protected lazy val skewData2: DataFrame = {
+    val df2 =
+      spark
+        .range(0, 1000, 1, 10)
+        .selectExpr("id % 1 as key2", "id as value2").toDF()
+    df2.createOrReplaceTempView("skewData2")
+    df2
+  }
+
+  protected override def beforeAll(): Unit = {
+    super.beforeAll()
+    skewData1
 
 Review comment:
   If we only access the data by view name, we can just create these 2 temp 
views in `beforeAll` and drop them in `afterAll`.

----------------------------------------------------------------
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]


With regards,
Apache Git Services

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

Reply via email to