public void setCompiledSelection(CompiledSelection compiledSelection) {
        if (compiledSelection != null) {
            this.isOptimisedQuery = true;
            this.compiledSelection = compiledSelection;
        }
    }
Set as the last element of the processor chain.

@param processor Last processor in the chain
modules/siddhi-core/src/main/java/io/siddhi/core/query/input/stream/join/JoinProcessor.java