Dejan Krakovic created SPARK-59476:
--------------------------------------
Summary: Throw NULL_DATA_SOURCE_OPTION for null JDBC url instead
of Null exception
Key: SPARK-59476
URL: https://issues.apache.org/jira/browse/SPARK-59476
Project: Spark
Issue Type: Bug
Components: Spark Core
Affects Versions: 4.2.0
Reporter: Dejan Krakovic
A JDBC read with a null {{url}} option satisfied the presence check
({{{}parameters.isDefinedAt(JDBC_URL){}}}) but produced a null value, so
{{DriverManager.getDriver(null)}} threw a raw NullPointerException that
surfaced as INTERNAL_ERROR. Guard the null url in JDBCOptions and throw the
user-facing NULL_DATA_SOURCE_OPTION error, mirroring the existing null-value
guard in {{{}asProperties{}}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]