private void assertConsistency(SummaryField summaryField, Schema schema, boolean validate) {
        // Compare to default:
        SummaryField existingDefault = schema.getSummariesInThis().get("default").getSummaryField(summaryField.getName());
        if (existingDefault != null) {
            if (validate)
                assertConsistentTypes(existingDefault, summaryField);
            makeConsistentWithDefaultOrThrow(existingDefault, summaryField);
        }
        else {
            // If no default, compare to whichever definition of the field
            SummaryField existing = schema.getExplicitSummaryField(summaryField.getName());
            if (existing == null) return;
            if (validate)
                assertConsistentTypes(existing, summaryField);
            makeConsistentOrThrow(existing, summaryField, schema);
        }
    }
Ensure that summary field transforms for fields having the same name
are consistent across summary classes

@author bratseth
config-model/src/main/java/com/yahoo/schema/processing/SummaryConsistency.java