Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pattern stream with logical condition "and" does not work correctly #1793

Open
Allan-QLB opened this issue Sep 16, 2022 · 0 comments
Open

Pattern stream with logical condition "and" does not work correctly #1793

Allan-QLB opened this issue Sep 16, 2022 · 0 comments

Comments

@Allan-QLB
Copy link
Contributor

Allan-QLB commented Sep 16, 2022

Description:

@App:name('axx')
define stream RegulatorStateChangeStream(id string, deviceID long,
roomNo int, tempSet double, action string);
define stream RoomKeyStream(id string, deviceID long, roomNo int,
    action string);

@sink(type='log')
define stream RegulatorActionStream(id1 string, id2 string, roomNo int, action string);

from every (e1=RegulatorStateChangeStream[ action == 'on'] and e2=RoomKeyStream[ action == 'removed' ])
select e1.id as id1, e2.id as id2, e1.roomNo,
    ifThenElse( e2 is null, 'none', 'stop' ) as action
insert into RegulatorActionStream;

if I send data as follow:

regulatorStateChangeStreamHandler.send(new Object[] {"a", 10L, 5, 30, "on"});
roomKeyStreamHandler.send(new Object[]{"b1",  10, 5, "removed"});

I will get one match, but If I reverse the order of sending data, I will not get any match

Affected Siddhi Version:
5.x.x
OS, DB, other environment details and versions:

Steps to reproduce:

Related Issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant