public ICollection <EventBean> Lookup(EventBean theEvent, Cursor cursor, ExprEvaluatorContext exprEvaluatorContext)
        {
            if (InstrumentationHelper.ENABLED)
            {
                InstrumentationHelper.Get().QIndexJoinLookup(this, _index);
                var keys   = new List <Object>(2);
                var result = _strategy.LookupCollectKeys(theEvent, _index, exprEvaluatorContext, keys);
                InstrumentationHelper.Get().AIndexJoinLookup(result, keys.Count > 1 ? keys.ToArray() : keys[0]);
                return(result);
            }

            return(_strategy.Lookup(theEvent, _index, exprEvaluatorContext));
        }
        /// <summary>
        /// Lookups the specified lookup event.
        /// </summary>
        /// <param name="lookupEvent">The lookup event.</param>
        /// <param name="indexTable">The index table.</param>
        /// <param name="context">The context.</param>
        /// <returns></returns>
        public IEnumerator <EventBean> Lookup(EventBean lookupEvent, EventTable[] indexTable, ExprEvaluatorContext context)
        {
            // The table may not be indexed as the cache may not actively cache, in which case indexing doesn't makes sense
            if (indexTable[0] is PropertySortedEventTable)
            {
                var index = (PropertySortedEventTable)indexTable[0];
                ICollection <EventBean> events = _strategy.Lookup(lookupEvent, index, context);
                if (events != null)
                {
                    return(events.GetEnumerator());
                }
                return(null);
            }

            return(indexTable[0].GetEnumerator());
        }