private static LinkedHashMap<String, List<String>> buildLabelIndex(List<KeyValue> queryLabels, String separator) {
        LinkedHashMap<String, List<String>> labelIndex = new LinkedHashMap<>();
        if (null != queryLabels) {
            for (KeyValue keyValue : queryLabels) {
                String labelName = keyValue.getKey();
                String labelValue = keyValue.getValue();
                if (StringUtil.isNotBlank(labelValue)) {
                    String[] subValues = labelValue.split(separator);
                    for (String subValue : subValues) {
                        labelIndex.computeIfAbsent(labelName, key -> new ArrayList<>()).add(subValue);
                    }
                }
            }
        }
        return labelIndex;
    }
Compose the multiple metric result based on conditions.
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/storage/query/IMetricsQueryDAO.java