private SampleFamily newValue(SampleFamily another, Function2<Double, Double, Double> transform) {
        Sample[] ss = Arrays.stream(samples)
                            .flatMap(cs -> io.vavr.collection.Stream.of(another.samples)
                                                                    .find(as -> cs.labels.equals(as.labels))
                                                                    .map(as -> cs.toBuilder()
                                                                                 .value(transform.apply(cs.value,
                                                                                                        as.value
                                                                                 )))
                                                                    .map(Sample.SampleBuilder::build)
                                                                    .toJavaStream())
                            .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