Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16678#discussion_r97370977
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JDBCOptions.scala
 ---
    @@ -73,17 +73,7 @@ class JDBCOptions(
       // ------------------------------------------------------------
       // Optional parameters
       // ------------------------------------------------------------
    -  val driverClass = {
    -    val userSpecifiedDriverClass = parameters.get(JDBC_DRIVER_CLASS)
    -    userSpecifiedDriverClass.foreach(DriverRegistry.register)
    -
    -    // Performing this part of the logic on the driver guards against the 
corner-case where the
    -    // driver returned for a URL is different on the driver and executors 
due to classpath
    -    // differences.
    -    userSpecifiedDriverClass.getOrElse {
    -      DriverManager.getDriver(url).getClass.getCanonicalName
    -    }
    -  }
    +  val driverClass = parameters.get(JDBC_DRIVER_CLASS)
    --- End diff --
    
    ```Scala
    spark.read.format("jdbc").option("url", "jdbc:sqlite:").option("dbtable", 
"x").load
    ```
    In the above code, it is not passing `JDBC_DRIVER_CLASS`. Thus, this does 
not help. 
    
    Actually, if @darabos passes `JDBC_DRIVER_CLASS` as an JDBC option, the 
problem is solved.  Thus, I suspect it is caused by the classloader. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to