-
- Downloads
[SPARK-6888] [SQL] Make the jdbc driver handling user-definable
Replace the DriverQuirks with JdbcDialect(s) (and MySQLDialect/PostgresDialect) and allow developers to change the dialects on the fly (for new JDBCRRDs only). Some types (like an unsigned 64bit number) can be trivially mapped to java. The status quo is that the RRD will fail to load. This patch makes it possible to overwrite the type mapping to read e.g. 64Bit numbers as strings and handle them afterwards in software. JDBCSuite has an example that maps all types to String, which should always work (at the cost of extra code afterwards). As a side effect it should now be possible to develop simple dialects out-of-tree and even with spark-shell. Author: Rene Treffer <treffer@measite.de> Closes #5555 from rtreffer/jdbc-dialects and squashes the following commits: 3cbafd7 [Rene Treffer] [SPARK-6888] ignore classes belonging to changed API in MIMA report fe7e2e8 [Rene Treffer] [SPARK-6888] Make the jdbc driver handling user-definable
Showing
- project/MimaExcludes.scala 8 additions, 0 deletionsproject/MimaExcludes.scala
- sql/core/src/main/scala/org/apache/spark/sql/jdbc/DriverQuirks.scala 0 additions, 99 deletions...c/main/scala/org/apache/spark/sql/jdbc/DriverQuirks.scala
- sql/core/src/main/scala/org/apache/spark/sql/jdbc/JDBCRDD.scala 6 additions, 5 deletions...re/src/main/scala/org/apache/spark/sql/jdbc/JDBCRDD.scala
- sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala 211 additions, 0 deletions...c/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala
- sql/core/src/main/scala/org/apache/spark/sql/jdbc/jdbc.scala 21 additions, 22 deletionssql/core/src/main/scala/org/apache/spark/sql/jdbc/jdbc.scala
- sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCSuite.scala 49 additions, 0 deletions.../src/test/scala/org/apache/spark/sql/jdbc/JDBCSuite.scala
Loading
Please register or sign in to comment