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_r358059773
########## 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: what's the point here? We can just make them `val` not `lazy val` ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org