/** * Create {@link org.apache.drill.exec.proto.BitControl.QueryContextInformation} with given <i>defaultSchemaName</i>. Rest of the members of the * QueryContextInformation is derived from the current state of the process. * * @param defaultSchemaName * @return A {@link org.apache.drill.exec.proto.BitControl.QueryContextInformation} with given <i>defaultSchemaName</i>. */ public static QueryContextInformation createQueryContextInfo(final String defaultSchemaName, final String sessionId) { final long queryStartTime = System.currentTimeMillis(); final int timeZone = DateUtility.getIndex(System.getProperty("user.timezone")); return QueryContextInformation.newBuilder() .setDefaultSchemaName(defaultSchemaName) .setQueryStartTime(queryStartTime) .setTimeZone(timeZone) .setSessionId(sessionId) .build(); }
public void mergeFrom(com.dyuproject.protostuff.Input input, org.apache.drill.exec.proto.BitControl.QueryContextInformation.Builder builder) throws java.io.IOException { for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this)) { switch(number) { case 0: return; case 1: builder.setQueryStartTime(input.readInt64()); break; case 2: builder.setTimeZone(input.readInt32()); break; case 3: builder.setDefaultSchemaName(input.readString()); break; case 4: builder.setSessionId(input.readString()); break; default: input.handleUnknownField(number, this); } } } public boolean isInitialized(org.apache.drill.exec.proto.BitControl.QueryContextInformation.Builder builder)
public Builder mergeFrom(org.apache.drill.exec.proto.BitControl.QueryContextInformation other) { if (other == org.apache.drill.exec.proto.BitControl.QueryContextInformation.getDefaultInstance()) return this; if (other.hasQueryStartTime()) { setQueryStartTime(other.getQueryStartTime()); } if (other.hasTimeZone()) { setTimeZone(other.getTimeZone()); } if (other.hasDefaultSchemaName()) { bitField0_ |= 0x00000004; defaultSchemaName_ = other.defaultSchemaName_; onChanged(); } if (other.hasSessionId()) { bitField0_ |= 0x00000008; sessionId_ = other.sessionId_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public void mergeFrom(com.dyuproject.protostuff.Input input, org.apache.drill.exec.proto.BitControl.QueryContextInformation.Builder builder) throws java.io.IOException { for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this)) { switch(number) { case 0: return; case 1: builder.setQueryStartTime(input.readInt64()); break; case 2: builder.setTimeZone(input.readInt32()); break; case 3: builder.setDefaultSchemaName(input.readString()); break; case 4: builder.setSessionId(input.readString()); break; default: input.handleUnknownField(number, this); } } } public boolean isInitialized(org.apache.drill.exec.proto.BitControl.QueryContextInformation.Builder builder)
public Builder mergeFrom(org.apache.drill.exec.proto.BitControl.QueryContextInformation other) { if (other == org.apache.drill.exec.proto.BitControl.QueryContextInformation.getDefaultInstance()) return this; if (other.hasQueryStartTime()) { setQueryStartTime(other.getQueryStartTime()); } if (other.hasTimeZone()) { setTimeZone(other.getTimeZone()); } if (other.hasDefaultSchemaName()) { bitField0_ |= 0x00000004; defaultSchemaName_ = other.defaultSchemaName_; onChanged(); } if (other.hasSessionId()) { bitField0_ |= 0x00000008; sessionId_ = other.sessionId_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; }