Skip to content

Conversation

@jjthomas
Copy link
Contributor

What changes were proposed in this pull request?

Updated structured streaming programming guide with new windowed example.

How was this patch tested?

Docs

@jjthomas jjthomas changed the title updated structured streaming guide [SPARK-16114] [SQL] updated structured streaming guide Jul 13, 2016
).toDF("word", "timestamp")

// Group the data by window and word and compute the count of each group
val windowedCounts = words.groupBy(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took a look at the built doc again and imagined what it would look like. This would look very verbose. I think since the nearest example in the doc (Basic Operations - Selection, Projection, Aggregation) uses device data and already has all the boilerplate code to define DeviceData class, etc., lets not change the code snippet to the exact one in the example.

Can you revert all the code snippet changes, and just do one change for the Scala snippet.

  • Change df.col("..") to use $"..."
  • Add import spark.implicits._

@tdas
Copy link
Contributor

tdas commented Jul 13, 2016

ok to test

.avg("signal")
// Group the data by window and word and compute the count of each group
val windowedCounts = words.groupBy(
window($"timestamp", "10 minutes", "5 minutes"), $"word"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put word on next line, to be consistent with other examples.

@tdas
Copy link
Contributor

tdas commented Jul 13, 2016

LGTM.

@tdas
Copy link
Contributor

tdas commented Jul 13, 2016

Merging to master and 2.0. Tests dont matter here.

asfgit pushed a commit that referenced this pull request Jul 13, 2016
## What changes were proposed in this pull request?

Updated structured streaming programming guide with new windowed example.

## How was this patch tested?

Docs

Author: James Thomas <[email protected]>

Closes #14183 from jjthomas/ss_docs_update.

(cherry picked from commit 51a6706)
Signed-off-by: Tathagata Das <[email protected]>
@asfgit asfgit closed this in 51a6706 Jul 13, 2016
@SparkQA
Copy link

SparkQA commented Jul 13, 2016

Test build #62276 has finished for PR 14183 at commit 4342efb.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jul 13, 2016

Test build #62277 has finished for PR 14183 at commit 77c4a6e.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants