itholic commented on a change in pull request #34354:
URL: https://github.com/apache/spark/pull/34354#discussion_r778528081



##########
File path: python/pyspark/sql/functions.py
##########
@@ -1670,7 +1671,19 @@ def expr(str: str) -> Column:
     return Column(sc._jvm.functions.expr(str))
 
 
+@overload
 def struct(*cols: "ColumnOrName") -> Column:
+    ...
+
+
+@overload
+def struct(__cols: Union[List["ColumnOrName_"], Tuple["ColumnOrName_", ...]]) 
-> Column:
+    ...

Review comment:
       Maybe seems like `List["ColumnOrName"]` just works fine.
   
   Could you briefly explain why we need to use `Union` the `List` and `Tuple` 
??
   
   And could I ask if what is the `...` mean in `["ColumnOrName_", ...]` ??




-- 
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