aboutsummaryrefslogtreecommitdiff
path: root/protocol/src/main/java/org/apache/drill/exec/proto/beans/QueryType.java
diff options
context:
space:
mode:
authorvkorukanti <venki@dremio.com>2016-06-13 11:20:25 -0700
committervkorukanti <venki@dremio.com>2016-08-08 13:47:49 -0700
commit14f6ec7dd9b010de6c884431e443eb788ce54339 (patch)
tree06b5660f485657622aaf9584f9b8c761e1f0a89e /protocol/src/main/java/org/apache/drill/exec/proto/beans/QueryType.java
parentef6e522c9cba816110aa43ff6bccedf29a901236 (diff)
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 this closes #530
Diffstat (limited to 'protocol/src/main/java/org/apache/drill/exec/proto/beans/QueryType.java')
-rw-r--r--protocol/src/main/java/org/apache/drill/exec/proto/beans/QueryType.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/beans/QueryType.java b/protocol/src/main/java/org/apache/drill/exec/proto/beans/QueryType.java
index 71f98f37c..7a4320d48 100644
--- a/protocol/src/main/java/org/apache/drill/exec/proto/beans/QueryType.java
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/beans/QueryType.java
@@ -25,7 +25,8 @@ public enum QueryType implements com.dyuproject.protostuff.EnumLite<QueryType>
SQL(1),
LOGICAL(2),
PHYSICAL(3),
- EXECUTION(4);
+ EXECUTION(4),
+ PREPARED_STATEMENT(5);
public final int number;
@@ -47,6 +48,7 @@ public enum QueryType implements com.dyuproject.protostuff.EnumLite<QueryType>
case 2: return LOGICAL;
case 3: return PHYSICAL;
case 4: return EXECUTION;
+ case 5: return PREPARED_STATEMENT;
default: return null;
}
}