-
- Downloads
[SPARK-16886][EXAMPLES][DOC] Fix some examples to be consistent and indentation in documentation
## What changes were proposed in this pull request? Originally this PR was based on #14491 but I realised that fixing examples are more sensible rather than comments. This PR fixes three things below: - Fix two wrong examples in `structured-streaming-programming-guide.md`. Loading via `read.load(..)` without `as` will be `Dataset<Row>` not `Dataset<String>` in Java. - Fix indentation across `structured-streaming-programming-guide.md`. Python has 4 spaces and Scala and Java have double spaces. These are inconsistent across the examples. - Fix `StructuredNetworkWordCountWindowed` and `StructuredNetworkWordCount` in Java and Scala to initially load `DataFrame` and `Dataset<Row>` to be consistent with the comments and some examples in `structured-streaming-programming-guide.md` and to match Scala and Java to Python one (Python one loads it as `DataFrame` initially). ## How was this patch tested? N/A Closes https://github.com/apache/spark/pull/14491 Author: hyukjinkwon <gurwls223@gmail.com> Author: Ganesh Chand <ganeshchand@Ganeshs-MacBook-Pro-2.local> Closes #14564 from HyukjinKwon/SPARK-16886.
Showing
- docs/structured-streaming-programming-guide.md 101 additions, 101 deletionsdocs/structured-streaming-programming-guide.md
- examples/src/main/java/org/apache/spark/examples/sql/streaming/JavaStructuredNetworkWordCount.java 3 additions, 3 deletions...xamples/sql/streaming/JavaStructuredNetworkWordCount.java
- examples/src/main/java/org/apache/spark/examples/sql/streaming/JavaStructuredNetworkWordCountWindowed.java 16 additions, 14 deletions...sql/streaming/JavaStructuredNetworkWordCountWindowed.java
- examples/src/main/scala/org/apache/spark/examples/sql/streaming/StructuredNetworkWordCount.scala 2 additions, 2 deletions...k/examples/sql/streaming/StructuredNetworkWordCount.scala
- examples/src/main/scala/org/apache/spark/examples/sql/streaming/StructuredNetworkWordCountWindowed.scala 2 additions, 2 deletions...es/sql/streaming/StructuredNetworkWordCountWindowed.scala
Loading
Please register or sign in to comment