michaelzhan-db commented on code in PR #42548:
URL: https://github.com/apache/spark/pull/42548#discussion_r1300505734
##########
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:
Otherwise `test_basic_connect` fails with
```
> ERROR [0.000s]: setUpClass
(pyspark.sql.tests.connect.test_connect_basic.SparkConnectSessionWithOptionsTest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/Users/m.zhang/spark/python/pyspark/testing/connectutils.py", line
187, in setUpClass
> PySparkSession.builder.config(conf=cls.conf())
> File "/Users/m.zhang/spark/python/pyspark/sql/session.py", line 480, in
getOrCreate
> return RemoteSparkSession.builder.config(map=opts).getOrCreate()
> File "/Users/m.zhang/spark/python/pyspark/sql/connect/session.py", line
217, in getOrCreate
> session = self.create()
> File "/Users/m.zhang/spark/python/pyspark/sql/connect/session.py", line
208, in create
> self._apply_options(session)
> File "/Users/m.zhang/spark/python/pyspark/sql/connect/session.py", line
182, in _apply_options
> session.conf.set(k, v)
> File "/Users/m.zhang/spark/python/pyspark/sql/connect/conf.py", line 41,
in set
> result = self._client.config(operation)
> File "/Users/m.zhang/spark/python/pyspark/sql/connect/client/core.py",
line 1347, in config
> self._handle_error(error)
> File "/Users/m.zhang/spark/python/pyspark/sql/connect/client/core.py",
line 1477, in _handle_error
> self._handle_rpc_error(error)
> File "/Users/m.zhang/spark/python/pyspark/sql/connect/client/core.py",
line 1513, in _handle_rpc_error
> raise convert_exception(info, status.message) from None
> pyspark.errors.exceptions.connect.AnalysisException:
[CANNOT_MODIFY_CONFIG] Cannot modify the value of the Spark config:
"spark.connect.execute.reattachable.senderMaxStreamDuration".
> See also
'https://spark.apache.org/docs/latest/sql-migration-guide.html#ddl-statements'.
```
--
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]