Skip to content

Commit

Permalink
[SPARK-16266][SQL][STREAING] Moved DataStreamReader/Writer from pyspa…
Browse files Browse the repository at this point in the history
…rk.sql to pyspark.sql.streaming

## What changes were proposed in this pull request?

- Moved DataStreamReader/Writer from pyspark.sql to pyspark.sql.streaming to make them consistent with scala packaging
- Exposed the necessary classes in sql.streaming package so that they appear in the docs
- Added pyspark.sql.streaming module to the docs

## How was this patch tested?
- updated unit tests.
- generated docs for testing visibility of pyspark.sql.streaming classes.

Author: Tathagata Das <[email protected]>

Closes #13955 from tdas/SPARK-16266.
  • Loading branch information
tdas authored and zsxwing committed Jun 29, 2016
1 parent 345212b commit 6650c05
Show file tree
Hide file tree
Showing 6 changed files with 511 additions and 499 deletions.
6 changes: 6 additions & 0 deletions python/docs/pyspark.sql.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,9 @@ pyspark.sql.functions module
.. automodule:: pyspark.sql.functions
:members:
:undoc-members:

pyspark.sql.streaming module
----------------------------
.. automodule:: pyspark.sql.streaming
:members:
:undoc-members:
3 changes: 2 additions & 1 deletion python/pyspark/sql/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
from pyspark.rdd import ignore_unicode_prefix
from pyspark.sql.session import _monkey_patch_RDD, SparkSession
from pyspark.sql.dataframe import DataFrame
from pyspark.sql.readwriter import DataFrameReader, DataStreamReader
from pyspark.sql.readwriter import DataFrameReader
from pyspark.sql.streaming import DataStreamReader
from pyspark.sql.types import Row, StringType
from pyspark.sql.utils import install_exception_handler

Expand Down
3 changes: 2 additions & 1 deletion python/pyspark/sql/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
from pyspark.traceback_utils import SCCallSiteSync
from pyspark.sql.types import _parse_datatype_json_string
from pyspark.sql.column import Column, _to_seq, _to_list, _to_java_column
from pyspark.sql.readwriter import DataFrameWriter, DataStreamWriter
from pyspark.sql.readwriter import DataFrameWriter
from pyspark.sql.streaming import DataStreamWriter
from pyspark.sql.types import *

__all__ = ["DataFrame", "DataFrameNaFunctions", "DataFrameStatFunctions"]
Expand Down
Loading

0 comments on commit 6650c05

Please sign in to comment.