0

I have a tuple:

public class mytuple
{
    private int status;

    private int userid;
    private int location;

    private int count1;
    private int count2;

    // corresponding getter settrs included.
}

I create two esper statements EPL:

select mytuple.userid as userid, sum(count1) as count1, sum(count2) as count2
from eventStream where mytuple.status = -1
group by userid, location;

and another EPL statement:

select mytuple.userid as userid, sum(count1) as count1, sum(count2) as count2
from eventStream where mytuple.status = 1
group by userid, location;

The event streams are registered inside the configuration.

The issue i am facing is , on the two events being sent out.. one as status= -1 and another as status = +1, I get an incremental count of +2 on first EPL statement.

However, if only one event is being sent, the streams work perfectly. Is there any thing that I am missing here??

Assuming the fact that I have a seperate listener to the Esper view which was created.

Mike Two
  • 44,935
  • 9
  • 80
  • 96
  • Status is not being aggregated by these statements, count1 and count2 are. What are the values of count1 and count2 for the test events? – R Dub Aug 28 '13 at 17:31

1 Answers1

0

Best to run this by the Esper user mailing list, as described in http://esper.codehaus.org/about/esper/mailinglist.html Create a small test case and send that along, make sure you use a recent version.

For filtering put the conditions in parenthesis, which is the preferred notation:

select ....from eventStream(mytuple.status = 1) ....

user650839
  • 2,594
  • 1
  • 13
  • 9