private TensorType resolveType(RankingExpression expression, String expressionDescription, TypeContext<Reference> context) {
        if (expression == null) return null;
        return resolveType(expression.getRoot(), expressionDescription, context);
    }
Resolves the types of all functions in the given profile

@throws IllegalArgumentException if validate is true and the given rank profile does not produce valid types
config-model/src/main/java/com/yahoo/schema/processing/RankingExpressionTypeResolver.java