/** * Helper method to execute the query in prepared statement. Current implementation takes the query from opaque * object of the <code>preparedStatement</code> and submits as a new query. * * @param preparedStatementHandle prepared statement handle * @throws ExecutionSetupException */ private void runPreparedStatement(final PreparedStatementHandle preparedStatementHandle) throws ExecutionSetupException { final ServerPreparedStatementState serverState; try { serverState = ServerPreparedStatementState.PARSER.parseFrom(preparedStatementHandle.getServerInfo()); } catch (final InvalidProtocolBufferException ex) { throw UserException.parseError(ex) .message("Failed to parse the prepared statement handle. " + "Make sure the handle is same as one returned from create prepared statement call.") .build(logger); } queryText = serverState.getSqlQuery(); logger.info("Prepared statement query for QueryId {} : {}", queryId, queryText); runSQL(queryText); }
/** * <code>optional string sql_query = 1;</code> */ public Builder clearSqlQuery() { bitField0_ = (bitField0_ & ~0x00000001); sqlQuery_ = getDefaultInstance().getSqlQuery(); onChanged(); return this; } /**
public void writeTo(com.dyuproject.protostuff.Output output, org.apache.drill.exec.proto.ExecProtos.ServerPreparedStatementState message) throws java.io.IOException { if(message.hasSqlQuery()) output.writeString(1, message.getSqlQuery(), false); } public boolean isInitialized(org.apache.drill.exec.proto.ExecProtos.ServerPreparedStatementState message)
public void writeTo(com.dyuproject.protostuff.Output output, org.apache.drill.exec.proto.ExecProtos.ServerPreparedStatementState message) throws java.io.IOException { if(message.hasSqlQuery()) output.writeString(1, message.getSqlQuery(), false); } public boolean isInitialized(org.apache.drill.exec.proto.ExecProtos.ServerPreparedStatementState message)
/** * <code>optional string sql_query = 1;</code> */ public Builder clearSqlQuery() { bitField0_ = (bitField0_ & ~0x00000001); sqlQuery_ = getDefaultInstance().getSqlQuery(); onChanged(); return this; } /**