use of org.wso2.siddhi.core.util.collection.operator.CompiledExpression in project siddhi by wso2.
the class AbstractRecordTable method compileUpdateSet.
public CompiledUpdateSet compileUpdateSet(UpdateSet updateSet, MatchingMetaInfoHolder matchingMetaInfoHolder, SiddhiAppContext siddhiAppContext, List<VariableExpressionExecutor> variableExpressionExecutors, Map<String, Table> tableMap, String queryName) {
RecordTableCompiledUpdateSet recordTableCompiledUpdateSet = new RecordTableCompiledUpdateSet();
Map<String, ExpressionExecutor> parentExecutorMap = new HashMap<>();
for (UpdateSet.SetAttribute setAttribute : updateSet.getSetAttributeList()) {
ExpressionBuilder expressionBuilder = new ExpressionBuilder(setAttribute.getAssignmentExpression(), matchingMetaInfoHolder, siddhiAppContext, variableExpressionExecutors, tableMap, queryName);
CompiledExpression compiledExpression = compileSetAttribute(expressionBuilder);
recordTableCompiledUpdateSet.put(setAttribute.getTableVariable().getAttributeName(), compiledExpression);
Map<String, ExpressionExecutor> expressionExecutorMap = expressionBuilder.getVariableExpressionExecutorMap();
parentExecutorMap.putAll(expressionExecutorMap);
}
recordTableCompiledUpdateSet.setExpressionExecutorMap(parentExecutorMap);
return recordTableCompiledUpdateSet;
}
Aggregations