-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-48567][SS] StreamingQuery.lastProgress should return the actual StreamingQueryProgress #46921
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-48567][SS] StreamingQuery.lastProgress should return the actual StreamingQueryProgress #46921
Changes from 1 commit
c73ebfc
d967119
ef7a116
f8d7403
707d5bd
917adb6
cab14ac
8355342
b43dc96
984d00b
e51e1b1
b2cd7c9
4c8f01e
53afe51
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -500,7 +500,13 @@ def fromJson(cls, j: Dict[str, Any]) -> "StreamingQueryProgress": | |
| ) | ||
|
|
||
| def __getitem__(self, key): | ||
| return getattr(self, key) | ||
| # Before Spark 4.0, StreamingQuery.lastProgress returns a dict, which casts id and runId | ||
| # to string. To prevent breaking change, also cast them to string when accessed with | ||
| # __getitem__. | ||
| if key == "id" or key == "runId": | ||
| return str(getattr(self, key)) | ||
| else: | ||
| return getattr(self, key) | ||
|
|
||
| def __setitem__(self, key, value): | ||
|
||
| internal_key = "_" + key | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if this is really needed. But if we delete this if, now "query.lastProgress["id"]" would return type uuid, before it was string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because there would be lots of breaking changes (e.g. now the
sourcesmethod also return the actualSourceProgressspark/python/pyspark/sql/streaming/listener.py
Line 595 in ef7a116
let me also make these subclass of dict...