GitHub user sureshthalamati opened a pull request:
https://github.com/apache/spark/pull/16891
[SPARK-19318][SQL] Fix to treat JDBC connection properties specified by the
user in case-sensitive manner.
## What changes were proposed in this pull request?
The reason for test failure is that the property
âoracle.jdbc.mapDateToTimestampâ set by the test was getting converted into
all lower case. Oracle database expects this property in case-sensitive manner.
This test was passing in previous releases because connection properties
were sent as user specified for the test case scenario. Fixes to handle all
option uniformly in case-insensitive manner, converted the JDBC connection
properties also to lower case.
This PR enhances CaseInsensitiveMap to keep track of input case-sensitive
keys , and uses those when creating connection properties that are passed to
the JDBC connection.
Alternative approach PR https://github.com/apache/spark/pull/16847 is to
pass original input keys to JDBC data source by adding check in the Data
source class and handle case-insensitivity in the JDBC source code.
## How was this patch tested?
Added new test cases to JdbcSuite , and OracleIntegrationSuite. Ran docker
integration tests passed on my laptop, all tests passed successfully.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/sureshthalamati/spark
jdbc_case_senstivity_props_fix-SPARK-19318
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/16891.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 #16891
----
commit b2eba09bff1015d9ecccffff15a1c2ed7c09b6a9
Author: sureshthalamati <[email protected]>
Date: 2017-02-09T22:36:54Z
[SPARK-19318][SQL} Fix to keep track of JDBC connection properties in the
user specified options in case-sensitive manner.
commit 41d336251cb70d7be26171c6a1f484e742ba83bd
Author: sureshthalamati <[email protected]>
Date: 2017-02-11T04:28:00Z
removed unnecessary getOrelse as the map is internal one, and the should
exist
----
---
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]