diff options
author | Yuming Wang <wgyumg@gmail.com> | 2016-08-05 16:11:54 +0100 |
---|---|---|
committer | Sean Owen <sowen@cloudera.com> | 2016-08-05 16:11:54 +0100 |
commit | 39a2b2ea74d420caa37019e3684f65b3a6fcb388 (patch) | |
tree | 7d98547f7167129d7fd7b9b4843786de68026bc2 /licenses | |
parent | e026064143367e4614cb866e321cc521fdde3170 (diff) | |
download | spark-39a2b2ea74d420caa37019e3684f65b3a6fcb388.tar.gz spark-39a2b2ea74d420caa37019e3684f65b3a6fcb388.tar.bz2 spark-39a2b2ea74d420caa37019e3684f65b3a6fcb388.zip |
[SPARK-16625][SQL] General data types to be mapped to Oracle
## What changes were proposed in this pull request?
Spark will convert **BooleanType** to **BIT(1)**, **LongType** to **BIGINT**, **ByteType** to **BYTE** when saving DataFrame to Oracle, but Oracle does not support BIT, BIGINT and BYTE types.
This PR is convert following _Spark Types_ to _Oracle types_ refer to [Oracle Developer's Guide](https://docs.oracle.com/cd/E19501-01/819-3659/gcmaz/)
Spark Type | Oracle
----|----
BooleanType | NUMBER(1)
IntegerType | NUMBER(10)
LongType | NUMBER(19)
FloatType | NUMBER(19, 4)
DoubleType | NUMBER(19, 4)
ByteType | NUMBER(3)
ShortType | NUMBER(5)
## How was this patch tested?
Add new tests in [JDBCSuite.scala](https://github.com/wangyum/spark/commit/22b0c2a4228cb8b5098ad741ddf4d1904e745ff6#diff-dc4b58851b084b274df6fe6b189db84d) and [OracleDialect.scala](https://github.com/wangyum/spark/commit/22b0c2a4228cb8b5098ad741ddf4d1904e745ff6#diff-5e0cadf526662f9281aa26315b3750ad)
Author: Yuming Wang <wgyumg@gmail.com>
Closes #14377 from wangyum/SPARK-16625.
Diffstat (limited to 'licenses')
0 files changed, 0 insertions, 0 deletions