Hyukjin Kwon created SPARK-61093:
------------------------------------
Summary: Raise the errors of PySpark of Column.try_cast, and of
Column.isin of a tuple, in the Python client
Key: SPARK-61093
URL: https://issues.apache.org/jira/browse/SPARK-61093
Project: Spark
Issue Type: Bug
Components: Connect
Affects Versions: connect-rust-4.3.0
Reporter: Hyukjin Kwon
In PySpark Connect, {{Column.try_cast(dataType)}} raises {{NOT_EXPECTED_TYPE}}
({{expected_type}} "DataType or str") for a type that is neither a {{DataType}}
nor a str, and {{Column.isin(*cols)}} unpacks a single list or set, not a
tuple, which is a value: {{col.isin((1, 2))}} raises {{UNSUPPORTED_DATA_TYPE}}
of tuple, as {{lit((1, 2))}} does.
The Rust-backed Python client raises a plain {{TypeError}} of {{try_cast(1)}},
and unpacks a single tuple in {{isin}}, so {{col.isin((1, 2))}} is
{{col.isin(1, 2)}}. Raise 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]