Skip to content

Commit 2fef901

Browse files
nagaarjun-pHyukjinKwon
authored andcommitted
[MINOR][DOCS] Updated the docstring of DataStreamWriter.foreach() method
Fixed the documentation ### What changes were proposed in this pull request? There isn't much clarity on the docstring of the DataStreamWriter.foreach() method that takes an object with process() method, as a input. As part of this PR, The docstring is fixed. ### Why are the changes needed? There isn't much clarity on the docstring of the DataStreamWriter.foreach() method that takes an object with process() method, as a input. ### Does this PR introduce _any_ user-facing change? Yes. This change modifies the docstring in the DataStreamWriter.foreach() method. ### How was this patch tested? Simple change on docstring. I haven't tested the changes. Need some support with the testing. ### Was this patch authored or co-authored using generative AI tooling? No Closes #51316 from nagaarjun-p/master. Authored-by: Mine4106 <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
1 parent 19c8f90 commit 2fef901

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/pyspark/sql/streaming/readwriter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1549,7 +1549,7 @@ def foreach(self, f: Union[Callable[[Row], None], "SupportsProcess"]) -> "DataSt
15491549
... def close(self, error):
15501550
... print("Closed with error: %s" % str(error))
15511551
...
1552-
>>> q = df.writeStream.foreach(print_row).start()
1552+
>>> q = df.writeStream.foreach(RowPrinter()).start()
15531553
>>> time.sleep(3)
15541554
>>> q.stop()
15551555
"""

0 commit comments

Comments
 (0)