zhengruifeng commented on code in PR #39925:
URL: https://github.com/apache/spark/pull/39925#discussion_r1102251856
##########
python/pyspark/sql/connect/dataframe.py:
##########
@@ -1280,10 +1280,20 @@ def __getitem__(self, item: Union[int, str, Column,
List, Tuple]) -> Union[Colum
if isinstance(item, str):
# Check for alias
alias = self._get_alias()
- if alias is not None:
- return col(alias)
+ _col = alias if alias is not None else item
+ if _col == "*":
+ return Column(UnresolvedStar(unparsed_target=None))
+ elif _col.endswith(".*"):
+ return Column(UnresolvedStar(unparsed_target=_col))
else:
- return col(item)
+ if self._plan is None:
Review Comment:
I don't think so
add this check just because of `self._plan`'s type
`self._plan: Optional[plan.LogicalPlan]`
--
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]