cloud-fan commented on a change in pull request #29270:
URL: https://github.com/apache/spark/pull/29270#discussion_r470048887



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/TPCDSBase.scala
##########
@@ -298,12 +302,22 @@ trait TPCDSBase extends SharedSparkSession {
     tableNames.foreach { tableName =>
       createTable(spark, tableName)
       if (injectStats) {
-        // To simulate plan generation on actual TPCDS data, injects data 
stats here
+        // To simulate plan generation on actual TPC-DS data, injects data 
stats here
         spark.sessionState.catalog.alterTableStats(
           TableIdentifier(tableName), 
Some(TPCDSTableStats.sf100TableStats(tableName)))
       }
     }
   }
 
+  override def afterAll(): Unit = {
+    conf.setConf(SQLConf.CBO_ENABLED, originalCBCEnabled)
+    conf.setConf(SQLConf.PLAN_STATS_ENABLED, originalPlanStatsEnabled)
+    conf.setConf(SQLConf.JOIN_REORDER_ENABLED, originalJoinReorderEnabled)
+    tableNames.foreach { tableName =>
+      spark.sessionState.catalog.alterTableStats(TableIdentifier(tableName), 
None)

Review comment:
       shall we drop the table at the end?




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