Ngone51 commented on a change in pull request #29270:
URL: https://github.com/apache/spark/pull/29270#discussion_r471203868



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/TPCDSBase.scala
##########
@@ -256,4 +285,39 @@ trait TPCDSSchema {
          |${options.mkString("\n")}
        """.stripMargin)
   }
+
+  private val originalCBCEnabled = conf.cboEnabled
+  private val originalPlanStatsEnabled = conf.planStatsEnabled
+  private val originalJoinReorderEnabled = conf.joinReorderEnabled
+
+  override def beforeAll(): Unit = {
+    super.beforeAll()
+    if (injectStats) {
+      // Sets configurations for enabling the optimization rules that
+      // exploit data statistics.
+      conf.setConf(SQLConf.CBO_ENABLED, true)
+      conf.setConf(SQLConf.PLAN_STATS_ENABLED, true)
+      conf.setConf(SQLConf.JOIN_REORDER_ENABLED, true)

Review comment:
       hmm..I'm not sure about this. but it seems `preferSortMergeJoin` is 
enabled by default? Or you mean we should test both `preferSortMergeJoin` 
enabled and disabled?




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



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

Reply via email to