Package com.google.protobuf.DescriptorProtos.FieldDescriptorProto

Examples of com.google.protobuf.DescriptorProtos.FieldDescriptorProto.Type


    }

    protected void setColumnType(Column column, ColumnOptions.Builder columnOptions) {
        ProtobufRowConversion conversion = ProtobufRowConversion.forTInstance(column.getType());
        assert (conversion != null) : column;
        Type type = conversion.getType();
        int decimalScale = conversion.getDecimalScale();
        fieldBuilder.setType(type);
        if (decimalScale >= 0) {
            columnOptions.setDecimalScale(decimalScale);
        }
View Full Code Here


          descriptorBuilderMap.put(typeName, mapBuilder);
          addProtoField(desBuilder, tField.getName(), tField.getFieldId() + 1, typeName, true);
        }
      } else {
        Field field = resolveField(tField);
        Type protoType = thriftTypeToProtoType(field);
        boolean isContainer = isContainer(tField);

        if (supportNestedObjects && protoType == Type.TYPE_MESSAGE) {
          String typeName = resolveMessageTypeName(field.gettStructDescriptor());
View Full Code Here

  private void setBuilderTypeFromField(
      Field field,
      DescriptorProtos.FieldDescriptorProto.Builder builder
   ) throws DescriptorValidationException {
    Type valueProtoType = thriftTypeToProtoType(field);
    if (valueProtoType == Type.TYPE_MESSAGE) {
      builder.setTypeName(resolveMessageTypeName(field.gettStructDescriptor()));
    } else if (valueProtoType != null) {
      builder.setType(valueProtoType);
    }
View Full Code Here

    FieldDescriptor protoFieldDesc = builder.getDescriptorForType().findFieldByName(
        tField.getName());

    if (protoFieldDesc == null) {
      // not finding a field might be ok if we're ignoring an unsupported types
      Type protoType = thriftTypeToProtoType(tField);
      if (protoType == null
          && (ignoreUnsupportedTypes
              || (!supportNestedObjects && hasNestedObject(tField)))) {
        return tmpFieldId; // no-op
      }
View Full Code Here

      int position = ++count;
      String fieldName = fieldSchema.getName();
      byte dataTypeId = fieldSchema.getType();

      // determine and add protobuf types
      Type protoType = pigTypeToProtoType(dataTypeId);
      LOG.info("Mapping Pig field " + fieldName + " of type " + dataTypeId + " to protobuf type: " + protoType);

      addField(desBuilder, fieldName, position, protoType);
    }
View Full Code Here

TOP

Related Classes of com.google.protobuf.DescriptorProtos.FieldDescriptorProto.Type

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.