当前位置: 首页>>代码示例>>Java>>正文


Java OuterJoinType.equals方法代码示例

本文整理汇总了Java中com.espertech.esper.type.OuterJoinType.equals方法的典型用法代码示例。如果您正苦于以下问题:Java OuterJoinType.equals方法的具体用法?Java OuterJoinType.equals怎么用?Java OuterJoinType.equals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.espertech.esper.type.OuterJoinType的用法示例。


在下文中一共展示了OuterJoinType.equals方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: build

import com.espertech.esper.type.OuterJoinType; //导入方法依赖的package包/类
/**
 * Build query plan.
 *
 * @param queryGraph            - navigability info
 * @param optionalOuterJoinType - outer join type, null if not an outer join
 * @param typesPerStream        - event types for each stream
 * @param tablesPerStream       - table info
 * @param uniqueIndexProps      props of unique indexes
 * @return query plan
 */
public static QueryPlan build(EventType[] typesPerStream, QueryGraph queryGraph, OuterJoinType optionalOuterJoinType, String[][][] uniqueIndexProps, TableMetadata[] tablesPerStream) {
    QueryPlanIndex[] indexSpecs = QueryPlanIndexBuilder.buildIndexSpec(queryGraph, typesPerStream, uniqueIndexProps);

    QueryPlanNode[] execNodeSpecs = new QueryPlanNode[2];
    TableLookupPlan[] lookupPlans = new TableLookupPlan[2];

    // plan lookup from 1 to zero
    lookupPlans[1] = NStreamQueryPlanBuilder.createLookupPlan(queryGraph, 1, 0, indexSpecs[0], typesPerStream, tablesPerStream[0]);

    // plan lookup from zero to 1
    lookupPlans[0] = NStreamQueryPlanBuilder.createLookupPlan(queryGraph, 0, 1, indexSpecs[1], typesPerStream, tablesPerStream[1]);
    execNodeSpecs[0] = new TableLookupNode(lookupPlans[0]);
    execNodeSpecs[1] = new TableLookupNode(lookupPlans[1]);

    if (optionalOuterJoinType != null) {
        if ((optionalOuterJoinType.equals(OuterJoinType.LEFT)) ||
                (optionalOuterJoinType.equals(OuterJoinType.FULL))) {
            execNodeSpecs[0] = new TableOuterLookupNode(lookupPlans[0]);
        }
        if ((optionalOuterJoinType.equals(OuterJoinType.RIGHT)) ||
                (optionalOuterJoinType.equals(OuterJoinType.FULL))) {
            execNodeSpecs[1] = new TableOuterLookupNode(lookupPlans[1]);
        }
    }

    return new QueryPlan(indexSpecs, execNodeSpecs);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:38,代码来源:TwoStreamQueryPlanBuilder.java

示例2: build

import com.espertech.esper.type.OuterJoinType; //导入方法依赖的package包/类
/**
 * Build query plan.
 * @param queryGraph - navigability info
 * @param optionalOuterJoinType - outer join type, null if not an outer join
 * @param typesPerStream - event types for each stream
 * @return query plan
 */
public static QueryPlan build(EventType[] typesPerStream, QueryGraph queryGraph, OuterJoinType optionalOuterJoinType, String[][][] uniqueIndexProps)
{
    QueryPlanIndex[] indexSpecs = new QueryPlanIndex[2];
    QueryPlanNode[] execNodeSpecs = new QueryPlanNode[2];

    TableLookupPlan lookupPlans[] = new TableLookupPlan[2];

    // plan lookup from 1 to zero
    Pair<QueryPlanIndex, TableLookupPlan> plan = planQuery(1, 0, typesPerStream, queryGraph, uniqueIndexProps[0]);
    indexSpecs[0] = plan.getFirst();
    lookupPlans[1] = plan.getSecond();

    // plan lookup from zero to 1
    plan = planQuery(0, 1, typesPerStream, queryGraph, uniqueIndexProps[1]);
    indexSpecs[1] = plan.getFirst();
    lookupPlans[0] = plan.getSecond();

    execNodeSpecs[0] = new TableLookupNode(lookupPlans[0]);
    execNodeSpecs[1] = new TableLookupNode(lookupPlans[1]);

    if (optionalOuterJoinType != null)
    {
        if ( (optionalOuterJoinType.equals(OuterJoinType.LEFT)) ||
             (optionalOuterJoinType.equals(OuterJoinType.FULL)) )
        {
            execNodeSpecs[0] = new TableOuterLookupNode(lookupPlans[0]);
        }
        if ( (optionalOuterJoinType.equals(OuterJoinType.RIGHT)) ||
             (optionalOuterJoinType.equals(OuterJoinType.FULL)) )
        {
            execNodeSpecs[1] = new TableOuterLookupNode(lookupPlans[1]);
        }
    }

    return new QueryPlan(indexSpecs, execNodeSpecs);
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:44,代码来源:TwoStreamQueryPlanBuilder.java


注:本文中的com.espertech.esper.type.OuterJoinType.equals方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。