private static boolean compatibleTypes(DataType seenType, DataType fieldType) {
        // legacy tag field type compatibility; probably not needed any more (Oct 2016)
        if ("tag".equals(seenType.getName())) {
            return "tag".equals(fieldType.getName()) || "WeightedSet<string>".equals(fieldType.getName());
        }
        if ("tag".equals(fieldType.getName())) {
            return "tag".equals(seenType.getName()) || "WeightedSet<string>".equals(seenType.getName());
        }
        if (seenType instanceof TensorDataType && fieldType instanceof TensorDataType) {
            return fieldType.isAssignableFrom(seenType); // TODO: Just do this for all types
        }
        return seenType.equals(fieldType);
    }
This Processor makes sure all fields with the same name have the same {@link DataType}. This check
explicitly disregards whether a field is an index field, an attribute or a summary field. This is a requirement if we
hope to move to a model where index fields, attributes and summary fields share a common field class.

@author Simon Thoresen Hult
config-model/src/main/java/com/yahoo/schema/processing/ValidateFieldTypes.java