Skip to content

Commit 8fdd039

Browse files
[MINOR][DOCS] Fix ForEachWriter Java example
### What changes were proposed in this pull request? Structured streaming documentation example fix ### Why are the changes needed? Currently the java example uses incorrect syntax ### Does this PR introduce any user-facing change? Yes ### How was this patch tested? In IDE Closes #27671 from roland1982/foreachwriter_java_example_fix. Authored-by: roland-ondeviceresearch <[email protected]> Signed-off-by: HyukjinKwon <[email protected]>
1 parent 1b793ed commit 8fdd039

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/structured-streaming-programming-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2156,7 +2156,7 @@ streamingDatasetOfString.writeStream.foreach(
21562156
In Java, you have to extend the class `ForeachWriter` ([docs](api/java/org/apache/spark/sql/ForeachWriter.html)).
21572157
{% highlight java %}
21582158
streamingDatasetOfString.writeStream().foreach(
2159-
new ForeachWriter[String] {
2159+
new ForeachWriter<String>() {
21602160

21612161
@Override public boolean open(long partitionId, long version) {
21622162
// Open connection

0 commit comments

Comments
 (0)