HyukjinKwon commented on code in PR #38879:
URL: https://github.com/apache/spark/pull/38879#discussion_r1040549249
##########
python/pyspark/sql/connect/plan.py:
##########
@@ -249,6 +280,7 @@ class Project(LogicalPlan):
def __init__(self, child: Optional["LogicalPlan"], *columns:
"ColumnOrName") -> None:
super().__init__(child)
self._raw_columns = list(columns)
+ _all_of(self._raw_columns, ColumnOrName)
Review Comment:
Hm .. typing instances aren't actually supposed to be used runtime type
checking. In addition, `_all_of` implementation seems like extracting the
arguments from the type hints which won't cover a case like `Dict[str, int]`.
My understanding of adding type hints is also to avoid such type checking on
each argument so I don't feel strongly on this change to be honest.
Adding @zero323 who has a better insight in this.
--
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]