EnricoMi commented on code in PR #37407:
URL: https://github.com/apache/spark/pull/37407#discussion_r970574953


##########
python/pyspark/sql/dataframe.py:
##########
@@ -3064,7 +3064,7 @@ def cube(self, *cols: "ColumnOrName") -> "GroupedData":  
# type: ignore[misc]
 
     def unpivot(
         self,
-        ids: Optional[Union["ColumnOrName", List["ColumnOrName"], 
Tuple["ColumnOrName", ...]]],
+        ids: Union["ColumnOrName", List["ColumnOrName"], Tuple["ColumnOrName", 
...]],

Review Comment:
   Just to differentiate the semantics of `ids` from `values`. When `values` is 
`None`, it means "magically" all non-id columns. When `ids` is `None`, it does 
not magically mean all non-value columns. Disallowing `None` for `ids` requires 
the user to explicitly state `ids=[]`, and that is what you get.
   
   Similar to the Scala / Java API where you have to provide `ids` as well, 
even if an empty `Array`.



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