HyukjinKwon opened a new pull request, #46909:
URL: https://github.com/apache/spark/pull/46909
### What changes were proposed in this pull request?
This PR proposes to make StreamingQueryListener.spark settable
### Why are the changes needed?
```python
from pyspark.sql.streaming.listener import StreamingQueryListener
class MyListener(StreamingQueryListener):
def __init__(self, spark):
self.spark = spark
def onQueryStarted(self, event):
pass
def onQueryProgress(self, event):
pass
def onQueryTerminated(self, event):
pass
MyListener(spark)
```
is broken from 3.5.0 after SPARK-42941.
### Does this PR introduce _any_ user-facing change?
Yes, end users who implement `StreamingQueryListener` can add `spark`
attribute in their implementation.
### How was this patch tested?
Manually tested, and added a unittest.
### Was this patch authored or co-authored using generative AI tooling?
No.
--
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]