Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22858#discussion_r228730582
  
    --- Diff: python/pyspark/sql/functions.py ---
    @@ -2326,7 +2326,7 @@ def schema_of_json(json):
         >>> df.select(schema_of_json('{"a": 0}').alias("json")).collect()
         [Row(json=u'struct<a:bigint>')]
         """
    -    if isinstance(json, basestring):
    +    if isinstance(json, str):
    --- End diff --
    
    shall we apply it to 2.4? I'm not aware of the background, why we did not 
put
    ```
    if sys.version >= '3':
        basestring = str
    ```
    in 2.4?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to