Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15053#discussion_r84684716
  
    --- Diff: python/pyspark/sql/streaming.py ---
    @@ -612,9 +616,12 @@ def load(self, path=None, format=None, schema=None, 
**options):
             :param schema: optional :class:`pyspark.sql.types.StructType` for 
the input schema.
             :param options: all other string options
     
    -        >>> json_sdf = spark.readStream.format("json") \\
    -        ...     .schema(sdf_schema) \\
    -        ...     .load(tempfile.mkdtemp())
    +        >>> import tempfile
    +        >>> from pyspark.sql.types import StructType, StructField, 
StringType
    +        >>> sdf_schema = StructType([StructField("data", StringType(), 
False)])
    +        >>> json_sdf = (spark.readStream.format("json")
    +        ...             .schema(sdf_schema)
    +        ...             .load(tempfile.mkdtemp()))
    --- End diff --
    
    Strictly, I believe the removed syntax is encouraged as I guess from the 
other codes and documentation. We might better revert the syntax back if there 
is not a strong specific reason.


---
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