@Override
    public Map<Reference, RankProfile.Constant> constants() {
        if (inherited().isEmpty()) return Collections.unmodifiableMap(constants);
        if (constants.isEmpty()) return inherited().get().constants();

        Map<Reference, RankProfile.Constant> allConstants = new LinkedHashMap<>(inherited().get().constants());
        allConstants.putAll(constants);
        return allConstants;
    }
Returns an unmodifiable map of the constants available in this.
config-model/src/main/java/com/yahoo/schema/Schema.java