[
https://issues.apache.org/jira/browse/SPARK-59476?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dejan Krakovic resolved SPARK-59476.
------------------------------------
Resolution: Not A Problem
{{asProperties}} is a strict {{val}} evaluated at construction before
{{{}url{}}}/{{{}driverClass{}}}, and it already throws
{{NULL_DATA_SOURCE_OPTION}} for a null {{url}} (SPARK-48601), so the new {{url
== null}} guard is unreachable and the test passes on master without the change.
> 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
> Priority: Major
> Labels: pull-request-available
>
> 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]