You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by ja...@apache.org on 2013/09/19 18:45:01 UTC
[05/12] DRILL-233: Move protobuf IDLs to a separate module and check
in the compile Java sources
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/07c6c21d/protocol/src/main/java/org/apache/drill/exec/proto/SchemaDefProtos.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/SchemaDefProtos.java b/protocol/src/main/java/org/apache/drill/exec/proto/SchemaDefProtos.java
new file mode 100644
index 0000000..0093789
--- /dev/null
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/SchemaDefProtos.java
@@ -0,0 +1,1907 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: SchemaDef.proto
+
+package org.apache.drill.exec.proto;
+
+public final class SchemaDefProtos {
+ private SchemaDefProtos() {}
+ public static void registerAllExtensions(
+ com.google.protobuf.ExtensionRegistry registry) {
+ }
+ /**
+ * Protobuf enum {@code exec.ValueMode}
+ */
+ public enum ValueMode
+ implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ * <code>VALUE_VECTOR = 0;</code>
+ */
+ VALUE_VECTOR(0, 0),
+ /**
+ * <code>RLE = 1;</code>
+ */
+ RLE(1, 1),
+ /**
+ * <code>DICT = 2;</code>
+ */
+ DICT(2, 2),
+ ;
+
+ /**
+ * <code>VALUE_VECTOR = 0;</code>
+ */
+ public static final int VALUE_VECTOR_VALUE = 0;
+ /**
+ * <code>RLE = 1;</code>
+ */
+ public static final int RLE_VALUE = 1;
+ /**
+ * <code>DICT = 2;</code>
+ */
+ public static final int DICT_VALUE = 2;
+
+
+ public final int getNumber() { return value; }
+
+ public static ValueMode valueOf(int value) {
+ switch (value) {
+ case 0: return VALUE_VECTOR;
+ case 1: return RLE;
+ case 2: return DICT;
+ default: return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap<ValueMode>
+ internalGetValueMap() {
+ return internalValueMap;
+ }
+ private static com.google.protobuf.Internal.EnumLiteMap<ValueMode>
+ internalValueMap =
+ new com.google.protobuf.Internal.EnumLiteMap<ValueMode>() {
+ public ValueMode findValueByNumber(int number) {
+ return ValueMode.valueOf(number);
+ }
+ };
+
+ public final com.google.protobuf.Descriptors.EnumValueDescriptor
+ getValueDescriptor() {
+ return getDescriptor().getValues().get(index);
+ }
+ public final com.google.protobuf.Descriptors.EnumDescriptor
+ getDescriptorForType() {
+ return getDescriptor();
+ }
+ public static final com.google.protobuf.Descriptors.EnumDescriptor
+ getDescriptor() {
+ return org.apache.drill.exec.proto.SchemaDefProtos.getDescriptor().getEnumTypes().get(0);
+ }
+
+ private static final ValueMode[] VALUES = values();
+
+ public static ValueMode valueOf(
+ com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+ if (desc.getType() != getDescriptor()) {
+ throw new java.lang.IllegalArgumentException(
+ "EnumValueDescriptor is not for this type.");
+ }
+ return VALUES[desc.getIndex()];
+ }
+
+ private final int index;
+ private final int value;
+
+ private ValueMode(int index, int value) {
+ this.index = index;
+ this.value = value;
+ }
+
+ // @@protoc_insertion_point(enum_scope:exec.ValueMode)
+ }
+
+ public interface NamePartOrBuilder
+ extends com.google.protobuf.MessageOrBuilder {
+
+ // optional .exec.NamePart.Type type = 1;
+ /**
+ * <code>optional .exec.NamePart.Type type = 1;</code>
+ */
+ boolean hasType();
+ /**
+ * <code>optional .exec.NamePart.Type type = 1;</code>
+ */
+ org.apache.drill.exec.proto.SchemaDefProtos.NamePart.Type getType();
+
+ // optional string name = 2;
+ /**
+ * <code>optional string name = 2;</code>
+ *
+ * <pre>
+ * only required if this is a named type.
+ * </pre>
+ */
+ boolean hasName();
+ /**
+ * <code>optional string name = 2;</code>
+ *
+ * <pre>
+ * only required if this is a named type.
+ * </pre>
+ */
+ java.lang.String getName();
+ /**
+ * <code>optional string name = 2;</code>
+ *
+ * <pre>
+ * only required if this is a named type.
+ * </pre>
+ */
+ com.google.protobuf.ByteString
+ getNameBytes();
+ }
+ /**
+ * Protobuf type {@code exec.NamePart}
+ */
+ public static final class NamePart extends
+ com.google.protobuf.GeneratedMessage
+ implements NamePartOrBuilder {
+ // Use NamePart.newBuilder() to construct.
+ private NamePart(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private NamePart(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final NamePart defaultInstance;
+ public static NamePart getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public NamePart getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private NamePart(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ initFields();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 8: {
+ int rawValue = input.readEnum();
+ org.apache.drill.exec.proto.SchemaDefProtos.NamePart.Type value = org.apache.drill.exec.proto.SchemaDefProtos.NamePart.Type.valueOf(rawValue);
+ if (value == null) {
+ unknownFields.mergeVarintField(1, rawValue);
+ } else {
+ bitField0_ |= 0x00000001;
+ type_ = value;
+ }
+ break;
+ }
+ case 18: {
+ bitField0_ |= 0x00000002;
+ name_ = input.readBytes();
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.apache.drill.exec.proto.SchemaDefProtos.internal_static_exec_NamePart_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.apache.drill.exec.proto.SchemaDefProtos.internal_static_exec_NamePart_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.apache.drill.exec.proto.SchemaDefProtos.NamePart.class, org.apache.drill.exec.proto.SchemaDefProtos.NamePart.Builder.class);
+ }
+
+ public static com.google.protobuf.Parser<NamePart> PARSER =
+ new com.google.protobuf.AbstractParser<NamePart>() {
+ public NamePart parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new NamePart(input, extensionRegistry);
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<NamePart> getParserForType() {
+ return PARSER;
+ }
+
+ /**
+ * Protobuf enum {@code exec.NamePart.Type}
+ */
+ public enum Type
+ implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ * <code>NAME = 0;</code>
+ */
+ NAME(0, 0),
+ /**
+ * <code>ARRAY = 1;</code>
+ */
+ ARRAY(1, 1),
+ ;
+
+ /**
+ * <code>NAME = 0;</code>
+ */
+ public static final int NAME_VALUE = 0;
+ /**
+ * <code>ARRAY = 1;</code>
+ */
+ public static final int ARRAY_VALUE = 1;
+
+
+ public final int getNumber() { return value; }
+
+ public static Type valueOf(int value) {
+ switch (value) {
+ case 0: return NAME;
+ case 1: return ARRAY;
+ default: return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap<Type>
+ internalGetValueMap() {
+ return internalValueMap;
+ }
+ private static com.google.protobuf.Internal.EnumLiteMap<Type>
+ internalValueMap =
+ new com.google.protobuf.Internal.EnumLiteMap<Type>() {
+ public Type findValueByNumber(int number) {
+ return Type.valueOf(number);
+ }
+ };
+
+ public final com.google.protobuf.Descriptors.EnumValueDescriptor
+ getValueDescriptor() {
+ return getDescriptor().getValues().get(index);
+ }
+ public final com.google.protobuf.Descriptors.EnumDescriptor
+ getDescriptorForType() {
+ return getDescriptor();
+ }
+ public static final com.google.protobuf.Descriptors.EnumDescriptor
+ getDescriptor() {
+ return org.apache.drill.exec.proto.SchemaDefProtos.NamePart.getDescriptor().getEnumTypes().get(0);
+ }
+
+ private static final Type[] VALUES = values();
+
+ public static Type valueOf(
+ com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+ if (desc.getType() != getDescriptor()) {
+ throw new java.lang.IllegalArgumentException(
+ "EnumValueDescriptor is not for this type.");
+ }
+ return VALUES[desc.getIndex()];
+ }
+
+ private final int index;
+ private final int value;
+
+ private Type(int index, int value) {
+ this.index = index;
+ this.value = value;
+ }
+
+ // @@protoc_insertion_point(enum_scope:exec.NamePart.Type)
+ }
+
+ private int bitField0_;
+ // optional .exec.NamePart.Type type = 1;
+ public static final int TYPE_FIELD_NUMBER = 1;
+ private org.apache.drill.exec.proto.SchemaDefProtos.NamePart.Type type_;
+ /**
+ * <code>optional .exec.NamePart.Type type = 1;</code>
+ */
+ public boolean hasType() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * <code>optional .exec.NamePart.Type type = 1;</code>
+ */
+ public org.apache.drill.exec.proto.SchemaDefProtos.NamePart.Type getType() {
+ return type_;
+ }
+
+ // optional string name = 2;
+ public static final int NAME_FIELD_NUMBER = 2;
+ private java.lang.Object name_;
+ /**
+ * <code>optional string name = 2;</code>
+ *
+ * <pre>
+ * only required if this is a named type.
+ * </pre>
+ */
+ public boolean hasName() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * <code>optional string name = 2;</code>
+ *
+ * <pre>
+ * only required if this is a named type.
+ * </pre>
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ name_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * <code>optional string name = 2;</code>
+ *
+ * <pre>
+ * only required if this is a named type.
+ * </pre>
+ */
+ public com.google.protobuf.ByteString
+ getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private void initFields() {
+ type_ = org.apache.drill.exec.proto.SchemaDefProtos.NamePart.Type.NAME;
+ name_ = "";
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeEnum(1, type_.getNumber());
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeBytes(2, getNameBytes());
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeEnumSize(1, type_.getNumber());
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(2, getNameBytes());
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @java.lang.Override
+ protected java.lang.Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static org.apache.drill.exec.proto.SchemaDefProtos.NamePart parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.apache.drill.exec.proto.SchemaDefProtos.NamePart parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.apache.drill.exec.proto.SchemaDefProtos.NamePart parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.apache.drill.exec.proto.SchemaDefProtos.NamePart parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.apache.drill.exec.proto.SchemaDefProtos.NamePart parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.apache.drill.exec.proto.SchemaDefProtos.NamePart parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.apache.drill.exec.proto.SchemaDefProtos.NamePart parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.apache.drill.exec.proto.SchemaDefProtos.NamePart parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.apache.drill.exec.proto.SchemaDefProtos.NamePart parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.apache.drill.exec.proto.SchemaDefProtos.NamePart parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() { return Builder.create(); }
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder(org.apache.drill.exec.proto.SchemaDefProtos.NamePart prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code exec.NamePart}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder<Builder>
+ implements org.apache.drill.exec.proto.SchemaDefProtos.NamePartOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.apache.drill.exec.proto.SchemaDefProtos.internal_static_exec_NamePart_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.apache.drill.exec.proto.SchemaDefProtos.internal_static_exec_NamePart_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.apache.drill.exec.proto.SchemaDefProtos.NamePart.class, org.apache.drill.exec.proto.SchemaDefProtos.NamePart.Builder.class);
+ }
+
+ // Construct using org.apache.drill.exec.proto.SchemaDefProtos.NamePart.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+ }
+ }
+ private static Builder create() {
+ return new Builder();
+ }
+
+ public Builder clear() {
+ super.clear();
+ type_ = org.apache.drill.exec.proto.SchemaDefProtos.NamePart.Type.NAME;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ name_ = "";
+ bitField0_ = (bitField0_ & ~0x00000002);
+ return this;
+ }
+
+ public Builder clone() {
+ return create().mergeFrom(buildPartial());
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.apache.drill.exec.proto.SchemaDefProtos.internal_static_exec_NamePart_descriptor;
+ }
+
+ public org.apache.drill.exec.proto.SchemaDefProtos.NamePart getDefaultInstanceForType() {
+ return org.apache.drill.exec.proto.SchemaDefProtos.NamePart.getDefaultInstance();
+ }
+
+ public org.apache.drill.exec.proto.SchemaDefProtos.NamePart build() {
+ org.apache.drill.exec.proto.SchemaDefProtos.NamePart result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public org.apache.drill.exec.proto.SchemaDefProtos.NamePart buildPartial() {
+ org.apache.drill.exec.proto.SchemaDefProtos.NamePart result = new org.apache.drill.exec.proto.SchemaDefProtos.NamePart(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+ to_bitField0_ |= 0x00000001;
+ }
+ result.type_ = type_;
+ if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
+ to_bitField0_ |= 0x00000002;
+ }
+ result.name_ = name_;
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof org.apache.drill.exec.proto.SchemaDefProtos.NamePart) {
+ return mergeFrom((org.apache.drill.exec.proto.SchemaDefProtos.NamePart)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.apache.drill.exec.proto.SchemaDefProtos.NamePart other) {
+ if (other == org.apache.drill.exec.proto.SchemaDefProtos.NamePart.getDefaultInstance()) return this;
+ if (other.hasType()) {
+ setType(other.getType());
+ }
+ if (other.hasName()) {
+ bitField0_ |= 0x00000002;
+ name_ = other.name_;
+ onChanged();
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ org.apache.drill.exec.proto.SchemaDefProtos.NamePart parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.apache.drill.exec.proto.SchemaDefProtos.NamePart) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ // optional .exec.NamePart.Type type = 1;
+ private org.apache.drill.exec.proto.SchemaDefProtos.NamePart.Type type_ = org.apache.drill.exec.proto.SchemaDefProtos.NamePart.Type.NAME;
+ /**
+ * <code>optional .exec.NamePart.Type type = 1;</code>
+ */
+ public boolean hasType() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * <code>optional .exec.NamePart.Type type = 1;</code>
+ */
+ public org.apache.drill.exec.proto.SchemaDefProtos.NamePart.Type getType() {
+ return type_;
+ }
+ /**
+ * <code>optional .exec.NamePart.Type type = 1;</code>
+ */
+ public Builder setType(org.apache.drill.exec.proto.SchemaDefProtos.NamePart.Type value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ type_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>optional .exec.NamePart.Type type = 1;</code>
+ */
+ public Builder clearType() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ type_ = org.apache.drill.exec.proto.SchemaDefProtos.NamePart.Type.NAME;
+ onChanged();
+ return this;
+ }
+
+ // optional string name = 2;
+ private java.lang.Object name_ = "";
+ /**
+ * <code>optional string name = 2;</code>
+ *
+ * <pre>
+ * only required if this is a named type.
+ * </pre>
+ */
+ public boolean hasName() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * <code>optional string name = 2;</code>
+ *
+ * <pre>
+ * only required if this is a named type.
+ * </pre>
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ java.lang.String s = ((com.google.protobuf.ByteString) ref)
+ .toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * <code>optional string name = 2;</code>
+ *
+ * <pre>
+ * only required if this is a named type.
+ * </pre>
+ */
+ public com.google.protobuf.ByteString
+ getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>optional string name = 2;</code>
+ *
+ * <pre>
+ * only required if this is a named type.
+ * </pre>
+ */
+ public Builder setName(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>optional string name = 2;</code>
+ *
+ * <pre>
+ * only required if this is a named type.
+ * </pre>
+ */
+ public Builder clearName() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>optional string name = 2;</code>
+ *
+ * <pre>
+ * only required if this is a named type.
+ * </pre>
+ */
+ public Builder setNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:exec.NamePart)
+ }
+
+ static {
+ defaultInstance = new NamePart(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:exec.NamePart)
+ }
+
+ public interface FieldDefOrBuilder
+ extends com.google.protobuf.MessageOrBuilder {
+
+ // repeated .exec.NamePart name = 1;
+ /**
+ * <code>repeated .exec.NamePart name = 1;</code>
+ *
+ * <pre>
+ * multipart description of entire field name
+ * </pre>
+ */
+ java.util.List<org.apache.drill.exec.proto.SchemaDefProtos.NamePart>
+ getNameList();
+ /**
+ * <code>repeated .exec.NamePart name = 1;</code>
+ *
+ * <pre>
+ * multipart description of entire field name
+ * </pre>
+ */
+ org.apache.drill.exec.proto.SchemaDefProtos.NamePart getName(int index);
+ /**
+ * <code>repeated .exec.NamePart name = 1;</code>
+ *
+ * <pre>
+ * multipart description of entire field name
+ * </pre>
+ */
+ int getNameCount();
+ /**
+ * <code>repeated .exec.NamePart name = 1;</code>
+ *
+ * <pre>
+ * multipart description of entire field name
+ * </pre>
+ */
+ java.util.List<? extends org.apache.drill.exec.proto.SchemaDefProtos.NamePartOrBuilder>
+ getNameOrBuilderList();
+ /**
+ * <code>repeated .exec.NamePart name = 1;</code>
+ *
+ * <pre>
+ * multipart description of entire field name
+ * </pre>
+ */
+ org.apache.drill.exec.proto.SchemaDefProtos.NamePartOrBuilder getNameOrBuilder(
+ int index);
+
+ // optional .common.MajorType major_type = 2;
+ /**
+ * <code>optional .common.MajorType major_type = 2;</code>
+ *
+ * <pre>
+ * the type associated with this field.
+ * </pre>
+ */
+ boolean hasMajorType();
+ /**
+ * <code>optional .common.MajorType major_type = 2;</code>
+ *
+ * <pre>
+ * the type associated with this field.
+ * </pre>
+ */
+ org.apache.drill.common.types.TypeProtos.MajorType getMajorType();
+ /**
+ * <code>optional .common.MajorType major_type = 2;</code>
+ *
+ * <pre>
+ * the type associated with this field.
+ * </pre>
+ */
+ org.apache.drill.common.types.TypeProtos.MajorTypeOrBuilder getMajorTypeOrBuilder();
+ }
+ /**
+ * Protobuf type {@code exec.FieldDef}
+ */
+ public static final class FieldDef extends
+ com.google.protobuf.GeneratedMessage
+ implements FieldDefOrBuilder {
+ // Use FieldDef.newBuilder() to construct.
+ private FieldDef(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private FieldDef(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final FieldDef defaultInstance;
+ public static FieldDef getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public FieldDef getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private FieldDef(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ initFields();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
+ name_ = new java.util.ArrayList<org.apache.drill.exec.proto.SchemaDefProtos.NamePart>();
+ mutable_bitField0_ |= 0x00000001;
+ }
+ name_.add(input.readMessage(org.apache.drill.exec.proto.SchemaDefProtos.NamePart.PARSER, extensionRegistry));
+ break;
+ }
+ case 18: {
+ org.apache.drill.common.types.TypeProtos.MajorType.Builder subBuilder = null;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ subBuilder = majorType_.toBuilder();
+ }
+ majorType_ = input.readMessage(org.apache.drill.common.types.TypeProtos.MajorType.PARSER, extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(majorType_);
+ majorType_ = subBuilder.buildPartial();
+ }
+ bitField0_ |= 0x00000001;
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this);
+ } finally {
+ if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
+ name_ = java.util.Collections.unmodifiableList(name_);
+ }
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.apache.drill.exec.proto.SchemaDefProtos.internal_static_exec_FieldDef_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.apache.drill.exec.proto.SchemaDefProtos.internal_static_exec_FieldDef_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.apache.drill.exec.proto.SchemaDefProtos.FieldDef.class, org.apache.drill.exec.proto.SchemaDefProtos.FieldDef.Builder.class);
+ }
+
+ public static com.google.protobuf.Parser<FieldDef> PARSER =
+ new com.google.protobuf.AbstractParser<FieldDef>() {
+ public FieldDef parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new FieldDef(input, extensionRegistry);
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<FieldDef> getParserForType() {
+ return PARSER;
+ }
+
+ private int bitField0_;
+ // repeated .exec.NamePart name = 1;
+ public static final int NAME_FIELD_NUMBER = 1;
+ private java.util.List<org.apache.drill.exec.proto.SchemaDefProtos.NamePart> name_;
+ /**
+ * <code>repeated .exec.NamePart name = 1;</code>
+ *
+ * <pre>
+ * multipart description of entire field name
+ * </pre>
+ */
+ public java.util.List<org.apache.drill.exec.proto.SchemaDefProtos.NamePart> getNameList() {
+ return name_;
+ }
+ /**
+ * <code>repeated .exec.NamePart name = 1;</code>
+ *
+ * <pre>
+ * multipart description of entire field name
+ * </pre>
+ */
+ public java.util.List<? extends org.apache.drill.exec.proto.SchemaDefProtos.NamePartOrBuilder>
+ getNameOrBuilderList() {
+ return name_;
+ }
+ /**
+ * <code>repeated .exec.NamePart name = 1;</code>
+ *
+ * <pre>
+ * multipart description of entire field name
+ * </pre>
+ */
+ public int getNameCount() {
+ return name_.size();
+ }
+ /**
+ * <code>repeated .exec.NamePart name = 1;</code>
+ *
+ * <pre>
+ * multipart description of entire field name
+ * </pre>
+ */
+ public org.apache.drill.exec.proto.SchemaDefProtos.NamePart getName(int index) {
+ return name_.get(index);
+ }
+ /**
+ * <code>repeated .exec.NamePart name = 1;</code>
+ *
+ * <pre>
+ * multipart description of entire field name
+ * </pre>
+ */
+ public org.apache.drill.exec.proto.SchemaDefProtos.NamePartOrBuilder getNameOrBuilder(
+ int index) {
+ return name_.get(index);
+ }
+
+ // optional .common.MajorType major_type = 2;
+ public static final int MAJOR_TYPE_FIELD_NUMBER = 2;
+ private org.apache.drill.common.types.TypeProtos.MajorType majorType_;
+ /**
+ * <code>optional .common.MajorType major_type = 2;</code>
+ *
+ * <pre>
+ * the type associated with this field.
+ * </pre>
+ */
+ public boolean hasMajorType() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * <code>optional .common.MajorType major_type = 2;</code>
+ *
+ * <pre>
+ * the type associated with this field.
+ * </pre>
+ */
+ public org.apache.drill.common.types.TypeProtos.MajorType getMajorType() {
+ return majorType_;
+ }
+ /**
+ * <code>optional .common.MajorType major_type = 2;</code>
+ *
+ * <pre>
+ * the type associated with this field.
+ * </pre>
+ */
+ public org.apache.drill.common.types.TypeProtos.MajorTypeOrBuilder getMajorTypeOrBuilder() {
+ return majorType_;
+ }
+
+ private void initFields() {
+ name_ = java.util.Collections.emptyList();
+ majorType_ = org.apache.drill.common.types.TypeProtos.MajorType.getDefaultInstance();
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ for (int i = 0; i < name_.size(); i++) {
+ output.writeMessage(1, name_.get(i));
+ }
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeMessage(2, majorType_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (int i = 0; i < name_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, name_.get(i));
+ }
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(2, majorType_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @java.lang.Override
+ protected java.lang.Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static org.apache.drill.exec.proto.SchemaDefProtos.FieldDef parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.apache.drill.exec.proto.SchemaDefProtos.FieldDef parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.apache.drill.exec.proto.SchemaDefProtos.FieldDef parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.apache.drill.exec.proto.SchemaDefProtos.FieldDef parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.apache.drill.exec.proto.SchemaDefProtos.FieldDef parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.apache.drill.exec.proto.SchemaDefProtos.FieldDef parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.apache.drill.exec.proto.SchemaDefProtos.FieldDef parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.apache.drill.exec.proto.SchemaDefProtos.FieldDef parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.apache.drill.exec.proto.SchemaDefProtos.FieldDef parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.apache.drill.exec.proto.SchemaDefProtos.FieldDef parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() { return Builder.create(); }
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder(org.apache.drill.exec.proto.SchemaDefProtos.FieldDef prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code exec.FieldDef}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder<Builder>
+ implements org.apache.drill.exec.proto.SchemaDefProtos.FieldDefOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.apache.drill.exec.proto.SchemaDefProtos.internal_static_exec_FieldDef_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.apache.drill.exec.proto.SchemaDefProtos.internal_static_exec_FieldDef_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.apache.drill.exec.proto.SchemaDefProtos.FieldDef.class, org.apache.drill.exec.proto.SchemaDefProtos.FieldDef.Builder.class);
+ }
+
+ // Construct using org.apache.drill.exec.proto.SchemaDefProtos.FieldDef.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+ getNameFieldBuilder();
+ getMajorTypeFieldBuilder();
+ }
+ }
+ private static Builder create() {
+ return new Builder();
+ }
+
+ public Builder clear() {
+ super.clear();
+ if (nameBuilder_ == null) {
+ name_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ } else {
+ nameBuilder_.clear();
+ }
+ if (majorTypeBuilder_ == null) {
+ majorType_ = org.apache.drill.common.types.TypeProtos.MajorType.getDefaultInstance();
+ } else {
+ majorTypeBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000002);
+ return this;
+ }
+
+ public Builder clone() {
+ return create().mergeFrom(buildPartial());
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.apache.drill.exec.proto.SchemaDefProtos.internal_static_exec_FieldDef_descriptor;
+ }
+
+ public org.apache.drill.exec.proto.SchemaDefProtos.FieldDef getDefaultInstanceForType() {
+ return org.apache.drill.exec.proto.SchemaDefProtos.FieldDef.getDefaultInstance();
+ }
+
+ public org.apache.drill.exec.proto.SchemaDefProtos.FieldDef build() {
+ org.apache.drill.exec.proto.SchemaDefProtos.FieldDef result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public org.apache.drill.exec.proto.SchemaDefProtos.FieldDef buildPartial() {
+ org.apache.drill.exec.proto.SchemaDefProtos.FieldDef result = new org.apache.drill.exec.proto.SchemaDefProtos.FieldDef(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (nameBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ name_ = java.util.Collections.unmodifiableList(name_);
+ bitField0_ = (bitField0_ & ~0x00000001);
+ }
+ result.name_ = name_;
+ } else {
+ result.name_ = nameBuilder_.build();
+ }
+ if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
+ to_bitField0_ |= 0x00000001;
+ }
+ if (majorTypeBuilder_ == null) {
+ result.majorType_ = majorType_;
+ } else {
+ result.majorType_ = majorTypeBuilder_.build();
+ }
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof org.apache.drill.exec.proto.SchemaDefProtos.FieldDef) {
+ return mergeFrom((org.apache.drill.exec.proto.SchemaDefProtos.FieldDef)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.apache.drill.exec.proto.SchemaDefProtos.FieldDef other) {
+ if (other == org.apache.drill.exec.proto.SchemaDefProtos.FieldDef.getDefaultInstance()) return this;
+ if (nameBuilder_ == null) {
+ if (!other.name_.isEmpty()) {
+ if (name_.isEmpty()) {
+ name_ = other.name_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ } else {
+ ensureNameIsMutable();
+ name_.addAll(other.name_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.name_.isEmpty()) {
+ if (nameBuilder_.isEmpty()) {
+ nameBuilder_.dispose();
+ nameBuilder_ = null;
+ name_ = other.name_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ nameBuilder_ =
+ com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
+ getNameFieldBuilder() : null;
+ } else {
+ nameBuilder_.addAllMessages(other.name_);
+ }
+ }
+ }
+ if (other.hasMajorType()) {
+ mergeMajorType(other.getMajorType());
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ org.apache.drill.exec.proto.SchemaDefProtos.FieldDef parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.apache.drill.exec.proto.SchemaDefProtos.FieldDef) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ // repeated .exec.NamePart name = 1;
+ private java.util.List<org.apache.drill.exec.proto.SchemaDefProtos.NamePart> name_ =
+ java.util.Collections.emptyList();
+ private void ensureNameIsMutable() {
+ if (!((bitField0_ & 0x00000001) == 0x00000001)) {
+ name_ = new java.util.ArrayList<org.apache.drill.exec.proto.SchemaDefProtos.NamePart>(name_);
+ bitField0_ |= 0x00000001;
+ }
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilder<
+ org.apache.drill.exec.proto.SchemaDefProtos.NamePart, org.apache.drill.exec.proto.SchemaDefProtos.NamePart.Builder, org.apache.drill.exec.proto.SchemaDefProtos.NamePartOrBuilder> nameBuilder_;
+
+ /**
+ * <code>repeated .exec.NamePart name = 1;</code>
+ *
+ * <pre>
+ * multipart description of entire field name
+ * </pre>
+ */
+ public java.util.List<org.apache.drill.exec.proto.SchemaDefProtos.NamePart> getNameList() {
+ if (nameBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(name_);
+ } else {
+ return nameBuilder_.getMessageList();
+ }
+ }
+ /**
+ * <code>repeated .exec.NamePart name = 1;</code>
+ *
+ * <pre>
+ * multipart description of entire field name
+ * </pre>
+ */
+ public int getNameCount() {
+ if (nameBuilder_ == null) {
+ return name_.size();
+ } else {
+ return nameBuilder_.getCount();
+ }
+ }
+ /**
+ * <code>repeated .exec.NamePart name = 1;</code>
+ *
+ * <pre>
+ * multipart description of entire field name
+ * </pre>
+ */
+ public org.apache.drill.exec.proto.SchemaDefProtos.NamePart getName(int index) {
+ if (nameBuilder_ == null) {
+ return name_.get(index);
+ } else {
+ return nameBuilder_.getMessage(index);
+ }
+ }
+ /**
+ * <code>repeated .exec.NamePart name = 1;</code>
+ *
+ * <pre>
+ * multipart description of entire field name
+ * </pre>
+ */
+ public Builder setName(
+ int index, org.apache.drill.exec.proto.SchemaDefProtos.NamePart value) {
+ if (nameBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureNameIsMutable();
+ name_.set(index, value);
+ onChanged();
+ } else {
+ nameBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.NamePart name = 1;</code>
+ *
+ * <pre>
+ * multipart description of entire field name
+ * </pre>
+ */
+ public Builder setName(
+ int index, org.apache.drill.exec.proto.SchemaDefProtos.NamePart.Builder builderForValue) {
+ if (nameBuilder_ == null) {
+ ensureNameIsMutable();
+ name_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ nameBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.NamePart name = 1;</code>
+ *
+ * <pre>
+ * multipart description of entire field name
+ * </pre>
+ */
+ public Builder addName(org.apache.drill.exec.proto.SchemaDefProtos.NamePart value) {
+ if (nameBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureNameIsMutable();
+ name_.add(value);
+ onChanged();
+ } else {
+ nameBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.NamePart name = 1;</code>
+ *
+ * <pre>
+ * multipart description of entire field name
+ * </pre>
+ */
+ public Builder addName(
+ int index, org.apache.drill.exec.proto.SchemaDefProtos.NamePart value) {
+ if (nameBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureNameIsMutable();
+ name_.add(index, value);
+ onChanged();
+ } else {
+ nameBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.NamePart name = 1;</code>
+ *
+ * <pre>
+ * multipart description of entire field name
+ * </pre>
+ */
+ public Builder addName(
+ org.apache.drill.exec.proto.SchemaDefProtos.NamePart.Builder builderForValue) {
+ if (nameBuilder_ == null) {
+ ensureNameIsMutable();
+ name_.add(builderForValue.build());
+ onChanged();
+ } else {
+ nameBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.NamePart name = 1;</code>
+ *
+ * <pre>
+ * multipart description of entire field name
+ * </pre>
+ */
+ public Builder addName(
+ int index, org.apache.drill.exec.proto.SchemaDefProtos.NamePart.Builder builderForValue) {
+ if (nameBuilder_ == null) {
+ ensureNameIsMutable();
+ name_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ nameBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.NamePart name = 1;</code>
+ *
+ * <pre>
+ * multipart description of entire field name
+ * </pre>
+ */
+ public Builder addAllName(
+ java.lang.Iterable<? extends org.apache.drill.exec.proto.SchemaDefProtos.NamePart> values) {
+ if (nameBuilder_ == null) {
+ ensureNameIsMutable();
+ super.addAll(values, name_);
+ onChanged();
+ } else {
+ nameBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.NamePart name = 1;</code>
+ *
+ * <pre>
+ * multipart description of entire field name
+ * </pre>
+ */
+ public Builder clearName() {
+ if (nameBuilder_ == null) {
+ name_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ nameBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.NamePart name = 1;</code>
+ *
+ * <pre>
+ * multipart description of entire field name
+ * </pre>
+ */
+ public Builder removeName(int index) {
+ if (nameBuilder_ == null) {
+ ensureNameIsMutable();
+ name_.remove(index);
+ onChanged();
+ } else {
+ nameBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.NamePart name = 1;</code>
+ *
+ * <pre>
+ * multipart description of entire field name
+ * </pre>
+ */
+ public org.apache.drill.exec.proto.SchemaDefProtos.NamePart.Builder getNameBuilder(
+ int index) {
+ return getNameFieldBuilder().getBuilder(index);
+ }
+ /**
+ * <code>repeated .exec.NamePart name = 1;</code>
+ *
+ * <pre>
+ * multipart description of entire field name
+ * </pre>
+ */
+ public org.apache.drill.exec.proto.SchemaDefProtos.NamePartOrBuilder getNameOrBuilder(
+ int index) {
+ if (nameBuilder_ == null) {
+ return name_.get(index); } else {
+ return nameBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ * <code>repeated .exec.NamePart name = 1;</code>
+ *
+ * <pre>
+ * multipart description of entire field name
+ * </pre>
+ */
+ public java.util.List<? extends org.apache.drill.exec.proto.SchemaDefProtos.NamePartOrBuilder>
+ getNameOrBuilderList() {
+ if (nameBuilder_ != null) {
+ return nameBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(name_);
+ }
+ }
+ /**
+ * <code>repeated .exec.NamePart name = 1;</code>
+ *
+ * <pre>
+ * multipart description of entire field name
+ * </pre>
+ */
+ public org.apache.drill.exec.proto.SchemaDefProtos.NamePart.Builder addNameBuilder() {
+ return getNameFieldBuilder().addBuilder(
+ org.apache.drill.exec.proto.SchemaDefProtos.NamePart.getDefaultInstance());
+ }
+ /**
+ * <code>repeated .exec.NamePart name = 1;</code>
+ *
+ * <pre>
+ * multipart description of entire field name
+ * </pre>
+ */
+ public org.apache.drill.exec.proto.SchemaDefProtos.NamePart.Builder addNameBuilder(
+ int index) {
+ return getNameFieldBuilder().addBuilder(
+ index, org.apache.drill.exec.proto.SchemaDefProtos.NamePart.getDefaultInstance());
+ }
+ /**
+ * <code>repeated .exec.NamePart name = 1;</code>
+ *
+ * <pre>
+ * multipart description of entire field name
+ * </pre>
+ */
+ public java.util.List<org.apache.drill.exec.proto.SchemaDefProtos.NamePart.Builder>
+ getNameBuilderList() {
+ return getNameFieldBuilder().getBuilderList();
+ }
+ private com.google.protobuf.RepeatedFieldBuilder<
+ org.apache.drill.exec.proto.SchemaDefProtos.NamePart, org.apache.drill.exec.proto.SchemaDefProtos.NamePart.Builder, org.apache.drill.exec.proto.SchemaDefProtos.NamePartOrBuilder>
+ getNameFieldBuilder() {
+ if (nameBuilder_ == null) {
+ nameBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
+ org.apache.drill.exec.proto.SchemaDefProtos.NamePart, org.apache.drill.exec.proto.SchemaDefProtos.NamePart.Builder, org.apache.drill.exec.proto.SchemaDefProtos.NamePartOrBuilder>(
+ name_,
+ ((bitField0_ & 0x00000001) == 0x00000001),
+ getParentForChildren(),
+ isClean());
+ name_ = null;
+ }
+ return nameBuilder_;
+ }
+
+ // optional .common.MajorType major_type = 2;
+ private org.apache.drill.common.types.TypeProtos.MajorType majorType_ = org.apache.drill.common.types.TypeProtos.MajorType.getDefaultInstance();
+ private com.google.protobuf.SingleFieldBuilder<
+ org.apache.drill.common.types.TypeProtos.MajorType, org.apache.drill.common.types.TypeProtos.MajorType.Builder, org.apache.drill.common.types.TypeProtos.MajorTypeOrBuilder> majorTypeBuilder_;
+ /**
+ * <code>optional .common.MajorType major_type = 2;</code>
+ *
+ * <pre>
+ * the type associated with this field.
+ * </pre>
+ */
+ public boolean hasMajorType() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * <code>optional .common.MajorType major_type = 2;</code>
+ *
+ * <pre>
+ * the type associated with this field.
+ * </pre>
+ */
+ public org.apache.drill.common.types.TypeProtos.MajorType getMajorType() {
+ if (majorTypeBuilder_ == null) {
+ return majorType_;
+ } else {
+ return majorTypeBuilder_.getMessage();
+ }
+ }
+ /**
+ * <code>optional .common.MajorType major_type = 2;</code>
+ *
+ * <pre>
+ * the type associated with this field.
+ * </pre>
+ */
+ public Builder setMajorType(org.apache.drill.common.types.TypeProtos.MajorType value) {
+ if (majorTypeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ majorType_ = value;
+ onChanged();
+ } else {
+ majorTypeBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000002;
+ return this;
+ }
+ /**
+ * <code>optional .common.MajorType major_type = 2;</code>
+ *
+ * <pre>
+ * the type associated with this field.
+ * </pre>
+ */
+ public Builder setMajorType(
+ org.apache.drill.common.types.TypeProtos.MajorType.Builder builderForValue) {
+ if (majorTypeBuilder_ == null) {
+ majorType_ = builderForValue.build();
+ onChanged();
+ } else {
+ majorTypeBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000002;
+ return this;
+ }
+ /**
+ * <code>optional .common.MajorType major_type = 2;</code>
+ *
+ * <pre>
+ * the type associated with this field.
+ * </pre>
+ */
+ public Builder mergeMajorType(org.apache.drill.common.types.TypeProtos.MajorType value) {
+ if (majorTypeBuilder_ == null) {
+ if (((bitField0_ & 0x00000002) == 0x00000002) &&
+ majorType_ != org.apache.drill.common.types.TypeProtos.MajorType.getDefaultInstance()) {
+ majorType_ =
+ org.apache.drill.common.types.TypeProtos.MajorType.newBuilder(majorType_).mergeFrom(value).buildPartial();
+ } else {
+ majorType_ = value;
+ }
+ onChanged();
+ } else {
+ majorTypeBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000002;
+ return this;
+ }
+ /**
+ * <code>optional .common.MajorType major_type = 2;</code>
+ *
+ * <pre>
+ * the type associated with this field.
+ * </pre>
+ */
+ public Builder clearMajorType() {
+ if (majorTypeBuilder_ == null) {
+ majorType_ = org.apache.drill.common.types.TypeProtos.MajorType.getDefaultInstance();
+ onChanged();
+ } else {
+ majorTypeBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000002);
+ return this;
+ }
+ /**
+ * <code>optional .common.MajorType major_type = 2;</code>
+ *
+ * <pre>
+ * the type associated with this field.
+ * </pre>
+ */
+ public org.apache.drill.common.types.TypeProtos.MajorType.Builder getMajorTypeBuilder() {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return getMajorTypeFieldBuilder().getBuilder();
+ }
+ /**
+ * <code>optional .common.MajorType major_type = 2;</code>
+ *
+ * <pre>
+ * the type associated with this field.
+ * </pre>
+ */
+ public org.apache.drill.common.types.TypeProtos.MajorTypeOrBuilder getMajorTypeOrBuilder() {
+ if (majorTypeBuilder_ != null) {
+ return majorTypeBuilder_.getMessageOrBuilder();
+ } else {
+ return majorType_;
+ }
+ }
+ /**
+ * <code>optional .common.MajorType major_type = 2;</code>
+ *
+ * <pre>
+ * the type associated with this field.
+ * </pre>
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ org.apache.drill.common.types.TypeProtos.MajorType, org.apache.drill.common.types.TypeProtos.MajorType.Builder, org.apache.drill.common.types.TypeProtos.MajorTypeOrBuilder>
+ getMajorTypeFieldBuilder() {
+ if (majorTypeBuilder_ == null) {
+ majorTypeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ org.apache.drill.common.types.TypeProtos.MajorType, org.apache.drill.common.types.TypeProtos.MajorType.Builder, org.apache.drill.common.types.TypeProtos.MajorTypeOrBuilder>(
+ majorType_,
+ getParentForChildren(),
+ isClean());
+ majorType_ = null;
+ }
+ return majorTypeBuilder_;
+ }
+
+ // @@protoc_insertion_point(builder_scope:exec.FieldDef)
+ }
+
+ static {
+ defaultInstance = new FieldDef(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:exec.FieldDef)
+ }
+
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_exec_NamePart_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_exec_NamePart_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_exec_FieldDef_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_exec_FieldDef_fieldAccessorTable;
+
+ public static com.google.protobuf.Descriptors.FileDescriptor
+ getDescriptor() {
+ return descriptor;
+ }
+ private static com.google.protobuf.Descriptors.FileDescriptor
+ descriptor;
+ static {
+ java.lang.String[] descriptorData = {
+ "\n\017SchemaDef.proto\022\004exec\032\013Types.proto\"X\n\010" +
+ "NamePart\022!\n\004type\030\001 \001(\0162\023.exec.NamePart.T" +
+ "ype\022\014\n\004name\030\002 \001(\t\"\033\n\004Type\022\010\n\004NAME\020\000\022\t\n\005A" +
+ "RRAY\020\001\"O\n\010FieldDef\022\034\n\004name\030\001 \003(\0132\016.exec." +
+ "NamePart\022%\n\nmajor_type\030\002 \001(\0132\021.common.Ma" +
+ "jorType*0\n\tValueMode\022\020\n\014VALUE_VECTOR\020\000\022\007" +
+ "\n\003RLE\020\001\022\010\n\004DICT\020\002B0\n\033org.apache.drill.ex" +
+ "ec.protoB\017SchemaDefProtosH\001"
+ };
+ com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
+ new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
+ public com.google.protobuf.ExtensionRegistry assignDescriptors(
+ com.google.protobuf.Descriptors.FileDescriptor root) {
+ descriptor = root;
+ internal_static_exec_NamePart_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_exec_NamePart_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_exec_NamePart_descriptor,
+ new java.lang.String[] { "Type", "Name", });
+ internal_static_exec_FieldDef_descriptor =
+ getDescriptor().getMessageTypes().get(1);
+ internal_static_exec_FieldDef_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_exec_FieldDef_descriptor,
+ new java.lang.String[] { "Name", "MajorType", });
+ return null;
+ }
+ };
+ com.google.protobuf.Descriptors.FileDescriptor
+ .internalBuildGeneratedFileFrom(descriptorData,
+ new com.google.protobuf.Descriptors.FileDescriptor[] {
+ org.apache.drill.common.types.TypeProtos.getDescriptor(),
+ }, assigner);
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}