[GitHub] spark pull request #18195: [SPARK-20921][SQL][WIP] Support can config Oracle...

2017-06-23 Thread wangyum
Github user wangyum closed the pull request at:

https://github.com/apache/spark/pull/18195


---
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



[GitHub] spark pull request #18195: [SPARK-20921][SQL][WIP] Support can config Oracle...

2017-06-04 Thread wangyum
GitHub user wangyum opened a pull request:

https://github.com/apache/spark/pull/18195

[SPARK-20921][SQL][WIP] Support can config OracleDialect whether convert 
number(1) to BooleanType

## What changes were proposed in this pull request?

Support can config OracleDialect whether convert number(1) to BooleanType, 
`autoConvertNumber2Boolean` default is `true`, set `false` to keep number(1) to 
IntegerType, usage:
```scala
val jdbcUrl = "jdbc:oracle:thin:@127.0.0.1:1521/test"

val props = new java.util.Properties()
props.put("user", "user")
props.put("password", "password")
props.put("driver", "oracle.jdbc.driver.OracleDriver")
props.put("autoConvertNumber2Boolean", "false")

val jdbcDF = spark.read.jdbc(jdbcUrl, "TableName", props)
jdbcDF.show()
```

## How was this patch tested?

unit tests


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/wangyum/spark SPARK-20921

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/spark/pull/18195.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 #18195


commit febdf698f10730f01b368d1c99df088dcea29290
Author: Yuming Wang 
Date:   2017-06-04T14:21:36Z

Support OracleDialect whether convert number(1) to BooleanType




---
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