private ComplexEventChunk executePassThrough(ComplexEventChunk complexEventChunk) {
        complexEventChunk.reset();
        synchronized (this) {
            while (complexEventChunk.hasNext()) {
                ComplexEvent event = complexEventChunk.next();
                if (((event.getType() != StreamEvent.Type.CURRENT || !currentOn) &&
                        (event.getType() != StreamEvent.Type.EXPIRED || !expiredOn))) {
                    complexEventChunk.remove();
                }
            }
        }
        complexEventChunk.reset();
        if (complexEventChunk.hasNext()) {
            return complexEventChunk;
        }
        return null;
    }
Processor implementation representing selector portion of the Siddhi query.
modules/siddhi-core/src/main/java/io/siddhi/core/query/selector/QuerySelector.java