private void verifyCompatibleAttributeTypes(String keyAttributeName,
                                                String keySourceAttributeName) {
        AttributesConfig.Attribute keyAttribute = attributes.get(keyAttributeName);
        AttributesConfig.Attribute keySourceAttribute = attributes.get(keySourceAttributeName);
        if (!keySourceAttribute.datatype().equals(keyAttribute.datatype())) {
            throw new IllegalInputException("Grouping request references key source attribute '" +
                                            keySourceAttributeName + "' with data type '" + datatypeAsString(keySourceAttribute) +
                                            "' that is different than data type '" + datatypeAsString(keyAttribute) + "' of key attribute '" +
                                            keyAttributeName + "'");
        }
        if (!keySourceAttribute.collectiontype().equals(AttributesConfig.Attribute.Collectiontype.Enum.SINGLE)) {
            throw new IllegalInputException("Grouping request references key source attribute '" +
                                            keySourceAttributeName + "' with type '" + typeAsString(keySourceAttribute) + "' " +
                                            "which is not of single value type");
        }
    }
Constructs a new instance of this searcher with the given component id and config.

@param clusterConfig The config for the cluster that this searcher is deployed for.
container-search/src/main/java/com/yahoo/search/grouping/GroupingValidator.java