Package com.espertech.esper.epl.join.table

Examples of com.espertech.esper.epl.join.table.PropertyIndexedEventTableSingle


        return new TableLookupKeyDesc(Collections.singletonList(hashKey), Collections.<QueryGraphValueEntryRange>emptyList());
    }

    public JoinExecTableLookupStrategy makeStrategyInternal(EventTable eventTable, EventType[] eventTypes)
    {
        PropertyIndexedEventTableSingle index = (PropertyIndexedEventTableSingle) eventTable;
        if (hashKey instanceof QueryGraphValueEntryHashKeyedExpr) {
            QueryGraphValueEntryHashKeyedExpr expr = (QueryGraphValueEntryHashKeyedExpr) hashKey;
            return new IndexedTableLookupStrategySingleExpr(expr.getKeyExpr(), super.getLookupStream(), index,
                    new LookupStrategyDesc(LookupStrategyType.SINGLEEXPR, new String[] {expr.getKeyExpr().toExpressionString()}));
        }
View Full Code Here


        return new TableLookupKeyDesc(Collections.singletonList(hashKey), Collections.<QueryGraphValueEntryRange>emptyList());
    }

    public JoinExecTableLookupStrategy makeStrategyInternal(EventTable[] eventTable, EventType[] eventTypes)
    {
        PropertyIndexedEventTableSingle index = (PropertyIndexedEventTableSingle) eventTable[0];
        if (hashKey instanceof QueryGraphValueEntryHashKeyedExpr) {
            QueryGraphValueEntryHashKeyedExpr expr = (QueryGraphValueEntryHashKeyedExpr) hashKey;
            return new IndexedTableLookupStrategySingleExpr(expr.getKeyExpr(), super.getLookupStream(), index,
                    new LookupStrategyDesc(LookupStrategyType.SINGLEEXPR, new String[] {ExprNodeUtility.toExpressionStringMinPrecedence(expr.getKeyExpr())}));
        }
View Full Code Here

    {
        if (!isActiveCache)
        {
            return new UnindexedEventTableList(pollResult);
        }
        PropertyIndexedEventTableSingle table = new PropertyIndexedEventTableSingle(streamNum, eventType, propertyName);
        table.add(pollResult.toArray(new EventBean[pollResult.size()]));
        return table;
    }
View Full Code Here

    public Iterator<EventBean> lookup(EventBean lookupEvent, EventTable indexTable, ExprEvaluatorContext exprEvaluatorContext)
    {
        // The table may not be indexed as the cache may not actively cache, in which case indexing doesn't makes sense
        if (indexTable instanceof PropertyIndexedEventTableSingle)
        {
            PropertyIndexedEventTableSingle index = (PropertyIndexedEventTableSingle) indexTable;
            eventsPerStream[lookupStream] = lookupEvent;
            Object key = evaluator.evaluate(eventsPerStream, true, exprEvaluatorContext);

            Set<EventBean> events = index.lookup(key);
            if (events != null)
            {
                return events.iterator();
            }
            return null;
View Full Code Here

        return new TableLookupKeyDesc(Collections.<QueryGraphValueEntryHashKeyed>emptyList(), Collections.<QueryGraphValueEntryRange>emptyList());
    }

    public JoinExecTableLookupStrategy makeStrategyInternal(EventTable[] eventTable, EventType[] eventTypes)
    {
        PropertyIndexedEventTableSingle single = (PropertyIndexedEventTableSingle) eventTable[0];
        ExprEvaluator[] evaluators = new ExprEvaluator[expressions.length];
        for (int i = 0; i < expressions.length; i++) {
            evaluators[i] = expressions[i].getExprEvaluator();
        }
        return new InKeywordSingleTableLookupStrategyExpr(evaluators,
View Full Code Here

        this.lookupStream = lookupStream;
    }

    public Iterator<EventBean> lookup(EventBean lookupEvent, EventTable[] indexTable, ExprEvaluatorContext exprEvaluatorContext)
    {
        PropertyIndexedEventTableSingle table = (PropertyIndexedEventTableSingle) indexTable[0];
        eventsPerStream[lookupStream] = lookupEvent;

        Set<EventBean> result = InKeywordTableLookupUtil.singleIndexLookup(evaluators, eventsPerStream, exprEvaluatorContext, table);
        if (result == null) {
            return null;
View Full Code Here

    public Iterator<EventBean> lookup(EventBean lookupEvent, EventTable[] indexTable, ExprEvaluatorContext exprEvaluatorContext)
    {
        // The table may not be indexed as the cache may not actively cache, in which case indexing doesn't makes sense
        if (indexTable[0] instanceof PropertyIndexedEventTableSingle)
        {
            PropertyIndexedEventTableSingle index = (PropertyIndexedEventTableSingle) indexTable[0];
            eventsPerStream[lookupStream] = lookupEvent;
            Object key = evaluator.evaluate(eventsPerStream, true, exprEvaluatorContext);

            Set<EventBean> events = index.lookup(key);
            if (events != null)
            {
                return events.iterator();
            }
            return null;
View Full Code Here

    public Iterator<EventBean> lookup(EventBean lookupEvent, EventTable indexTable, ExprEvaluatorContext exprEvaluatorContext)
    {
        // The table may not be indexed as the cache may not actively cache, in which case indexing doesn't makes sense
        if (indexTable instanceof PropertyIndexedEventTableSingle)
        {
            PropertyIndexedEventTableSingle index = (PropertyIndexedEventTableSingle) indexTable;
            eventsPerStream[lookupStream] = lookupEvent;
            Object key = evaluator.evaluate(eventsPerStream, true, exprEvaluatorContext);

            Set<EventBean> events = index.lookup(key);
            if (events != null)
            {
                return events.iterator();
            }
            return null;
View Full Code Here

        return new TableLookupKeyDesc(Collections.singletonList(hashKey), Collections.<QueryGraphValueEntryRange>emptyList());
    }

    public JoinExecTableLookupStrategy makeStrategyInternal(EventTable eventTable, EventType[] eventTypes)
    {
        PropertyIndexedEventTableSingle index = (PropertyIndexedEventTableSingle) eventTable;
        if (hashKey instanceof QueryGraphValueEntryHashKeyedExpr) {
            QueryGraphValueEntryHashKeyedExpr expr = (QueryGraphValueEntryHashKeyedExpr) hashKey;
            return new IndexedTableLookupStrategySingleExpr(expr.getKeyExpr(), super.getLookupStream(), index);
        }
        else if (hashKey instanceof QueryGraphValueEntryHashKeyedProp) {
View Full Code Here

TOP

Related Classes of com.espertech.esper.epl.join.table.PropertyIndexedEventTableSingle

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.