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



##########
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:
       Yes sure.




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



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

Reply via email to