prakharjain09 commented on a change in pull request #28634:
URL: https://github.com/apache/spark/pull/28634#discussion_r429966067



##########
File path: 
sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala
##########
@@ -1203,14 +1203,24 @@ abstract class DDLSuite extends QueryTest with 
SQLTestUtils {
   }
 
   test("alter table: recover partitions (sequential)") {
-    withSQLConf(RDD_PARALLEL_LISTING_THRESHOLD.key -> "10") {
+    val oldRddParallelListingThreshold = spark.sparkContext.conf.get(
+      RDD_PARALLEL_LISTING_THRESHOLD)
+    try {
+      spark.sparkContext.conf.set(RDD_PARALLEL_LISTING_THRESHOLD.key, "10")

Review comment:
       Yes this works. I have verified this by printing the value of this conf 
inside the main code in AlterTableRecoverPartitions class. Both of the tests 
prints different values - 0 and 10.
   
   Also there are many tests which modify conf using "sc.conf.set". Ex - 
TaskSetManagerSuite, RDDSuite etc.




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