Change the JoinInputStreamParser compiled condition left/right check logic
@@ -218,29 +218,23 @@ public class JoinInputStreamParser {
if (compareCondition == null) {
compareCondition = Expression.value(true);
}
- CompiledCondition leftCompiledCondition;
- CompiledCondition rightCompiledCondition = null;
- if (rightFindableProcessor instanceof TableWindowProcessor) {
- MatchingMetaInfoHolder rightMatchingMetaInfoHolder = MatcherParser.constructMatchingMetaStateHolder
- (metaStateEvent, 0, rightMetaStreamEvent.getLastInputDefinition(), UNKNOWN_STATE);
- leftCompiledCondition = rightFindableProcessor.compileCondition(compareCondition,
- rightMatchingMetaInfoHolder, siddhiAppContext, executors, tableMap, queryName);
- } else {
- MatchingMetaInfoHolder rightMatchingMetaInfoHolder = MatcherParser.constructMatchingMetaStateHolder
- (metaStateEvent, 0, rightMetaStreamEvent.getLastInputDefinition(), UNKNOWN_STATE);
- leftCompiledCondition = rightFindableProcessor.compileCondition(compareCondition,
- rightMatchingMetaInfoHolder, siddhiAppContext, executors, tableMap, queryName);
+ if (!(rightFindableProcessor instanceof TableWindowProcessor ||
+ rightFindableProcessor instanceof AggregateWindowProcessor) &&
+ (joinInputStream.getTrigger() != JoinInputStream.EventTrigger.LEFT)){
MatchingMetaInfoHolder leftMatchingMetaInfoHolder = MatcherParser.constructMatchingMetaStateHolder
(metaStateEvent, 1, leftMetaStreamEvent.getLastInputDefinition(), UNKNOWN_STATE);
- rightCompiledCondition = leftFindableProcessor.compileCondition(compareCondition,
+ CompiledCondition rightCompiledCondition = leftFindableProcessor.compileCondition(compareCondition,
leftMatchingMetaInfoHolder, siddhiAppContext, executors, tableMap, queryName);
- }
-
- if (joinInputStream.getTrigger() != JoinInputStream.EventTrigger.LEFT && rightCompiledCondition != null) {
populateJoinProcessors(rightMetaStreamEvent, rightInputStreamId, rightPreJoinProcessor,
rightPostJoinProcessor, rightCompiledCondition);
}
- if (joinInputStream.getTrigger() != JoinInputStream.EventTrigger.RIGHT) {
+ if (!(leftFindableProcessor instanceof TableWindowProcessor ||
+ leftFindableProcessor instanceof AggregateWindowProcessor) &&
+ (joinInputStream.getTrigger() != JoinInputStream.EventTrigger.RIGHT)){
+ MatchingMetaInfoHolder rightMatchingMetaInfoHolder = MatcherParser.constructMatchingMetaStateHolder
+ (metaStateEvent, 0, rightMetaStreamEvent.getLastInputDefinition(), UNKNOWN_STATE);
+ CompiledCondition leftCompiledCondition = rightFindableProcessor.compileCondition(compareCondition,
+ rightMatchingMetaInfoHolder, siddhiAppContext, executors, tableMap, queryName);
populateJoinProcessors(leftMetaStreamEvent, leftInputStreamId, leftPreJoinProcessor,
leftPostJoinProcessor, leftCompiledCondition);
}
