private static NamePart getNamePart(PathSegment s) { if (s == null) { return null; } NamePart.Builder b = NamePart.newBuilder(); if (s.getChild() != null) { b.setChild(getNamePart(s.getChild())); } 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(); }
public void mergeFrom(io.protostuff.Input input, com.dremio.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(com.dremio.exec.proto.UserBitShared.NamePart.Type.valueOf(input.readEnum())); break; case 2: builder.setName(input.readString()); break; case 3: builder.setChild(input.mergeObject(com.dremio.exec.proto.UserBitShared.NamePart.newBuilder(), com.dremio.exec.proto.SchemaUserBitShared.NamePart.MERGE)); break; default: input.handleUnknownField(number, this); } } } public boolean isInitialized(com.dremio.exec.proto.UserBitShared.NamePart.Builder builder)
public Builder mergeFrom(com.dremio.exec.proto.UserBitShared.NamePart other) { if (other == com.dremio.exec.proto.UserBitShared.NamePart.getDefaultInstance()) return this; if (other.hasType()) { setType(other.getType()); } if (other.hasName()) { bitField0_ |= 0x00000002; name_ = other.name_; onChanged(); } if (other.hasChild()) { mergeChild(other.getChild()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }