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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to