Hyukjin Kwon created SPARK-61122:
------------------------------------
Summary: Re-export the exceptions of pyspark.errors from
pyspark.sql.utils, in the Python client as PySpark does
Key: SPARK-61122
URL: https://issues.apache.org/jira/browse/SPARK-61122
Project: Spark
Issue Type: Bug
Components: Connect
Affects Versions: connect-rust-4.3.0
Reporter: Hyukjin Kwon
PySpark's {{pyspark.sql.utils}} re-exports the exceptions of
{{pyspark.errors}}: {{AnalysisException}}, {{ParseException}},
{{IllegalArgumentException}}, {{StreamingQueryException}},
{{QueryExecutionException}}, {{PythonException}}, {{UnknownException}},
{{SparkUpgradeException}}, {{PySparkImportError}},
{{PySparkNotImplementedError}}, {{PySparkRuntimeError}} and
{{CapturedException}}. That is the import path of these exceptions before
{{pyspark.errors}}, which user code and Apache Spark's tests still use, as
{{from pyspark.sql.utils import AnalysisException}}.
The Python client's {{pyspark.sql.utils}} re-exports none of them, so that
import raises {{ImportError}}.
The fix is to re-export 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]