Search in sources :

Example 6 with RunQuery

use of org.apache.drill.exec.proto.UserProtos.RunQuery in project drill by apache.

the class DrillClient method executePreparedStatement.

/**
   * Execute the given prepared statement.
   *
   * @param preparedStatementHandle Prepared statement handle returned in response to
   *                                {@link #createPreparedStatement(String)}.
   * @param resultsListener {@link UserResultsListener} instance for listening for query results.
   */
public void executePreparedStatement(final PreparedStatementHandle preparedStatementHandle, final UserResultsListener resultsListener) {
    final RunQuery runQuery = newBuilder().setResultsMode(STREAM_FULL).setType(QueryType.PREPARED_STATEMENT).setPreparedStatementHandle(preparedStatementHandle).build();
    client.submitQuery(resultsListener, runQuery);
}
Also used : RunQuery(org.apache.drill.exec.proto.UserProtos.RunQuery)

Aggregations

RunQuery (org.apache.drill.exec.proto.UserProtos.RunQuery)6 QueryId (org.apache.drill.exec.proto.UserBitShared.QueryId)2 UserProtos (org.apache.drill.exec.proto.UserProtos)2 RpcException (org.apache.drill.exec.rpc.RpcException)2 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)1 ArrayNode (com.fasterxml.jackson.databind.node.ArrayNode)1 VisibleForTesting (com.google.common.annotations.VisibleForTesting)1 InvalidProtocolBufferException (com.google.protobuf.InvalidProtocolBufferException)1 ByteBufInputStream (io.netty.buffer.ByteBufInputStream)1 IOException (java.io.IOException)1 PlanFragment (org.apache.drill.exec.proto.BitControl.PlanFragment)1 Ack (org.apache.drill.exec.proto.GeneralRPCProtos.Ack)1 CreatePreparedStatementReq (org.apache.drill.exec.proto.UserProtos.CreatePreparedStatementReq)1 GetCatalogsReq (org.apache.drill.exec.proto.UserProtos.GetCatalogsReq)1 GetColumnsReq (org.apache.drill.exec.proto.UserProtos.GetColumnsReq)1 GetQueryPlanFragments (org.apache.drill.exec.proto.UserProtos.GetQueryPlanFragments)1 GetSchemasReq (org.apache.drill.exec.proto.UserProtos.GetSchemasReq)1 GetServerMetaReq (org.apache.drill.exec.proto.UserProtos.GetServerMetaReq)1 GetTablesReq (org.apache.drill.exec.proto.UserProtos.GetTablesReq)1 NonTransientRpcException (org.apache.drill.exec.rpc.NonTransientRpcException)1