private void addField(String name, DataType type,
                          SummaryElementsSelector elementsSelector,
                          SummaryTransform transform,
                          String source,
                          Map<String, SummaryClassField> fields) {
        if (fields.containsKey(name)) {
            SummaryClassField sf = fields.get(name);
            if ( SummaryClassField.convertDataType(type, transform, rawAsBase64) != sf.getType()) {
                deployLogger.logApplicationPackage(Level.WARNING, "Conflicting definition of field " + name +
                                                                  ". " + "Declared as type " + sf.getType() + " and " + type);
            }
        } else {
            fields.put(name, new SummaryClassField(name, type, elementsSelector, transform, source, rawAsBase64));
        }
    }
MUST be called after all other fields are added
config-model/src/main/java/com/yahoo/schema/derived/SummaryClass.java