EnricoMi commented on code in PR #37407:
URL: https://github.com/apache/spark/pull/37407#discussion_r972848355
##########
python/pyspark/sql/dataframe.py:
##########
@@ -3082,6 +3082,13 @@ def unpivot(
When no "id" columns are given, the unpivoted DataFrame consists of
only the
"variable" and "value" columns.
+ The `values` columns must not be empty so at least one value must be
given to be unpivoted.
+ When `values` is `None`, all non-id columns will be unpivoted.
+
+ Note: A column that is referenced by an id column expression is
considered an id column
+ itself. For instance `col("id") * 2` references column `id`, so `id`
is considered an
+ id column and not a value column.
Review Comment:
No, see https://github.com/apache/spark/pull/37407/files#r972844049.
--
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]