本文整理汇总了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);
}
示例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);
}