GitHub user klinvill opened a pull request:
https://github.com/apache/spark/pull/16746
[SPARK-15648][SQL] Add teradataDialect for JDBC connection to Teradata
The contribution is my original work and I license the work to the project
under the projectâs open source license.
Note: the Teradata JDBC connector limits the row size to 64K. The default
string datatype equivalent I used is a 255 character/byte length varchar. This
effectively limits the max number of string columns to 250 when using the
Teradata jdbc connector.
## What changes were proposed in this pull request?
Added a teradataDialect for JDBC connection to Teradata. The Teradata
dialect uses VARCHAR(255) in place of TEXT for string datatypes, and CHAR(1) in
place of BIT(1) for boolean datatypes.
## How was this patch tested?
(Please explain how this patch was tested. E.g. unit tests, integration
tests, manual tests)
(If this patch involves UI changes, please attach a screenshot; otherwise,
remove this)
I added two unit tests to double check that the types get set correctly for
a teradata jdbc url. I also ran a couple manual tests to make sure the jdbc
connector worked with teradata and to make sure that an error was thrown if a
row could potentially exceed 64K (this error comes from the teradata jdbc
connector, not from the spark code). I did not check how string columns longer
than 255 characters are handled.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/klinvill/spark master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/16746.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 #16746
----
commit 4b8d9a6d6856ed88963950921cfc64978ee2388a
Author: Kirby Linvill <[email protected]>
Date: 2017-01-26T17:47:04Z
SPARK-15648: Added teradataDialect for JDBC connection
Note: the Teradata JDBC connector limits the row size to 64K. The default
string datatype equivalent is a 255 character/byte length varchar.
----
---
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]