private void addAttributeFeatureTypes(ImmutableSDField field, Map<Reference, TensorType> featureTypes) {
        Attribute attribute = field.getAttribute();
        field.getAttributes().forEach((k, a) -> {
            String name = k;
            if (attribute == a)                              // this attribute should take the fields name
                name = field.getName();                      // switch to that - it is separate for imported fields
            if (a.getCollectionType().equals(Attribute.CollectionType.SINGLE)) {
                featureTypes.put(FeatureNames.asAttributeFeature(name), a.tensorType().orElse(TensorType.empty));
            } else {
                featureTypes.put(FeatureNames.asAttributeFeature(name), new AttributeErrorType(deployLogger, name, a.getCollectionType()));
            }
        });
    }
Creates a context containing the type information of all constants, attributes and query profiles
referable from this rank profile.
config-model/src/main/java/com/yahoo/schema/RankProfile.java