Errors#

Classes#

AnalysisException([message, error_class, ...])

Failed to analyze a SQL query plan.

ArithmeticException([message, error_class, ...])

Arithmetic exception thrown from Spark with an error class.

ArrayIndexOutOfBoundsException([message, ...])

Array index out of bounds exception thrown from Spark with an error class.

DateTimeException([message, error_class, ...])

Datetime exception thrown from Spark with an error class.

IllegalArgumentException([message, ...])

Passed an illegal or inappropriate argument.

NumberFormatException([message, ...])

Number format exception thrown from Spark with an error class.

ParseException([message, error_class, ...])

Failed to parse a SQL command.

PySparkAssertionError([message, ...])

Wrapper class for AssertionError to support error classes.

PySparkAttributeError([message, ...])

Wrapper class for AttributeError to support error classes.

PySparkException([message, error_class, ...])

Base Exception for handling errors generated from PySpark.

PySparkKeyError([message, error_class, ...])

Wrapper class for KeyError to support error classes.

PySparkNotImplementedError([message, ...])

Wrapper class for NotImplementedError to support error classes.

PySparkPicklingError([message, error_class, ...])

Wrapper class for pickle.PicklingError to support error classes.

PySparkRuntimeError([message, error_class, ...])

Wrapper class for RuntimeError to support error classes.

PySparkTypeError([message, error_class, ...])

Wrapper class for TypeError to support error classes.

PySparkValueError([message, error_class, ...])

Wrapper class for ValueError to support error classes.

PySparkImportError([message, error_class, ...])

Wrapper class for ImportError to support error classes.

PySparkIndexError([message, error_class, ...])

Wrapper class for IndexError to support error classes.

PythonException([message, error_class, ...])

Exceptions thrown from Python workers.

QueryContext()

Query context of a PySparkException.

QueryContextType(value)

The type of QueryContext.

QueryExecutionException([message, ...])

Failed to execute a query.

RetriesExceeded([message, error_class, ...])

Represents an exception which is considered retriable, but retry limits were exceeded

SessionNotSameException([message, ...])

Performed the same operation on different SparkSession.

SparkRuntimeException([message, ...])

Runtime exception thrown from Spark with an error class.

SparkUpgradeException([message, ...])

Exception thrown because of Spark upgrade.

SparkNoSuchElementException([message, ...])

Exception thrown for java.util.NoSuchElementException.

StreamingQueryException([message, ...])

Exception that stopped a StreamingQuery.

TempTableAlreadyExistsException([message, ...])

Failed to create temp view since it is already exists.

UnknownException([message, error_class, ...])

None of the other exceptions.

UnsupportedOperationException([message, ...])

Unsupported operation exception thrown from Spark with an error class.

Methods#

PySparkException.getErrorClass()

Returns an error class as a string.

PySparkException.getMessage()

Returns full error message.

PySparkException.getMessageParameters()

Returns a message parameters as a dictionary.

PySparkException.getQueryContext()

Returns QueryContext.

PySparkException.getSqlState()

Returns an SQLSTATE as a string.