@Override
    public void process(boolean validate, boolean documentsOnly) {
        if (documentsOnly) return;

        Set<Reference> warnedAbout = new HashSet<>();
        for (RankProfile profile : rankProfileRegistry.rankProfilesOf(schema)) {
            try {
                resolveTypesIn(profile, validate, warnedAbout);
            }
            catch (IllegalArgumentException e) {
                throw new IllegalArgumentException("In " + (schema != null ? schema + ", " : "") + profile, e);
            }
        }
    }
Resolves and assigns types to all functions in a ranking expression, and
validates the types of all ranking expressions under a schema instance:
Some operators constrain the types of inputs, and first-and second-phase expressions
must return scalar values.

In addition, the existence of all referred attribute, query and constant
features is ensured.

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