@Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof MinFunction)) {
            return false;
        }
        final MinFunction function = (MinFunction) o;
        return Objects.equals(getEntityId(), function.getEntityId())
                && Objects.equals(getTimeBucket(), function.getTimeBucket());
    }
Service ID is required for sort query.
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/meter/function/min/MinFunction.java