private SampleFamily match(String[] labels, Function2<String, String, Boolean> op) {
        Preconditions.checkArgument(labels.length % 2 == 0);
        Map<String, String> ll = new HashMap<>(labels.length / 2);
        for (int i = 0; i < labels.length; i += 2) {
            ll.put(labels[i], labels[i + 1]);
        }
        Sample[] ss = Arrays.stream(samples)
                            .filter(sample -> ll.entrySet()
                                                .stream()
                                                .allMatch(
                                                    entry -> op.apply(sample.labels.getOrDefault(entry.getKey(), ""),
                                                                      entry.getValue()
                                                    )))
                            .toArray(Sample[]::new);
        return ss.length > 0 ? SampleFamily.build(this.context, ss) : EMPTY;
    }
Following operations are used in DSL
oap-server/analyzer/meter-analyzer/src/main/java/org/apache/skywalking/oap/meter/analyzer/dsl/SampleFamily.java