本文整理汇总了Java中com.espertech.esper.epl.spec.OuterJoinDesc.makeExprNode方法的典型用法代码示例。如果您正苦于以下问题:Java OuterJoinDesc.makeExprNode方法的具体用法?Java OuterJoinDesc.makeExprNode怎么用?Java OuterJoinDesc.makeExprNode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.espertech.esper.epl.spec.OuterJoinDesc
的用法示例。
在下文中一共展示了OuterJoinDesc.makeExprNode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildLookupInstructions
import com.espertech.esper.epl.spec.OuterJoinDesc; //导入方法依赖的package包/类
private static List<LookupInstructionPlan> buildLookupInstructions(
int rootStreamNum,
LinkedHashMap<Integer, int[]> substreamsPerStream,
boolean[] requiredPerStream,
String[] streamNames,
QueryGraph queryGraph,
QueryPlanIndex[] indexSpecs,
EventType[] typesPerStream,
OuterJoinDesc[] outerJoinDescList,
boolean[] isHistorical,
HistoricalStreamIndexList[] historicalStreamIndexLists,
ExprEvaluatorContext exprEvaluatorContext,
TableMetadata[] tablesPerStream,
EngineImportService engineImportService,
boolean isFireAndForget) {
List<LookupInstructionPlan> result = new LinkedList<LookupInstructionPlan>();
for (int fromStream : substreamsPerStream.keySet()) {
int[] substreams = substreamsPerStream.get(fromStream);
// for streams with no substreams we don't need to look up
if (substreams.length == 0) {
continue;
}
TableLookupPlan[] plans = new TableLookupPlan[substreams.length];
HistoricalDataPlanNode[] historicalPlans = new HistoricalDataPlanNode[substreams.length];
for (int i = 0; i < substreams.length; i++) {
int toStream = substreams[i];
if (isHistorical[toStream]) {
// There may not be an outer-join descriptor, use if provided to build the associated expression
ExprEvaluator outerJoinEval = null;
if (outerJoinDescList.length > 0) {
OuterJoinDesc outerJoinDesc;
if (toStream == 0) {
outerJoinDesc = outerJoinDescList[0];
} else {
outerJoinDesc = outerJoinDescList[toStream - 1];
}
ExprNode outerJoinExpr = outerJoinDesc.makeExprNode(exprEvaluatorContext);
outerJoinEval = ExprNodeCompiler.allocateEvaluator(outerJoinExpr.getForge(), engineImportService, NStreamOuterQueryPlanBuilder.class, isFireAndForget, exprEvaluatorContext.getStatementName());
}
if (historicalStreamIndexLists[toStream] == null) {
historicalStreamIndexLists[toStream] = new HistoricalStreamIndexList(toStream, typesPerStream, queryGraph);
}
historicalStreamIndexLists[toStream].addIndex(fromStream);
historicalPlans[i] = new HistoricalDataPlanNode(toStream, rootStreamNum, fromStream, typesPerStream.length, outerJoinEval);
} else {
plans[i] = NStreamQueryPlanBuilder.createLookupPlan(queryGraph, fromStream, toStream, indexSpecs[toStream], typesPerStream, tablesPerStream[toStream]);
}
}
String fromStreamName = streamNames[fromStream];
LookupInstructionPlan instruction = new LookupInstructionPlan(fromStream, fromStreamName, substreams, plans, historicalPlans, requiredPerStream);
result.add(instruction);
}
return result;
}
示例2: buildLookupInstructions
import com.espertech.esper.epl.spec.OuterJoinDesc; //导入方法依赖的package包/类
private static List<LookupInstructionPlan> buildLookupInstructions(
int rootStreamNum,
LinkedHashMap<Integer, int[]> substreamsPerStream,
boolean[] requiredPerStream,
String[] streamNames,
QueryGraph queryGraph,
QueryPlanIndex[] indexSpecs,
EventType[] typesPerStream,
List<OuterJoinDesc> outerJoinDescList,
boolean[] isHistorical,
HistoricalStreamIndexList[] historicalStreamIndexLists,
ExprEvaluatorContext exprEvaluatorContext)
{
List<LookupInstructionPlan> result = new LinkedList<LookupInstructionPlan>();
for (int fromStream : substreamsPerStream.keySet())
{
int[] substreams = substreamsPerStream.get(fromStream);
// for streams with no substreams we don't need to look up
if (substreams.length == 0)
{
continue;
}
TableLookupPlan plans[] = new TableLookupPlan[substreams.length];
HistoricalDataPlanNode historicalPlans[] = new HistoricalDataPlanNode[substreams.length];
for (int i = 0; i < substreams.length; i++)
{
int toStream = substreams[i];
if (isHistorical[toStream])
{
// There may not be an outer-join descriptor, use if provided to build the associated expression
ExprNode outerJoinExpr = null;
if (!outerJoinDescList.isEmpty()) {
OuterJoinDesc outerJoinDesc;
if (toStream == 0)
{
outerJoinDesc = outerJoinDescList.get(0);
}
else
{
outerJoinDesc = outerJoinDescList.get(toStream - 1);
}
outerJoinExpr = outerJoinDesc.makeExprNode(exprEvaluatorContext);
}
if (historicalStreamIndexLists[toStream] == null)
{
historicalStreamIndexLists[toStream] = new HistoricalStreamIndexList(toStream, typesPerStream, queryGraph);
}
historicalStreamIndexLists[toStream].addIndex(fromStream);
historicalPlans[i] = new HistoricalDataPlanNode(toStream, rootStreamNum, fromStream, typesPerStream.length, outerJoinExpr);
}
else
{
plans[i] = NStreamQueryPlanBuilder.createLookupPlan(queryGraph, fromStream, toStream, indexSpecs[toStream], typesPerStream);
}
}
String fromStreamName = streamNames[fromStream];
LookupInstructionPlan instruction = new LookupInstructionPlan(fromStream, fromStreamName, substreams, plans, historicalPlans, requiredPerStream);
result.add(instruction);
}
return result;
}