This is an automated email from the ASF dual-hosted git repository.

gurwls223 pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-3.1 by this push:
     new 07e1411  [MINOR][PYTHON][DOCS] Fix documentation for Python's 
recentProgress & lastProgress
07e1411 is described below

commit 07e1411df0a4d4b50815191d0aca317cad0dc267
Author: Alex Ott <[email protected]>
AuthorDate: Sun Dec 19 17:02:40 2021 +0900

    [MINOR][PYTHON][DOCS] Fix documentation for Python's recentProgress & 
lastProgress
    
    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
    ```
    
    The documentation was erroneous, and needs to be fixed to avoid confusion 
by readers
    
    yes, it's a fix of the documentation
    
    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 1335d83..432ec7d 100644
--- a/docs/structured-streaming-programming-guide.md
+++ b/docs/structured-streaming-programming-guide.md
@@ -2701,9 +2701,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]

Reply via email to