You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "beliefer (via GitHub)" <gi...@apache.org> on 2023/07/25 05:34:35 UTC

[GitHub] [spark] beliefer commented on a diff in pull request #42132: [SPARK-44528][CONNECT] Support proper usage of hasattr() for Connect dataframe

beliefer commented on code in PR #42132:
URL: https://github.com/apache/spark/pull/42132#discussion_r1273017921


##########
python/pyspark/sql/connect/dataframe.py:
##########
@@ -1584,8 +1584,16 @@ def __getattr__(self, name: str) -> "Column":
                 error_class="NOT_IMPLEMENTED",
                 message_parameters={"feature": f"{name}()"},
             )
+
+        if name not in self.columns:

Review Comment:
   How about use `elif:` here ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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