private static boolean isCollectionVariable(MatchingMetaInfoHolder matchingMetaInfoHolder, Variable variable) {
        if (variable.getStreamId() != null) {
            MetaStreamEvent collectionStreamEvent = matchingMetaInfoHolder.getMetaStateEvent().getMetaStreamEvent
                    (matchingMetaInfoHolder.getStoreEventIndex());
            if (collectionStreamEvent != null) {
                if ((collectionStreamEvent.getInputReferenceId() != null && variable.getStreamId().equals
                        (collectionStreamEvent.getInputReferenceId())) ||
                        (collectionStreamEvent.getLastInputDefinition().getId().equals(variable.getStreamId()))) {
                    return true;
                }
            }
        } else if (matchingMetaInfoHolder.getMetaStateEvent().getMetaStreamEvents().length == 1 &&
                matchingMetaInfoHolder.getMetaStateEvent().getMetaStreamEvents()[0].getEventType()
                        != MetaStreamEvent.EventType.DEFAULT) {
            return true;
        } else if (matchingMetaInfoHolder.getMetaStateEvent().getMetaStreamEvents().length == 2 &&
                matchingMetaInfoHolder.getMetaStateEvent().getMetaStreamEvents()
                        [matchingMetaInfoHolder.getStoreEventIndex()].getEventType()
                        != MetaStreamEvent.EventType.DEFAULT) {
            return true;
        }
        return false;
    }
Parse the given expression and create the appropriate Executor by recursively traversing the expression.

@param expression             Expression to be parsed
@param matchingMetaInfoHolder matchingMetaInfoHolder
@param indexedEventHolder     indexed event holder
@return ExpressionExecutor
modules/siddhi-core/src/main/java/io/siddhi/core/util/parser/CollectionExpressionParser.java