Hyukjin Kwon created SPARK-61015:
------------------------------------
Summary: Take a column name or a Column for the ids and values of
unpivot and melt, and the subset of replace, in the Python client as PySpark
does
Key: SPARK-61015
URL: https://issues.apache.org/jira/browse/SPARK-61015
Project: Spark
Issue Type: Bug
Components: Connect
Affects Versions: connect-rust-4.3.0
Reporter: Hyukjin Kwon
In PySpark, the {{ids}} and {{values}} of {{df.unpivot(ids, values,
variableColumnName, valueColumnName)}} and {{df.melt(...)}} are a column name,
a Column, or a list or tuple of them, and the {{subset}} of
{{df.replace(to_replace, value, subset)}} is a column name or a list or tuple
of them.
The Rust-backed Python client takes only lists: {{df.unpivot("id", ["v"],
"var", "val")}} raises {{TypeError: argument 'ids': Can't extract `str` to
`Vec`}}, as does {{df.replace("a", "z", "k")}} for its subset. Take them as
PySpark does.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]