GitHub user rtreffer opened a pull request: https://github.com/apache/spark/pull/5498
Export driver quirks Make it possible to (temporary) overwrite the driver quirks. This can be used to overcome problems with specific schemas or to add new jdbc driver support on the fly. A very simple implementation to dump the loading can be done like this (spark-shell) ``` class DumpQuirk extends org.apache.spark.sql.jdbc.DriverQuirks { def canHandle(url : String): Boolean = true def getCatalystType(sqlType: Int, typeName: String, size: Int, md: org.apache.spark.sql.types.MetadataBuilder): org.apache.spark.sql.types.DataType = { println("" + (sqlType, typeName, size, md)) null } def getJDBCType(dt: org.apache.spark.sql.types.DataType): (String, Option[Int]) = (null, None) } org.apache.spark.sql.jdbc.DriverQuirks.registerQuirks(new DumpQuirk()) ``` Not that this pull request is against 1.3 - I could not create a distribution with the current master. You can merge this pull request into a Git repository by running: $ git pull https://github.com/rtreffer/spark export-driver-quirks Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/5498.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #5498 ---- commit dca9372fc32e3222afc25e11394b1e620c115efa Author: Rene Treffer <tref...@measite.de> Date: 2015-04-13T21:38:59Z Export driver quirks Make it possible to (temporary) overwrite the driver quirks. This can be used to overcome problems with specific schemas or to add new jdbc driver support on the fly. ---- --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org