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

    https://github.com/apache/spark/pull/4278#discussion_r23810260
  
    --- Diff: python/pyspark/sql.py ---
    @@ -2136,9 +2136,9 @@ def __getitem__(self, item):
     
         def __getattr__(self, name):
             """ Return the column by given name """
    -        if isinstance(name, basestring):
    -            return Column(self._jdf.apply(name))
    -        raise AttributeError
    +        if name.startswith("__"):
    --- End diff --
    
    `Row` [already had this 
check](https://github.com/JoshRosen/spark/blob/SPARK-5464-python-dataframe-help-command/python/pyspark/sql.py#L1773)
 in its `__getattr__` call, so I think it's safe to do the same thing here, too.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to