{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/71087433","id":71087433,"diff_hunk":"@@ -65,11 +51,13 @@ val words = lines.as[String].flatMap(_.split(\" \"))\n val wordCounts = words.groupBy(\"value\").count()\n {% endhighlight %}\n \n-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.","path":"docs/structured-streaming-programming-guide.md","position":46,"original_position":46,"commit_id":"4b566b1b5d21af24032701c17b41c7e411659b92","original_commit_id":"4b566b1b5d21af24032701c17b41c7e411659b92","user":{"login":"srowen","id":822522,"avatar_url":"https://avatars.githubusercontent.com/u/822522?v=3","gravatar_id":"","url":"https://api.github.com/users/srowen","html_url":"https://github.com/srowen","followers_url":"https://api.github.com/users/srowen/followers","following_url":"https://api.github.com/users/srowen/following{/other_user}","gists_url":"https://api.github.com/users/srowen/gists{/gist_id}","starred_url":"https://api.github.com/users/srowen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srowen/subscriptions","organizations_url":"https://api.github.com/users/srowen/orgs","repos_url":"https://api.github.com/users/srowen/repos","events_url":"https://api.github.com/users/srowen/events{/privacy}","received_events_url":"https://api.github.com/users/srowen/received_events","type":"User","site_admin":false},"body":"Is that change valid -- not sure either way but can you show why? Both are valid in Java and Scala","created_at":"2016-07-17T19:00:54Z","updated_at":"2016-07-17T19:00:54Z","html_url":"https://github.com/apache/spark/pull/14234#discussion_r71087433","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/14234","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/71087433"},"html":{"href":"https://github.com/apache/spark/pull/14234#discussion_r71087433"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/14234"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/14234","id":77722702,"html_url":"https://github.com/apache/spark/pull/14234","diff_url":"https://github.com/apache/spark/pull/14234.diff","patch_url":"https://github.com/apache/spark/pull/14234.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/14234","number":14234,"state":"open","locked":false,"title":"[MINOR][SQL][STREAMING][DOCS] Fix minor typos, punctuations and grammar","user":{"login":"ahmed-mahran","id":8685962,"avatar_url":"https://avatars.githubusercontent.com/u/8685962?v=3","gravatar_id":"","url":"https://api.github.com/users/ahmed-mahran","html_url":"https://github.com/ahmed-mahran","followers_url":"https://api.github.com/users/ahmed-mahran/followers","following_url":"https://api.github.com/users/ahmed-mahran/following{/other_user}","gists_url":"https://api.github.com/users/ahmed-mahran/gists{/gist_id}","starred_url":"https://api.github.com/users/ahmed-mahran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahmed-mahran/subscriptions","organizations_url":"https://api.github.com/users/ahmed-mahran/orgs","repos_url":"https://api.github.com/users/ahmed-mahran/repos","events_url":"https://api.github.com/users/ahmed-mahran/events{/privacy}","received_events_url":"https://api.github.com/users/ahmed-mahran/received_events","type":"User","site_admin":false},"body":"## What changes were proposed in this pull request?\r\n\r\nMinor fixes correcting some typos, punctuations, grammar.\r\nAdding more anchors for easy navigation.\r\nFixing minor issues with code snippets.\r\n\r\n\r\n## How was this patch tested?\r\n\r\n`jekyll serve`\r\n","created_at":"2016-07-17T00:06:14Z","updated_at":"2016-07-17T19:00:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"869c5300249851f01ee4b1862da0612371701e00","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/14234/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/14234/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/14234/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/4b566b1b5d21af24032701c17b41c7e411659b92","head":{"label":"ahmed-mahran:b-struct-streaming-docs","ref":"b-struct-streaming-docs","sha":"4b566b1b5d21af24032701c17b41c7e411659b92","user":{"login":"ahmed-mahran","id":8685962,"avatar_url":"https://avatars.githubusercontent.com/u/8685962?v=3","gravatar_id":"","url":"https://api.github.com/users/ahmed-mahran","html_url":"https://github.com/ahmed-mahran","followers_url":"https://api.github.com/users/ahmed-mahran/followers","following_url":"https://api.github.com/users/ahmed-mahran/following{/other_user}","gists_url":"https://api.github.com/users/ahmed-mahran/gists{/gist_id}","starred_url":"https://api.github.com/users/ahmed-mahran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahmed-mahran/subscriptions","organizations_url":"https://api.github.com/users/ahmed-mahran/orgs","repos_url":"https://api.github.com/users/ahmed-mahran/repos","events_url":"https://api.github.com/users/ahmed-mahran/events{/privacy}","received_events_url":"https://api.github.com/users/ahmed-mahran/received_events","type":"User","site_admin":false},"repo":{"id":37591448,"name":"spark","full_name":"ahmed-mahran/spark","owner":{"login":"ahmed-mahran","id":8685962,"avatar_url":"https://avatars.githubusercontent.com/u/8685962?v=3","gravatar_id":"","url":"https://api.github.com/users/ahmed-mahran","html_url":"https://github.com/ahmed-mahran","followers_url":"https://api.github.com/users/ahmed-mahran/followers","following_url":"https://api.github.com/users/ahmed-mahran/following{/other_user}","gists_url":"https://api.github.com/users/ahmed-mahran/gists{/gist_id}","starred_url":"https://api.github.com/users/ahmed-mahran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahmed-mahran/subscriptions","organizations_url":"https://api.github.com/users/ahmed-mahran/orgs","repos_url":"https://api.github.com/users/ahmed-mahran/repos","events_url":"https://api.github.com/users/ahmed-mahran/events{/privacy}","received_events_url":"https://api.github.com/users/ahmed-mahran/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ahmed-mahran/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/ahmed-mahran/spark","forks_url":"https://api.github.com/repos/ahmed-mahran/spark/forks","keys_url":"https://api.github.com/repos/ahmed-mahran/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ahmed-mahran/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ahmed-mahran/spark/teams","hooks_url":"https://api.github.com/repos/ahmed-mahran/spark/hooks","issue_events_url":"https://api.github.com/repos/ahmed-mahran/spark/issues/events{/number}","events_url":"https://api.github.com/repos/ahmed-mahran/spark/events","assignees_url":"https://api.github.com/repos/ahmed-mahran/spark/assignees{/user}","branches_url":"https://api.github.com/repos/ahmed-mahran/spark/branches{/branch}","tags_url":"https://api.github.com/repos/ahmed-mahran/spark/tags","blobs_url":"https://api.github.com/repos/ahmed-mahran/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ahmed-mahran/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ahmed-mahran/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/ahmed-mahran/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ahmed-mahran/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/ahmed-mahran/spark/languages","stargazers_url":"https://api.github.com/repos/ahmed-mahran/spark/stargazers","contributors_url":"https://api.github.com/repos/ahmed-mahran/spark/contributors","subscribers_url":"https://api.github.com/repos/ahmed-mahran/spark/subscribers","subscription_url":"https://api.github.com/repos/ahmed-mahran/spark/subscription","commits_url":"https://api.github.com/repos/ahmed-mahran/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/ahmed-mahran/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/ahmed-mahran/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/ahmed-mahran/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/ahmed-mahran/spark/contents/{+path}","compare_url":"https://api.github.com/repos/ahmed-mahran/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ahmed-mahran/spark/merges","archive_url":"https://api.github.com/repos/ahmed-mahran/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ahmed-mahran/spark/downloads","issues_url":"https://api.github.com/repos/ahmed-mahran/spark/issues{/number}","pulls_url":"https://api.github.com/repos/ahmed-mahran/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/ahmed-mahran/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/ahmed-mahran/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ahmed-mahran/spark/labels{/name}","releases_url":"https://api.github.com/repos/ahmed-mahran/spark/releases{/id}","deployments_url":"https://api.github.com/repos/ahmed-mahran/spark/deployments","created_at":"2015-06-17T11:41:04Z","updated_at":"2016-01-28T16:17:02Z","pushed_at":"2016-07-17T00:00:38Z","git_url":"git://github.com/ahmed-mahran/spark.git","ssh_url":"git@github.com:ahmed-mahran/spark.git","clone_url":"https://github.com/ahmed-mahran/spark.git","svn_url":"https://github.com/ahmed-mahran/spark","homepage":null,"size":173795,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"416730483643a0a92dbd6ae4ad07e80ceb3c5285","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":17165658,"name":"spark","full_name":"apache/spark","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/spark","description":"Mirror of Apache Spark","fork":false,"url":"https://api.github.com/repos/apache/spark","forks_url":"https://api.github.com/repos/apache/spark/forks","keys_url":"https://api.github.com/repos/apache/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/spark/teams","hooks_url":"https://api.github.com/repos/apache/spark/hooks","issue_events_url":"https://api.github.com/repos/apache/spark/issues/events{/number}","events_url":"https://api.github.com/repos/apache/spark/events","assignees_url":"https://api.github.com/repos/apache/spark/assignees{/user}","branches_url":"https://api.github.com/repos/apache/spark/branches{/branch}","tags_url":"https://api.github.com/repos/apache/spark/tags","blobs_url":"https://api.github.com/repos/apache/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/spark/languages","stargazers_url":"https://api.github.com/repos/apache/spark/stargazers","contributors_url":"https://api.github.com/repos/apache/spark/contributors","subscribers_url":"https://api.github.com/repos/apache/spark/subscribers","subscription_url":"https://api.github.com/repos/apache/spark/subscription","commits_url":"https://api.github.com/repos/apache/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/spark/contents/{+path}","compare_url":"https://api.github.com/repos/apache/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/spark/merges","archive_url":"https://api.github.com/repos/apache/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/spark/downloads","issues_url":"https://api.github.com/repos/apache/spark/issues{/number}","pulls_url":"https://api.github.com/repos/apache/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/spark/labels{/name}","releases_url":"https://api.github.com/repos/apache/spark/releases{/id}","deployments_url":"https://api.github.com/repos/apache/spark/deployments","created_at":"2014-02-25T08:00:08Z","updated_at":"2016-07-17T14:11:56Z","pushed_at":"2016-07-17T16:54:56Z","git_url":"git://github.com/apache/spark.git","ssh_url":"git@github.com:apache/spark.git","clone_url":"https://github.com/apache/spark.git","svn_url":"https://github.com/apache/spark","homepage":null,"size":501696,"stargazers_count":9320,"watchers_count":9320,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8646,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":440,"forks":8646,"open_issues":440,"watchers":9320,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/14234"},"html":{"href":"https://github.com/apache/spark/pull/14234"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/14234"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/14234/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/14234/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/14234/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/4b566b1b5d21af24032701c17b41c7e411659b92"}}}}
{"actor":{"display_login":"srowen"}}