This is an automated email from the ASF dual-hosted git repository.
gurwls223 pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.2 by this push:
new 63f09c1 [MINOR][PYTHON][DOCS] Fix documentation for Python's
recentProgress & lastProgress
63f09c1 is described below
commit 63f09c12fadc466ff35f6ac0b58eb210a03dd8a4
Author: Alex Ott <[email protected]>
AuthorDate: Sun Dec 19 17:02:40 2021 +0900
[MINOR][PYTHON][DOCS] Fix documentation for Python's recentProgress &
lastProgress
### What changes were proposed in this pull request?
This small PR fixes incorrect documentation in Structured Streaming Guide
where Python's `recentProgress` & `lastProgress` where shown as functions
although they are
[properties](https://github.com/apache/spark/blob/master/python/pyspark/sql/streaming.py#L117),
so if they are called as functions it generates error:
```
>>> query.lastProgress()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'dict' object is not callable
```
### Why are the changes needed?
The documentation was erroneous, and needs to be fixed to avoid confusion
by readers
### Does this PR introduce _any_ user-facing change?
yes, it's a fix of the documentation
### How was this patch tested?
Not necessary
Closes #34947 from alexott/fix-python-recent-progress-docs.
Authored-by: Alex Ott <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
(cherry picked from commit bad96e6d029dff5be9efaf99f388cd9436741b6f)
Signed-off-by: Hyukjin Kwon <[email protected]>
---
docs/structured-streaming-programming-guide.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/structured-streaming-programming-guide.md
b/docs/structured-streaming-programming-guide.md
index 03dc8e5..047340d 100644
--- a/docs/structured-streaming-programming-guide.md
+++ b/docs/structured-streaming-programming-guide.md
@@ -2945,9 +2945,9 @@ query.awaitTermination() # block until query is
terminated, with stop() or wit
query.exception() # the exception if the query has been terminated with
error
-query.recentProgress() # an array of the most recent progress updates for
this query
+query.recentProgress # a list of the most recent progress updates for this
query
-query.lastProgress() # the most recent progress update of this streaming
query
+query.lastProgress # the most recent progress update of this streaming query
{% endhighlight %}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]