pan3793 commented on PR #47646: URL: https://github.com/apache/spark/pull/47646#issuecomment-2274903856
@dongjoon-hyun thanks for your questions > Why `DriverRegistry` is not sufficient for your use case? on the driver side, `JDBCOptions` has more chances to be invoked and initialized early than `DriverRegistry`; on the executor side, they will be initialized at almost the same time. https://github.com/apache/spark/blob/a3feffdff9cd17e0435ac5620731093f40d1a3bf/sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala#L230-L238 > Why you choose `JDBCOptions.scala` as a place for eager initialization? my idea is, to call `DriverManager.getDrivers` as early as possible, with a JVM-level global lock. I went through the JDBC-related code, `object JDBCOptions` should be a better place than `object DriverRegistry` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
