Hyukjin Kwon created SPARK-61055:
------------------------------------
Summary: Return the status and the exception of a StreamingQuery,
and check the timeouts of its waits, in the Python client as PySpark does
Key: SPARK-61055
URL: https://issues.apache.org/jira/browse/SPARK-61055
Project: Spark
Issue Type: Bug
Components: Connect
Affects Versions: connect-rust-4.3.0
Reporter: Hyukjin Kwon
In PySpark Connect, {{StreamingQuery.status}} is a dict of the {{message}},
{{isDataAvailable}} and {{isTriggerActive}} of the query, and
{{StreamingQuery.exception()}} returns the {{StreamingQueryException}} of
{{pyspark.errors}} of a failed query: of the message of the server, with its
JVM stack trace, and of the error class as its reason.
{{pyspark.sql.streaming.StreamingQueryException}} and
{{pyspark.sql.streaming.query.StreamingQueryException}} are that class of
{{pyspark.errors}}. {{awaitTermination(timeout)}} and
{{spark.streams.awaitAnyTermination(timeout)}} raise {{VALUE_NOT_POSITIVE}} of
{{timeout}} for a timeout that is not a positive number, and
{{explain(extended)}} takes an int as a bool.
The Rust-backed Python client returns an object of {{status_message}},
{{is_data_available}} and {{is_trigger_active}} attributes for {{status}},
which is neither subscriptable nor iterable, and an object that is not an
exception for {{exception()}}, whose {{str()}} is its repr. Its
{{pyspark.sql.streaming.StreamingQueryException}} is that class, so {{except
StreamingQueryException:}} raises a {{TypeError}}. It raises
{{INVALID_TIMEOUT}}, or a {{TypeError}}, for the timeouts, and a {{TypeError}}
for an int of {{explain}}. Return and 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]