private RankingExpressionFunction compile(RankingExpressionFunction function,
                                              QueryProfileRegistry queryProfiles,
                                              Map<Reference, TensorType> featureTypes,
                                              ImportedMlModels importedModels,
                                              Map<Reference, Constant> constants,
                                              Map<String, RankingExpressionFunction> inlineFunctions,
                                              ExpressionTransforms expressionTransforms) {
        if (function == null) return null;
        RankProfileTransformContext context = new RankProfileTransformContext(this,
                                                                              queryProfiles,
                                                                              featureTypes,
                                                                              importedModels,
                                                                              constants,
                                                                              inlineFunctions);
        RankingExpression expression = expressionTransforms.transform(function.function().getBody(), context);
        for (Map.Entry<String, String> rankProperty : context.rankProperties().entrySet()) {
            setRankProperty(rankProperty.getKey(), rankProperty.getValue());
        }
        return function.withExpression(expression);
    }
Returns a copy of this where the content is optimized for execution.
Compiled profiles should never be modified.
config-model/src/main/java/com/yahoo/schema/RankProfile.java