zhengruifeng commented on code in PR #42608:
URL: https://github.com/apache/spark/pull/42608#discussion_r1302368571


##########
python/pyspark/sql/connect/dataframe.py:
##########
@@ -1623,6 +1624,10 @@ def __getitem__(self, item: Union[int, str, Column, 
List, Tuple]) -> Union[Colum
             alias = self._get_alias()
             if self._plan is None:
                 raise SparkConnectException("Cannot analyze on empty plan.")
+
+            if "." not in item and "*" not in item and "`" not in item and 
item not in self.columns:

Review Comment:
   similar to 
https://github.com/apache/spark/commit/91e97f92fe76f9718cd16af0c761d5530bdb37ee,
 but need to cases like `*`, `a.*`, ``aa.bb``



##########
python/pyspark/sql/connect/dataframe.py:
##########
@@ -1623,6 +1624,10 @@ def __getitem__(self, item: Union[int, str, Column, 
List, Tuple]) -> Union[Colum
             alias = self._get_alias()
             if self._plan is None:
                 raise SparkConnectException("Cannot analyze on empty plan.")
+
+            if "." not in item and "*" not in item and "`" not in item and 
item not in self.columns:

Review Comment:
   similar to 
https://github.com/apache/spark/commit/91e97f92fe76f9718cd16af0c761d5530bdb37ee,
 but need to skip cases like `*`, `a.*`, ``aa.bb``



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to