zhengruifeng commented on code in PR #42548:
URL: https://github.com/apache/spark/pull/42548#discussion_r1297874638


##########
python/pyspark/sql/tests/connect/test_connect_basic.py:
##########
@@ -3346,6 +3346,25 @@ def 
test_can_create_multiple_sessions_to_different_remotes(self):
             PySparkSession.builder.create()
             self.assertIn("Create a new SparkSession is only supported with 
SparkConnect.", str(e))
 
+class SparkConnectSessionWithOptionsTest(ReusedConnectTestCase):
+    def setUp(self) -> None:
+        self.spark = (
+            PySparkSession.builder
+            .config("spark.sql.adaptive.enabled", False)
+            .appName(self.__class__.__name__)
+            .remote("local[4]")
+            .getOrCreate()
+        )
+
+    def tearDown(self):
+        self.spark.stop()
+
+    def test_config(self):
+        # Config
+        self.assertEqual(self.spark.conf.get("spark.sql.adaptive.enabled"), 
"false")
+        with self.assertRaises(SparkConnectException) as e:
+            self.spark.conf.get("some.conf")

Review Comment:
   I think the two lines are not needed



##########
python/pyspark/testing/connectutils.py:
##########
@@ -167,6 +167,7 @@ def conf(cls):
         Override this in subclasses to supply a more specific conf
         """
         conf = SparkConf(loadDefaults=False)
+        conf.set("spark.sql.legacy.setCommandRejectsSparkCoreConfs", "false")

Review Comment:
   why we need this change?



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

To unsubscribe, e-mail: [email protected]

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