public void writeTo(com.dyuproject.protostuff.Output output, org.apache.drill.exec.proto.UserProtos.PreparedStatementHandle message) throws java.io.IOException { if(message.hasServerInfo()) output.writeByteArray(1, message.getServerInfo().toByteArray(), false); } public boolean isInitialized(org.apache.drill.exec.proto.UserProtos.PreparedStatementHandle message)
public void writeTo(com.dyuproject.protostuff.Output output, org.apache.drill.exec.proto.UserProtos.PreparedStatementHandle message) throws java.io.IOException { if(message.hasServerInfo()) output.writeByteArray(1, message.getServerInfo().toByteArray(), false); } public boolean isInitialized(org.apache.drill.exec.proto.UserProtos.PreparedStatementHandle message)
/** * 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 bytes server_info = 1;</code> */ public Builder clearServerInfo() { bitField0_ = (bitField0_ & ~0x00000001); serverInfo_ = getDefaultInstance().getServerInfo(); onChanged(); return this; }
public Builder mergeFrom(org.apache.drill.exec.proto.UserProtos.PreparedStatementHandle other) { if (other == org.apache.drill.exec.proto.UserProtos.PreparedStatementHandle.getDefaultInstance()) return this; if (other.hasServerInfo()) { setServerInfo(other.getServerInfo()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.apache.drill.exec.proto.UserProtos.PreparedStatementHandle other) { if (other == org.apache.drill.exec.proto.UserProtos.PreparedStatementHandle.getDefaultInstance()) return this; if (other.hasServerInfo()) { setServerInfo(other.getServerInfo()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
/** * <code>optional bytes server_info = 1;</code> */ public Builder clearServerInfo() { bitField0_ = (bitField0_ & ~0x00000001); serverInfo_ = getDefaultInstance().getServerInfo(); onChanged(); return this; }