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]


Reply via email to