[
https://issues.apache.org/jira/browse/DRILL-8005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17425248#comment-17425248
]
ASF GitHub Bot commented on DRILL-8005:
---------------------------------------
cgivre opened a new pull request #2327:
URL: https://github.com/apache/drill/pull/2327
# [DRILL-8005](https://issues.apache.org/jira/browse/DRILL-8005): Add Writer
to JDBC Storage Plugin
## Description
This PR adds the ability to write to JDBC storage. Users will be able to
execute the following queries against JDBC data sources.
- `CREATE TABLE AS`
- `CREATE TABLE IF NOT EXISTS`
- `DROP TABLE`
## Example Queries:
```sql
CREATE TABLE IF NOT EXISTS pg.public.`t1` AS
SELECT int_field, float_field, varchar_field, boolean_field
FROM cp.`json/dataTypes.json`
```
### Known Limitations:
* JDBC in general does not support complex types, and current implementation
of this plugin will throw an exception if a user tries to write a complex field
to a JDBC source.
* This PR attempts to be as generic as possible and as such, the translation
between Drill data types and JDBC data types isn't always the same.
Specifically, various databases use different types for INT, FLOAT etc. The
plugin will default back to `NUMERIC` for most `FLOAT` types.
* `VARBINARY` is not supported yet.
* Write capability was tested on MySQL, Postgres and H2. Given the lack of
standardization of DDL queries, there may be bugs when trying to write to other
JDBC data sources.
## Documentation
Documentation will be provided in a separate pull request.
## Testing
This PR adds unit tests for the writer for MySQL, Postgres, and H2.
Additionally, this PR adds additional unit tests for the JDBC storage plugin
and Postgres.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
> Add Writer to JDBC Storage Plugin
> ---------------------------------
>
> Key: DRILL-8005
> URL: https://issues.apache.org/jira/browse/DRILL-8005
> Project: Apache Drill
> Issue Type: Improvement
> Components: Storage - JDBC
> Affects Versions: 1.19.0
> Reporter: Charles Givre
> Assignee: Charles Givre
> Priority: Major
> Fix For: 1.20.0
>
>
> Current implementation of Drill only allows writing to file systems. This
> issue proposes extending the JDBC plugin to allow writing to JDBC data
> sources. This will do so by implementing:
> CREATE TABLE AS
> DROP TABLE
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)