@Override
    public Cost getDefaultCost() {
        if (operator == Compare.Operator.EQUAL) {
            return Cost.SINGLE_RETURN_INDEX_MATCHING;
        } else if (operator == Compare.Operator.NOT_EQUAL) {
            return Cost.EXHAUSTIVE;
        } else {
            return Cost.MULTI_RETURN_INDEX_MATCHING;
        }
    }
Implementation of {@link CollectionExecutor} which handle compare condition.
modules/siddhi-core/src/main/java/io/siddhi/core/util/collection/executor/CompareCollectionExecutor.java