use of org.wso2.siddhi.core.partition.executor.RangePartitionExecutor in project siddhi by wso2.
the class StreamPartitioner method createSingleInputStreamExecutors.
private void createSingleInputStreamExecutors(SingleInputStream inputStream, Partition partition, MetaStreamEvent metaEvent, List<VariableExpressionExecutor> executors, Map<String, Table> tableMap, SiddhiAppContext siddhiAppContext, String queryName) {
List<PartitionExecutor> executorList = new ArrayList<PartitionExecutor>();
partitionExecutorLists.add(executorList);
if (!inputStream.isInnerStream()) {
for (PartitionType partitionType : partition.getPartitionTypeMap().values()) {
if (partitionType instanceof ValuePartitionType) {
if (partitionType.getStreamId().equals(inputStream.getStreamId())) {
executorList.add(new ValuePartitionExecutor(ExpressionParser.parseExpression(((ValuePartitionType) partitionType).getExpression(), metaEvent, SiddhiConstants.UNKNOWN_STATE, tableMap, executors, siddhiAppContext, false, 0, queryName)));
}
} else {
for (RangePartitionType.RangePartitionProperty rangePartitionProperty : ((RangePartitionType) partitionType).getRangePartitionProperties()) {
if (partitionType.getStreamId().equals(inputStream.getStreamId())) {
executorList.add(new RangePartitionExecutor((ConditionExpressionExecutor) ExpressionParser.parseExpression(rangePartitionProperty.getCondition(), metaEvent, SiddhiConstants.UNKNOWN_STATE, tableMap, executors, siddhiAppContext, false, 0, queryName), rangePartitionProperty.getPartitionKey()));
}
}
}
}
}
}
Aggregations