Github user ahmed-mahran commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14234#discussion_r71073714
  
    --- Diff: docs/structured-streaming-programming-guide.md ---
    @@ -65,11 +51,13 @@ val words = lines.as[String].flatMap(_.split(" "))
     val wordCounts = words.groupBy("value").count()
     {% endhighlight %}
     
    -This `lines` DataFrame represents an unbounded table containing the 
streaming text data. This table contains one column of strings named 
“value”, and each line in the streaming text data becomes a row in the 
table. Note, that this is not currently receiving any data as we are just 
setting up the transformation, and have not yet started it. Next, we have 
converted the DataFrame to a  Dataset of String using `.as(Encoders.STRING())`, 
so that we can apply the `flatMap` operation to split each line into multiple 
words. The resultant `words` Dataset contains all the words. Finally, we have 
defined the `wordCounts` DataFrame by grouping by the unique values in the 
Dataset and counting them. Note that this is a streaming DataFrame which 
represents the running word counts of the stream.
    --- End diff --
    
    `.as(Encoders.STRING())`, java's, changed to `.as[String]`, scala's


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to