GitHub user vkorukanti opened a pull request:
https://github.com/apache/drill/pull/532
DRILL-4732: Update JDBC driver to use the new prepared statement APIs in
DrillClient
Changes specific to DRILL-4732 are in last commit.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/vkorukanti/drill DRILL-4732
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/drill/pull/532.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 #532
----
commit 32ba03c7abd9a3784c9a5376dd2835325fe8d5f9
Author: vkorukanti <[email protected]>
Date: 2016-06-09T23:03:06Z
DRILL-4728: Add support for new metadata fetch APIs
+ Protobuf messages
- GetCatalogsReq -> GetCatalogsResp
- GetSchemasReq -> GetSchemasResp
- GetTablesReq -> GetTablesResp
- GetColumnsReq -> GetColumnsResp
+ Java Drill client changes
+ Server side changes to handle the metadata API calls
- Provide a self contained `Runnable` implementation for each metadata API
that process the requests and sends the response to client
- In `UserWorker` override the `handle` method that takes the
`ResponseSender` and
send the response from the `handle` method instead of returning it.
- Add a method for each new API to UserWorker to submit the metadata work.
- Add a method `addNewWork(Runnable runnable)` to `WorkerBee` to submit a
generic
`Runnable` to `ExecutorService`.
- Move out couple of methods from `QueryContext` into a separate interface
`SchemaConfigInfoProvider` to enable instantiating Schema trees without
the
full `QueryContext`
+ New protobuf messages increased the `jdbc-all.jar` size. Up the limit to
21MB.
Change-Id: I5a5e4b453caf912d832ff8547c5789c884195cc4
commit a2ca69b3a81a8ff66bd671da775318204d49dda0
Author: vkorukanti <[email protected]>
Date: 2016-06-13T18:20:25Z
DRILL-4729: Add support for prepared statement implementation on server side
+ Add following APIs for Drill Java client
- DrillRpcFuture<CreatePreparedStatementResp>
createPreparedStatement(final String query)
- void executePreparedStatement(final PreparedStatement
preparedStatement, UserResultsListener resultsListener)
- List<QueryDataBatch> executePreparedStatement(final PreparedStatement
preparedStatement) (for testing purpose)
+ Separated out the interface from UserClientConnection. It makes it easy
to have wrappers which need to
tap the messages and data going to the actual client.
+ Implement CREATE_PREPARED_STATEMENT and handle RunQuery with
PreparedStatement
+ Test changes to support prepared statement as query type
+ Add tests in TestPreparedStatementProvider
Change-Id: Id26cbb9ed809f0ab3c7530e6a5d8314d2e868b86
commit 2d91a605eac808561f2bf9ae60e6582936a4e9f0
Author: vkorukanti <[email protected]>
Date: 2016-06-20T21:40:05Z
DRILL-4732: Update JDBC driver to use the new prepared statement APIs on
DrillClient
Change-Id: Ib8131789e9ad257b3f60859bc4115eaef43aee48
----
---
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.
---