zsxwing commented on code in PR #46909:
URL: https://github.com/apache/spark/pull/46909#discussion_r1631388870
##########
python/pyspark/sql/streaming/listener.py:
##########
@@ -75,6 +75,11 @@ def spark(self) -> Optional["SparkSession"]: # type:
ignore[name-defined] # noq
else:
return None
+ @spark.setter
+ def spark(self, session):
+ # For backward compatibility
+ self._sparkSession = session
Review Comment:
Do we need to update `_set_spark_session` to not override if the user has
already set a spark session?
##########
python/pyspark/sql/streaming/listener.py:
##########
@@ -75,6 +75,11 @@ def spark(self) -> Optional["SparkSession"]: # type:
ignore[name-defined] # noq
else:
return None
+ @spark.setter
+ def spark(self, session):
+ # For backward compatibility
+ self._sparkSession = session
Review Comment:
Do we need to update `_set_spark_session` to not overwrite if the user has
already set a spark session?
--
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]