Hyukjin Kwon created SPARK-61091:
------------------------------------
Summary: Return the NamedTuples of pyspark.sql.catalog from
Catalog, and register functions with registerFunction, in the Python client as
PySpark does
Key: SPARK-61091
URL: https://issues.apache.org/jira/browse/SPARK-61091
Project: Spark
Issue Type: Bug
Components: Connect
Affects Versions: connect-rust-4.3.0
Reporter: Hyukjin Kwon
In PySpark Connect, the methods of {{spark.catalog}} return the NamedTuples of
{{pyspark.sql.catalog}}: {{CatalogMetadata}}, {{Database}}, {{Table}} (of its
{{database}} property), {{Column}}, {{Function}} and {{TablePartition}}, which
are tuples ({{_fields}}, {{_asdict}}, indexing, unpacking and equality of
tuples). {{Catalog.registerFunction(name, f, returnType)}} warns its
{{FutureWarning}} ("Deprecated in 2.3.0. Use spark.udf.register instead.") and
registers the function with {{spark.udf.register}}.
The Rust-backed Python client returns classes of its own, which are not tuples
(they have no {{_fields}}), names the class of a column {{CatalogColumn}}, and
its {{registerFunction}} raises {{NOT_EXPECTED_TYPE}} of {{evalType}}. Return
them, and register the functions, 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]