PySparkException.
getSqlState
Returns an SQLSTATE as a string.
Errors generated in Python have no SQLSTATE, so it always returns None.
New in version 3.4.0.
See also
PySparkException.getErrorClass()
PySparkException.getMessageParameters()