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

    https://github.com/apache/spark/pull/19459#discussion_r144931022
  
    --- Diff: python/pyspark/sql/dataframe.py ---
    @@ -70,12 +70,12 @@ class DataFrame(object):
         .. versionadded:: 1.3
         """
     
    -    def __init__(self, jdf, sql_ctx):
    +    def __init__(self, jdf, sql_ctx, schema=None):
             self._jdf = jdf
             self.sql_ctx = sql_ctx
             self._sc = sql_ctx and sql_ctx._sc
             self.is_cached = False
    -        self._schema = None  # initialized lazily
    +        self._schema = schema  # initialized lazily if None
    --- End diff --
    
    Sure, I can undo it.  I don't really like manually assigning the schema 
after the constructor but it's just done in these 2 special cases..


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to