/** * <code>optional .exec.shared.NamePart name_part = 2;</code> */ public Builder mergeNamePart(org.apache.drill.exec.proto.UserBitShared.NamePart value) { if (namePartBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && namePart_ != org.apache.drill.exec.proto.UserBitShared.NamePart.getDefaultInstance()) { namePart_ = org.apache.drill.exec.proto.UserBitShared.NamePart.newBuilder(namePart_).mergeFrom(value).buildPartial(); } else { namePart_ = value; } onChanged(); } else { namePartBuilder_.mergeFrom(value); } bitField0_ |= 0x00000002; return this; } /**
/** * <code>optional .exec.shared.NamePart child = 3;</code> */ public Builder mergeChild(org.apache.drill.exec.proto.UserBitShared.NamePart value) { if (childBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004) && child_ != org.apache.drill.exec.proto.UserBitShared.NamePart.getDefaultInstance()) { child_ = org.apache.drill.exec.proto.UserBitShared.NamePart.newBuilder(child_).mergeFrom(value).buildPartial(); } else { child_ = value; } onChanged(); } else { childBuilder_.mergeFrom(value); } bitField0_ |= 0x00000004; return this; } /**
private static NamePart getNamePart(PathSegment s) { if (s == null) { return null; } NamePart.Builder b = NamePart.newBuilder(); if (s.getChild() != null) { NamePart namePart = getNamePart(s.getChild()); if (namePart != null) { b.setChild(namePart); } } if (s.isArray()) { if (s.getArraySegment().hasIndex()) { throw new IllegalStateException("You cannot convert a indexed schema path to a NamePart. NameParts can only reference Vectors, not individual records or values."); } b.setType(Type.ARRAY); } else { b.setType(Type.NAME); b.setName(s.getNameSegment().getPath()); } return b.build(); }
builder.setNamePart(input.mergeObject(org.apache.drill.exec.proto.UserBitShared.NamePart.newBuilder(), org.apache.drill.exec.proto.SchemaUserBitShared.NamePart.MERGE));
public void mergeFrom(com.dyuproject.protostuff.Input input, org.apache.drill.exec.proto.UserBitShared.NamePart.Builder builder) throws java.io.IOException { for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this)) { switch(number) { case 0: return; case 1: builder.setType(org.apache.drill.exec.proto.UserBitShared.NamePart.Type.valueOf(input.readEnum())); break; case 2: builder.setName(input.readString()); break; case 3: builder.setChild(input.mergeObject(org.apache.drill.exec.proto.UserBitShared.NamePart.newBuilder(), org.apache.drill.exec.proto.SchemaUserBitShared.NamePart.MERGE)); break; default: input.handleUnknownField(number, this); } } } public boolean isInitialized(org.apache.drill.exec.proto.UserBitShared.NamePart.Builder builder)
private static NamePart getNamePart(PathSegment s) { if (s == null) { return null; } NamePart.Builder b = NamePart.newBuilder(); if (s.getChild() != null) { NamePart namePart = getNamePart(s.getChild()); if (namePart != null) { b.setChild(namePart); } } if (s.isArray()) { if (s.getArraySegment().hasIndex()) { throw new IllegalStateException("You cannot convert a indexed schema path to a NamePart. NameParts can only reference Vectors, not individual records or values."); } b.setType(Type.ARRAY); } else { b.setType(Type.NAME); b.setName(s.getNameSegment().getPath()); } return b.build(); }
/** * <code>optional .exec.shared.NamePart name_part = 2;</code> */ public Builder mergeNamePart(org.apache.drill.exec.proto.UserBitShared.NamePart value) { if (namePartBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && namePart_ != org.apache.drill.exec.proto.UserBitShared.NamePart.getDefaultInstance()) { namePart_ = org.apache.drill.exec.proto.UserBitShared.NamePart.newBuilder(namePart_).mergeFrom(value).buildPartial(); } else { namePart_ = value; } onChanged(); } else { namePartBuilder_.mergeFrom(value); } bitField0_ |= 0x00000002; return this; } /**
/** * <code>optional .exec.shared.NamePart child = 3;</code> */ public Builder mergeChild(org.apache.drill.exec.proto.UserBitShared.NamePart value) { if (childBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004) && child_ != org.apache.drill.exec.proto.UserBitShared.NamePart.getDefaultInstance()) { child_ = org.apache.drill.exec.proto.UserBitShared.NamePart.newBuilder(child_).mergeFrom(value).buildPartial(); } else { child_ = value; } onChanged(); } else { childBuilder_.mergeFrom(value); } bitField0_ |= 0x00000004; return this; } /**
public Builder toBuilder() { return newBuilder(this); }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(org.apache.drill.exec.proto.UserBitShared.NamePart prototype) {
public static Builder newBuilder(org.apache.drill.exec.proto.UserBitShared.NamePart prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); }
public org.apache.drill.exec.proto.UserBitShared.NamePart.Builder newMessage() { return org.apache.drill.exec.proto.UserBitShared.NamePart.newBuilder(); } public java.lang.String getFieldName(int number)
public SerializedField.Builder getAsBuilder() { return SerializedField.newBuilder() .setMajorType(type) .setNamePart(NamePart.newBuilder().setName(name).build()); }
builder.setNamePart(input.mergeObject(org.apache.drill.exec.proto.UserBitShared.NamePart.newBuilder(), org.apache.drill.exec.proto.SchemaUserBitShared.NamePart.MERGE));
public void mergeFrom(com.dyuproject.protostuff.Input input, org.apache.drill.exec.proto.UserBitShared.NamePart.Builder builder) throws java.io.IOException { for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this)) { switch(number) { case 0: return; case 1: builder.setType(org.apache.drill.exec.proto.UserBitShared.NamePart.Type.valueOf(input.readEnum())); break; case 2: builder.setName(input.readString()); break; case 3: builder.setChild(input.mergeObject(org.apache.drill.exec.proto.UserBitShared.NamePart.newBuilder(), org.apache.drill.exec.proto.SchemaUserBitShared.NamePart.MERGE)); break; default: input.handleUnknownField(number, this); } } } public boolean isInitialized(org.apache.drill.exec.proto.UserBitShared.NamePart.Builder builder)
public Builder toBuilder() { return newBuilder(this); }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(org.apache.drill.exec.proto.UserBitShared.NamePart prototype) {
public static Builder newBuilder(org.apache.drill.exec.proto.UserBitShared.NamePart prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); }
public org.apache.drill.exec.proto.UserBitShared.NamePart.Builder newMessage() { return org.apache.drill.exec.proto.UserBitShared.NamePart.newBuilder(); } public java.lang.String getFieldName(int number)
public SerializedField.Builder getAsBuilder() { return SerializedField.newBuilder() .setMajorType(type) .setNamePart(NamePart.newBuilder().setName(name).build()); }