public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getSqlQueryBytes()); } getUnknownFields().writeTo(output); }
com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = break; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable();
PreparedStatementHandle.newBuilder() .setServerInfo( ServerPreparedStatementState.newBuilder() .setSqlQuery(req.getSqlQuery()) .build().toByteString()
com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = break; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable();
/** * 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); }
public Builder toBuilder() { return newBuilder(this); }
public org.apache.drill.exec.proto.ExecProtos.ServerPreparedStatementState getDefaultInstanceForType() { return org.apache.drill.exec.proto.ExecProtos.ServerPreparedStatementState.getDefaultInstance(); }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(org.apache.drill.exec.proto.ExecProtos.ServerPreparedStatementState prototype) {
public boolean isInitialized(org.apache.drill.exec.proto.ExecProtos.ServerPreparedStatementState message) { return message.isInitialized(); } public java.lang.String getFieldName(int number)
public static Builder newBuilder(org.apache.drill.exec.proto.ExecProtos.ServerPreparedStatementState prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); }
/** * <code>optional string sql_query = 1;</code> */ public Builder clearSqlQuery() { bitField0_ = (bitField0_ & ~0x00000001); sqlQuery_ = getDefaultInstance().getSqlQuery(); onChanged(); return this; } /**
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getSqlQueryBytes()); } getUnknownFields().writeTo(output); }
public org.apache.drill.exec.proto.ExecProtos.ServerPreparedStatementState build() { org.apache.drill.exec.proto.ExecProtos.ServerPreparedStatementState result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
public org.apache.drill.exec.proto.ExecProtos.ServerPreparedStatementState buildPartial() { org.apache.drill.exec.proto.ExecProtos.ServerPreparedStatementState result = new org.apache.drill.exec.proto.ExecProtos.ServerPreparedStatementState(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.sqlQuery_ = sqlQuery_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
public org.apache.drill.exec.proto.ExecProtos.ServerPreparedStatementState.Builder newMessage() { return org.apache.drill.exec.proto.ExecProtos.ServerPreparedStatementState.newBuilder(); } public java.lang.String getFieldName(int number)
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 int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getSqlQueryBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
public Builder mergeFrom(org.apache.drill.exec.proto.ExecProtos.ServerPreparedStatementState other) { if (other == org.apache.drill.exec.proto.ExecProtos.ServerPreparedStatementState.getDefaultInstance()) return this; if (other.hasSqlQuery()) { bitField0_ |= 0x00000001; sqlQuery_ = other.sqlQuery_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder toBuilder() { return newBuilder(this); }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(org.apache.drill.exec.proto.ExecProtos.ServerPreparedStatementState prototype) {