|
View:
New views
20 Messages
—
Rating Filter:
Alert me
|
| < Prev | 1 - 2 | Next > |
|
|
on-delete problem in a keepall() window ..Could any one point out where is the mistake in the foll .. its
driving me crazy! 1.create window Signals.win:keepall() 2. create window Trades .. 3. insert into Signals select.. 4. insert into Trades select .. 5. on Trades delete from Signals where .. // this statement correctly outputs the deleted Signals. 6. select .. from Ticks inner join Signals on .... // this still shows ALL the Signals ever created.- no effect of delete. Is the inner join creating a problem? Any other way to check content of the keepall() window thru a statement. Tks , --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: on-delete problem in a keepall() window ..Trying further if I do "output snapshot" of Signals instead of the
"join" in (6).. the correctly reduced signals are output . sandhu wrote: > Could any one point out where is the mistake in the foll .. its > driving me crazy! > > 1.create window Signals.win:keepall() > 2. create window Trades .. > > 3. insert into Signals select.. > 4. insert into Trades select .. > > 5. on Trades delete from Signals where .. // this > statement correctly outputs the deleted Signals. > 6. select .. from Ticks inner join Signals on .... // this > still shows ALL the Signals ever created.- no effect of delete. > > Is the inner join creating a problem? > Any other way to check content of the keepall() window thru a statement. > Tks , > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: on-delete problem in a keepall() window ..well the delete would post an rstream, does your statement "select rstream" or "select irstream"? BR Tom From: sandhu <sandhuqed@...> To: user@... Sent: Thursday, July 16, 2009 4:13:31 PM Subject: [esper-user] on-delete problem in a keepall() window .. Could any one point out where is the mistake in the foll .. its driving me crazy! 1.create window Signals.win:keepall() 2. create window Trades .. 3. insert into Signals select.. 4. insert into Trades select .. 5. on Trades delete from Signals where .. // this statement correctly outputs the deleted Signals. 6. select .. from Ticks inner join Signals on .... // this still shows ALL the Signals ever created.- no effect of delete. Is the inner join creating a problem? Any other way to check content of the keepall() window thru a statement. Tks , --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: on-delete problem in a keepall() window ..Statement 6. as below ? It is selecting insert stream from Ticks as they come an with inner join on the keepall() window. "select tt.symbol from Ticks as tt inner join Signals as ss on tt.symbol=ss.symbol" I thought the keepall window (Signals) would now contain only the balance events after the on - delete in (5). but it seems to contain all events. Is this correct assumption? Thanks, Thomas Bernhardt wrote: > well the delete would post an rstream, does your statement "select > rstream" or "select irstream"? > BR > Tom > ------------------------------------------------------------------------ > *From:* sandhu <sandhuqed@...> > *To:* user@... > *Sent:* Thursday, July 16, 2009 4:13:31 PM > *Subject:* [esper-user] on-delete problem in a keepall() window .. > > Could any one point out where is the mistake in the foll .. its > driving me crazy! > > 1.create window Signals.win:keepall() > 2. create window Trades .. > > 3. insert into Signals select.. > 4. insert into Trades select .. > > 5. on Trades delete from Signals where .. // this > statement correctly outputs the deleted Signals. > 6. select .. from Ticks inner join Signals on .... // this > still shows ALL the Signals ever created.- no effect of delete. > > Is the inner join creating a problem? > Any other way to check content of the keepall() window thru a statement. > Tks , > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: on-delete problem in a keepall() window ..Am still missing something obvious :(
After executing an on-delete on a keepall() window ( myWin).. "on someEvent delete from myWin where id=1" BUT the event ( supposedly deleted ) is still found by - "select * from myWin where id=1" this should work right ? On Sun, Jul 19, 2009 at 2:35 AM, Thomas Bernhardt <bernhardttom@...> wrote: > well the delete would post an rstream, does your statement "select rstream" > or "select irstream"? > BR > Tom > ________________________________ > From: sandhu <sandhuqed@...> > To: user@... > Sent: Thursday, July 16, 2009 4:13:31 PM > Subject: [esper-user] on-delete problem in a keepall() window .. > > Could any one point out where is the mistake in the foll .. its > driving me crazy! > > 1.create window Signals.win:keepall() > 2. create window Trades .. > > 3. insert into Signals select.. > 4. insert into Trades select .. > > 5. on Trades delete from Signals where .. // this > statement correctly outputs the deleted Signals. > 6. select .. from Ticks inner join Signals on .... // this > still shows ALL the Signals ever created.- no effect of delete. > > Is the inner join creating a problem? > Any other way to check content of the keepall() window thru a statement. > Tks , > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: on-delete problem in a keepall() window ..Hi did your application send the "someEvent" to trigger deletion? -Tom From: sandhu <sandhuqed@...> To: user@... Sent: Friday, September 18, 2009 2:58:56 PM Subject: Re: [esper-user] on-delete problem in a keepall() window .. Am still missing something obvious :( After executing an on-delete on a keepall() window ( myWin).. "on someEvent delete from myWin where id=1" BUT the event ( supposedly deleted ) is still found by - "select * from myWin where id=1" this should work right ? On Sun, Jul 19, 2009 at 2:35 AM, Thomas Bernhardt <bernhardttom@...> wrote: > well the delete would post an rstream, does your statement "select rstream" > or "select irstream"? > BR > Tom > ________________________________ > From: sandhu <sandhuqed@...> > To: user@... > Sent: Thursday, July 16, 2009 4:13:31 PM > Subject: [esper-user] on-delete problem in a keepall() window .. > > Could any one point out where is the mistake in the foll .. its > driving me crazy! > > 1.create window Signals.win:keepall() > 2. create window Trades .. > > 3. insert into Signals select.. > 4. insert into Trades select .. > > 5. on Trades delete from Signals where .. // this > statement correctly outputs the deleted Signals. > 6. select .. from Ticks inner join Signals on .... // this > still shows ALL the Signals ever created.- no effect of delete. > > Is the inner join creating a problem? > Any other way to check content of the keepall() window thru a statement. > Tks , > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: on-delete problem in a keepall() window ..Yes, the 'someEvent' is always sent ..
Rgds, On Tue, Sep 22, 2009 at 6:57 AM, Thomas Bernhardt <bernhardttom@...> wrote: > Hi > did your application send the "someEvent" to trigger deletion? > -Tom > ________________________________ > From: sandhu <sandhuqed@...> > To: user@... > Sent: Friday, September 18, 2009 2:58:56 PM > Subject: Re: [esper-user] on-delete problem in a keepall() window .. > > Am still missing something obvious :( > > After executing an on-delete on a keepall() window ( myWin).. > "on someEvent delete from myWin where id=1" > > BUT the event ( supposedly deleted ) is still found by - > "select * from myWin where id=1" > > this should work right ? > > > > > On Sun, Jul 19, 2009 at 2:35 AM, Thomas Bernhardt > <bernhardttom@...> wrote: >> well the delete would post an rstream, does your statement "select >> rstream" >> or "select irstream"? >> BR >> Tom >> ________________________________ >> From: sandhu <sandhuqed@...> >> To: user@... >> Sent: Thursday, July 16, 2009 4:13:31 PM >> Subject: [esper-user] on-delete problem in a keepall() window .. >> >> Could any one point out where is the mistake in the foll .. its >> driving me crazy! >> >> 1.create window Signals.win:keepall() >> 2. create window Trades .. >> >> 3. insert into Signals select.. >> 4. insert into Trades select .. >> >> 5. on Trades delete from Signals where .. // this >> statement correctly outputs the deleted Signals. >> 6. select .. from Ticks inner join Signals on .... // this >> still shows ALL the Signals ever created.- no effect of delete. >> >> Is the inner join creating a problem? >> Any other way to check content of the keepall() window thru a statement. >> Tks , >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> >> > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: on-delete problem in a keepall() window ..not sure what you are doing wrong, you can send a simple test to reproduce and we will look into -Tom From: sandhu <sandhuqed@...> To: user@... Sent: Thursday, September 24, 2009 2:39:24 AM Subject: Re: [esper-user] on-delete problem in a keepall() window .. Yes, the 'someEvent' is always sent .. Rgds, On Tue, Sep 22, 2009 at 6:57 AM, Thomas Bernhardt <bernhardttom@...> wrote: > Hi > did your application send the "someEvent" to trigger deletion? > -Tom > ________________________________ > From: sandhu <sandhuqed@...> > To: user@... > Sent: Friday, September 18, 2009 2:58:56 PM > Subject: Re: [esper-user] on-delete problem in a keepall() window .. > > Am still missing something obvious :( > > After executing an on-delete on a keepall() window ( myWin).. > "on someEvent delete from myWin where id=1" > > BUT the event ( supposedly deleted ) is still found by - > "select * from myWin where id=1" > > this should work right ? > > > > > On Sun, Jul 19, 2009 at 2:35 AM, Thomas Bernhardt > <bernhardttom@...> wrote: >> well the delete would post an rstream, does your statement "select >> rstream" >> or "select irstream"? >> BR >> Tom >> ________________________________ >> From: sandhu <sandhuqed@...> >> To: user@... >> Sent: Thursday, July 16, 2009 4:13:31 PM >> Subject: [esper-user] on-delete problem in a keepall() window .. >> >> Could any one point out where is the mistake in the foll .. its >> driving me crazy! >> >> 1.create window Signals.win:keepall() >> 2. create window Trades .. >> >> 3. insert into Signals select.. >> 4. insert into Trades select .. >> >> 5. on Trades delete from Signals where .. // this >> statement correctly outputs the deleted Signals. >> 6. select .. from Ticks inner join Signals on .... // this >> still shows ALL the Signals ever created.- no effect of delete. >> >> Is the inner join creating a problem? >> Any other way to check content of the keepall() window thru a statement. >> Tks , >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> >> >> >> > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: on-delete problem in a keepall() window ..Problem: To insert event into myWin.win:keepall() only if previous
event with same symbol is deleted or does not exist. Tried the foll : 1. on-delete removes the event correctly, "select * from myWin" no longer shows the event . 2. Insert works correctly ( if no symbol check) ..but results in duplicates : "insert into myWin symbol,price from pattern[ ... ] " 3. Insert fails if we check (not in / not exists ) for symbol that was deleted in step 1 : "insert into myWin symbol,price from pattern[ ... ] as ss where ss.symbol not in (select symbol from myWin) " Thanks for any help, On Thu, Sep 24, 2009 at 4:29 PM, Thomas Bernhardt <bernhardttom@...> wrote: > not sure what you are doing wrong, you can send a simple test to reproduce > and we will look into > -Tom > ________________________________ > From: sandhu <sandhuqed@...> > To: user@... > Sent: Thursday, September 24, 2009 2:39:24 AM > Subject: Re: [esper-user] on-delete problem in a keepall() window .. > > Yes, the 'someEvent' is always sent .. > Rgds, > > On Tue, Sep 22, 2009 at 6:57 AM, Thomas Bernhardt > <bernhardttom@...> wrote: >> Hi >> did your application send the "someEvent" to trigger deletion? >> -Tom >> ________________________________ >> From: sandhu <sandhuqed@...> >> To: user@... >> Sent: Friday, September 18, 2009 2:58:56 PM >> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >> >> Am still missing something obvious :( >> >> After executing an on-delete on a keepall() window ( myWin).. >> "on someEvent delete from myWin where id=1" >> >> BUT the event ( supposedly deleted ) is still found by - >> "select * from myWin where id=1" >> >> this should work right ? >> >> >> >> >> On Sun, Jul 19, 2009 at 2:35 AM, Thomas Bernhardt >> <bernhardttom@...> wrote: >>> well the delete would post an rstream, does your statement "select >>> rstream" >>> or "select irstream"? >>> BR >>> Tom >>> ________________________________ >>> From: sandhu <sandhuqed@...> >>> To: user@... >>> Sent: Thursday, July 16, 2009 4:13:31 PM >>> Subject: [esper-user] on-delete problem in a keepall() window .. >>> >>> Could any one point out where is the mistake in the foll .. its >>> driving me crazy! >>> >>> 1.create window Signals.win:keepall() >>> 2. create window Trades .. >>> >>> 3. insert into Signals select.. >>> 4. insert into Trades select .. >>> >>> 5. on Trades delete from Signals where .. // this >>> statement correctly outputs the deleted Signals. >>> 6. select .. from Ticks inner join Signals on .... // this >>> still shows ALL the Signals ever created.- no effect of delete. >>> >>> Is the inner join creating a problem? >>> Any other way to check content of the keepall() window thru a statement. >>> Tks , >>> >>> --------------------------------------------------------------------- >>> To unsubscribe from this list, please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >>> >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> >> > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: on-delete problem in a keepall() window ..why not simply use the std:unique data window? i.e. create window MyWin.std:unique(id) as ... -Tom From: sandhu <sandhuqed@...> To: user@... Sent: Friday, September 25, 2009 5:36:38 AM Subject: Re: [esper-user] on-delete problem in a keepall() window .. Problem: To insert event into myWin.win:keepall() only if previous event with same symbol is deleted or does not exist. Tried the foll : 1. on-delete removes the event correctly, "select * from myWin" no longer shows the event . 2. Insert works correctly ( if no symbol check) ..but results in duplicates : "insert into myWin symbol,price from pattern[ ... ] " 3. Insert fails if we check (not in / not exists ) for symbol that was deleted in step 1 : "insert into myWin symbol,price from pattern[ ... ] as ss where ss.symbol not in (select symbol from myWin) " Thanks for any help, On Thu, Sep 24, 2009 at 4:29 PM, Thomas Bernhardt <bernhardttom@...> wrote: > not sure what you are doing wrong, you can send a simple test to reproduce > and we will look into > -Tom > ________________________________ > From: sandhu <sandhuqed@...> > To: user@... > Sent: Thursday, September 24, 2009 2:39:24 AM > Subject: Re: [esper-user] on-delete problem in a keepall() window .. > > Yes, the 'someEvent' is always sent .. > Rgds, > > On Tue, Sep 22, 2009 at 6:57 AM, Thomas Bernhardt > <bernhardttom@...> wrote: >> Hi >> did your application send the "someEvent" to trigger deletion? >> -Tom >> ________________________________ >> From: sandhu <sandhuqed@...> >> To: user@... >> Sent: Friday, September 18, 2009 2:58:56 PM >> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >> >> Am still missing something obvious :( >> >> After executing an on-delete on a keepall() window ( myWin).. >> "on someEvent delete from myWin where id=1" >> >> BUT the event ( supposedly deleted ) is still found by - >> "select * from myWin where id=1" >> >> this should work right ? >> >> >> >> >> On Sun, Jul 19, 2009 at 2:35 AM, Thomas Bernhardt >> <bernhardttom@...> wrote: >>> well the delete would post an rstream, does your statement "select >>> rstream" >>> or "select irstream"? >>> BR >>> Tom >>> ________________________________ >>> From: sandhu <sandhuqed@...> >>> To: user@... >>> Sent: Thursday, July 16, 2009 4:13:31 PM >>> Subject: [esper-user] on-delete problem in a keepall() window .. >>> >>> Could any one point out where is the mistake in the foll .. its >>> driving me crazy! >>> >>> 1.create window Signals.win:keepall() >>> 2. create window Trades .. >>> >>> 3. insert into Signals select.. >>> 4. insert into Trades select .. >>> >>> 5. on Trades delete from Signals where .. // this >>> statement correctly outputs the deleted Signals. >>> 6. select .. from Ticks inner join Signals on .... // this >>> still shows ALL the Signals ever created.- no effect of delete. >>> >>> Is the inner join creating a problem? >>> Any other way to check content of the keepall() window thru a statement. >>> Tks , >>> >>> --------------------------------------------------------------------- >>> To unsubscribe from this list, please visit: >>> >>> >>> >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> >> > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: on-delete problem in a keepall() window ..The original event for same symbol needs to be retained.. should not
get replaced by new one. So std:unique not workable.. correct? On Fri, Sep 25, 2009 at 3:53 PM, Thomas Bernhardt <bernhardttom@...> wrote: > why not simply use the std:unique data window? i.e. create window > MyWin.std:unique(id) as ... > -Tom > ________________________________ > From: sandhu <sandhuqed@...> > To: user@... > Sent: Friday, September 25, 2009 5:36:38 AM > Subject: Re: [esper-user] on-delete problem in a keepall() window .. > > Problem: To insert event into myWin.win:keepall() only if previous > event with same symbol is deleted or does not exist. > > Tried the foll : > > 1. on-delete removes the event correctly, "select * from myWin" no > longer shows the event . > > 2. Insert works correctly ( if no symbol check) ..but results in > duplicates : "insert into myWin symbol,price from pattern[ ... ] " > > 3. Insert fails if we check (not in / not exists ) for symbol that was > deleted in step 1 : > "insert into myWin symbol,price from pattern[ ... ] as ss where > ss.symbol not in (select symbol from myWin) " > > Thanks for any help, > > > On Thu, Sep 24, 2009 at 4:29 PM, Thomas Bernhardt > <bernhardttom@...> wrote: >> not sure what you are doing wrong, you can send a simple test to reproduce >> and we will look into >> -Tom >> ________________________________ >> From: sandhu <sandhuqed@...> >> To: user@... >> Sent: Thursday, September 24, 2009 2:39:24 AM >> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >> >> Yes, the 'someEvent' is always sent .. >> Rgds, >> >> On Tue, Sep 22, 2009 at 6:57 AM, Thomas Bernhardt >> <bernhardttom@...> wrote: >>> Hi >>> did your application send the "someEvent" to trigger deletion? >>> -Tom >>> ________________________________ >>> From: sandhu <sandhuqed@...> >>> To: user@... >>> Sent: Friday, September 18, 2009 2:58:56 PM >>> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >>> >>> Am still missing something obvious :( >>> >>> After executing an on-delete on a keepall() window ( myWin).. >>> "on someEvent delete from myWin where id=1" >>> >>> BUT the event ( supposedly deleted ) is still found by - >>> "select * from myWin where id=1" >>> >>> this should work right ? >>> >>> >>> >>> >>> On Sun, Jul 19, 2009 at 2:35 AM, Thomas Bernhardt >>> <bernhardttom@...> wrote: >>>> well the delete would post an rstream, does your statement "select >>>> rstream" >>>> or "select irstream"? >>>> BR >>>> Tom >>>> ________________________________ >>>> From: sandhu <sandhuqed@...> >>>> To: user@... >>>> Sent: Thursday, July 16, 2009 4:13:31 PM >>>> Subject: [esper-user] on-delete problem in a keepall() window .. >>>> >>>> Could any one point out where is the mistake in the foll .. its >>>> driving me crazy! >>>> >>>> 1.create window Signals.win:keepall() >>>> 2. create window Trades .. >>>> >>>> 3. insert into Signals select.. >>>> 4. insert into Trades select .. >>>> >>>> 5. on Trades delete from Signals where .. // this >>>> statement correctly outputs the deleted Signals. >>>> 6. select .. from Ticks inner join Signals on .... // this >>>> still shows ALL the Signals ever created.- no effect of delete. >>>> >>>> Is the inner join creating a problem? >>>> Any other way to check content of the keepall() window thru a statement. >>>> Tks , >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe from this list, please visit: >>>> >>>> http://xircles.codehaus.org/manage_email >>>> >>>> >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe from this list, please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >>> >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> >> > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: on-delete problem in a keepall() window ..Tom,
Have tried also std:firstunique(symbol) .. which should be exactly my usecase.. but again the subsequent same symbol events are ignored even if on-delete removed the old event. :( Thanks for help. On Fri, Sep 25, 2009 at 3:53 PM, Thomas Bernhardt <bernhardttom@...> wrote: > why not simply use the std:unique data window? i.e. create window > MyWin.std:unique(id) as ... > -Tom > ________________________________ > From: sandhu <sandhuqed@...> > To: user@... > Sent: Friday, September 25, 2009 5:36:38 AM > Subject: Re: [esper-user] on-delete problem in a keepall() window .. > > Problem: To insert event into myWin.win:keepall() only if previous > event with same symbol is deleted or does not exist. > > Tried the foll : > > 1. on-delete removes the event correctly, "select * from myWin" no > longer shows the event . > > 2. Insert works correctly ( if no symbol check) ..but results in > duplicates : "insert into myWin symbol,price from pattern[ ... ] " > > 3. Insert fails if we check (not in / not exists ) for symbol that was > deleted in step 1 : > "insert into myWin symbol,price from pattern[ ... ] as ss where > ss.symbol not in (select symbol from myWin) " > > Thanks for any help, > > > On Thu, Sep 24, 2009 at 4:29 PM, Thomas Bernhardt > <bernhardttom@...> wrote: >> not sure what you are doing wrong, you can send a simple test to reproduce >> and we will look into >> -Tom >> ________________________________ >> From: sandhu <sandhuqed@...> >> To: user@... >> Sent: Thursday, September 24, 2009 2:39:24 AM >> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >> >> Yes, the 'someEvent' is always sent .. >> Rgds, >> >> On Tue, Sep 22, 2009 at 6:57 AM, Thomas Bernhardt >> <bernhardttom@...> wrote: >>> Hi >>> did your application send the "someEvent" to trigger deletion? >>> -Tom >>> ________________________________ >>> From: sandhu <sandhuqed@...> >>> To: user@... >>> Sent: Friday, September 18, 2009 2:58:56 PM >>> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >>> >>> Am still missing something obvious :( >>> >>> After executing an on-delete on a keepall() window ( myWin).. >>> "on someEvent delete from myWin where id=1" >>> >>> BUT the event ( supposedly deleted ) is still found by - >>> "select * from myWin where id=1" >>> >>> this should work right ? >>> >>> >>> >>> >>> On Sun, Jul 19, 2009 at 2:35 AM, Thomas Bernhardt >>> <bernhardttom@...> wrote: >>>> well the delete would post an rstream, does your statement "select >>>> rstream" >>>> or "select irstream"? >>>> BR >>>> Tom >>>> ________________________________ >>>> From: sandhu <sandhuqed@...> >>>> To: user@... >>>> Sent: Thursday, July 16, 2009 4:13:31 PM >>>> Subject: [esper-user] on-delete problem in a keepall() window .. >>>> >>>> Could any one point out where is the mistake in the foll .. its >>>> driving me crazy! >>>> >>>> 1.create window Signals.win:keepall() >>>> 2. create window Trades .. >>>> >>>> 3. insert into Signals select.. >>>> 4. insert into Trades select .. >>>> >>>> 5. on Trades delete from Signals where .. // this >>>> statement correctly outputs the deleted Signals. >>>> 6. select .. from Ticks inner join Signals on .... // this >>>> still shows ALL the Signals ever created.- no effect of delete. >>>> >>>> Is the inner join creating a problem? >>>> Any other way to check content of the keepall() window thru a statement. >>>> Tks , >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe from this list, please visit: >>>> >>>> http://xircles.codehaus.org/manage_email >>>> >>>> >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe from this list, please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >>> >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> >> > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: on-delete problem in a keepall() window ..The std:firstunique handles delete, do you want to put a small test case together to a named window based on first unique and on-delete. Best regards, Tom From: sandhu <sandhuqed@...> To: user@... Sent: Friday, September 25, 2009 7:03:32 AM Subject: Re: [esper-user] on-delete problem in a keepall() window .. Tom, Have tried also std:firstunique(symbol) .. which should be exactly my usecase.. but again the subsequent same symbol events are ignored even if on-delete removed the old event. :( Thanks for help. On Fri, Sep 25, 2009 at 3:53 PM, Thomas Bernhardt <bernhardttom@...> wrote: > why not simply use the std:unique data window? i.e. create window > MyWin.std:unique(id) as ... > -Tom > ________________________________ > From: sandhu <sandhuqed@...> > To: user@... > Sent: Friday, September 25, 2009 5:36:38 AM > Subject: Re: [esper-user] on-delete problem in a keepall() window .. > > Problem: To insert event into myWin.win:keepall() only if previous > event with same symbol is deleted or does not exist. > > Tried the foll : > > 1. on-delete removes the event correctly, "select * from myWin" no > longer shows the event . > > 2. Insert works correctly ( if no symbol check) ..but results in > duplicates : "insert into myWin symbol,price from pattern[ ... ] " > > 3. Insert fails if we check (not in / not exists ) for symbol that was > deleted in step 1 : > "insert into myWin symbol,price from pattern[ ... ] as ss where > ss.symbol not in (select symbol from myWin) " > > Thanks for any help, > > > On Thu, Sep 24, 2009 at 4:29 PM, Thomas Bernhardt > <bernhardttom@...> wrote: >> not sure what you are doing wrong, you can send a simple test to reproduce >> and we will look into >> -Tom >> ________________________________ >> From: sandhu <sandhuqed@...> >> To: user@... >> Sent: Thursday, September 24, 2009 2:39:24 AM >> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >> >> Yes, the 'someEvent' is always sent .. >> Rgds, >> >> On Tue, Sep 22, 2009 at 6:57 AM, Thomas Bernhardt >> <bernhardttom@...> wrote: >>> Hi >>> did your application send the "someEvent" to trigger deletion? >>> -Tom >>> ________________________________ >>> From: sandhu <sandhuqed@...> >>> To: user@... >>> Sent: Friday, September 18, 2009 2:58:56 PM >>> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >>> >>> Am still missing something obvious :( >>> >>> After executing an on-delete on a keepall() window ( myWin).. >>> "on someEvent delete from myWin where id=1" >>> >>> BUT the event ( supposedly deleted ) is still found by - >>> "select * from myWin where id=1" >>> >>> this should work right ? >>> >>> >>> >>> >>> On Sun, Jul 19, 2009 at 2:35 AM, Thomas Bernhardt >>> <bernhardttom@...> wrote: >>>> well the delete would post an rstream, does your statement "select >>>> rstream" >>>> or "select irstream"? >>>> BR >>>> Tom >>>> ________________________________ >>>> From: sandhu <sandhuqed@...> >>>> To: user@... >>>> Sent: Thursday, July 16, 2009 4:13:31 PM >>>> Subject: [esper-user] on-delete problem in a keepall() window .. >>>> >>>> Could any one point out where is the mistake in the foll .. its >>>> driving me crazy! >>>> >>>> 1.create window Signals.win:keepall() >>>> 2. create window Trades .. >>>> >>>> 3. insert into Signals select.. >>>> 4. insert into Trades select .. >>>> >>>> 5. on Trades delete from Signals where .. // this >>>> statement correctly outputs the deleted Signals. >>>> 6. select .. from Ticks inner join Signals on .... // this >>>> still shows ALL the Signals ever created.- no effect of delete. >>>> >>>> Is the inner join creating a problem? >>>> Any other way to check content of the keepall() window thru a statement. >>>> Tks , >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe from this list, please visit: >>>> >>>> >>>> >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe from this list, please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >>> >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> >> > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: on-delete problem in a keepall() window ..Pls find attached a test case of what I'm doing.. per
com.espertech.esper.regression.view pkg. The last test after on-delete removal still fails. Thanks, On Fri, Sep 25, 2009 at 5:57 PM, Thomas Bernhardt <bernhardttom@...> wrote: > The std:firstunique handles delete, do you want to put a small test case > together to a named window based on first unique and on-delete. > Best regards, > Tom > ________________________________ > From: sandhu <sandhuqed@...> > To: user@... > Sent: Friday, September 25, 2009 7:03:32 AM > Subject: Re: [esper-user] on-delete problem in a keepall() window .. > > Tom, > Have tried also std:firstunique(symbol) .. which should be exactly my > usecase.. but again the subsequent same symbol events are ignored even > if on-delete removed the old event. :( > Thanks for help. > > On Fri, Sep 25, 2009 at 3:53 PM, Thomas Bernhardt > <bernhardttom@...> wrote: >> why not simply use the std:unique data window? i.e. create window >> MyWin.std:unique(id) as ... >> -Tom >> ________________________________ >> From: sandhu <sandhuqed@...> >> To: user@... >> Sent: Friday, September 25, 2009 5:36:38 AM >> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >> >> Problem: To insert event into myWin.win:keepall() only if previous >> event with same symbol is deleted or does not exist. >> >> Tried the foll : >> >> 1. on-delete removes the event correctly, "select * from myWin" no >> longer shows the event . >> >> 2. Insert works correctly ( if no symbol check) ..but results in >> duplicates : "insert into myWin symbol,price from pattern[ ... ] " >> >> 3. Insert fails if we check (not in / not exists ) for symbol that was >> deleted in step 1 : >> "insert into myWin symbol,price from pattern[ ... ] as ss where >> ss.symbol not in (select symbol from myWin) " >> >> Thanks for any help, >> >> >> On Thu, Sep 24, 2009 at 4:29 PM, Thomas Bernhardt >> <bernhardttom@...> wrote: >>> not sure what you are doing wrong, you can send a simple test to >>> reproduce >>> and we will look into >>> -Tom >>> ________________________________ >>> From: sandhu <sandhuqed@...> >>> To: user@... >>> Sent: Thursday, September 24, 2009 2:39:24 AM >>> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >>> >>> Yes, the 'someEvent' is always sent .. >>> Rgds, >>> >>> On Tue, Sep 22, 2009 at 6:57 AM, Thomas Bernhardt >>> <bernhardttom@...> wrote: >>>> Hi >>>> did your application send the "someEvent" to trigger deletion? >>>> -Tom >>>> ________________________________ >>>> From: sandhu <sandhuqed@...> >>>> To: user@... >>>> Sent: Friday, September 18, 2009 2:58:56 PM >>>> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >>>> >>>> Am still missing something obvious :( >>>> >>>> After executing an on-delete on a keepall() window ( myWin).. >>>> "on someEvent delete from myWin where id=1" >>>> >>>> BUT the event ( supposedly deleted ) is still found by - >>>> "select * from myWin where id=1" >>>> >>>> this should work right ? >>>> >>>> >>>> >>>> >>>> On Sun, Jul 19, 2009 at 2:35 AM, Thomas Bernhardt >>>> <bernhardttom@...> wrote: >>>>> well the delete would post an rstream, does your statement "select >>>>> rstream" >>>>> or "select irstream"? >>>>> BR >>>>> Tom >>>>> ________________________________ >>>>> From: sandhu <sandhuqed@...> >>>>> To: user@... >>>>> Sent: Thursday, July 16, 2009 4:13:31 PM >>>>> Subject: [esper-user] on-delete problem in a keepall() window .. >>>>> >>>>> Could any one point out where is the mistake in the foll .. its >>>>> driving me crazy! >>>>> >>>>> 1.create window Signals.win:keepall() >>>>> 2. create window Trades .. >>>>> >>>>> 3. insert into Signals select.. >>>>> 4. insert into Trades select .. >>>>> >>>>> 5. on Trades delete from Signals where .. // this >>>>> statement correctly outputs the deleted Signals. >>>>> 6. select .. from Ticks inner join Signals on .... // this >>>>> still shows ALL the Signals ever created.- no effect of delete. >>>>> >>>>> Is the inner join creating a problem? >>>>> Any other way to check content of the keepall() window thru a >>>>> statement. >>>>> Tks , >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe from this list, please visit: >>>>> >>>>> http://xircles.codehaus.org/manage_email >>>>> >>>>> >>>>> >>>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe from this list, please visit: >>>> >>>> http://xircles.codehaus.org/manage_email >>>> >>>> >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe from this list, please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >>> >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> >> > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > > [TestFirstUniqueWithOnDelete.java] package com.espertech.esper.regression.view; import junit.framework.TestCase; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.espertech.esper.client.EPServiceProvider; import com.espertech.esper.client.EPServiceProviderManager; import com.espertech.esper.client.EPStatement; import com.espertech.esper.client.EventBean; import com.espertech.esper.support.bean.SupportMarketDataBean; import com.espertech.esper.support.client.SupportConfigFactory; import com.espertech.esper.support.util.SupportUpdateListener; public class TestFirstUniqueWithOnDelete extends TestCase { private static String SYMBOL_DELL = "DELL"; private static String SYMBOL_IBM = "IBM"; private EPServiceProvider epService; private SupportUpdateListener insertListener; private SupportUpdateListener deleteListener; private EPStatement insertInto; private EPStatement deleteFrom; public void setUp() { insertListener = new SupportUpdateListener(); deleteListener = new SupportUpdateListener(); epService = EPServiceProviderManager.getDefaultProvider(SupportConfigFactory.getConfiguration()); epService.initialize(); } public void testSumOneView() { String bean =SupportMarketDataBean.class.getName(); String s1=" create window myWin.win:keepall() as "+bean ; String s2=" insert into myWin select b from pattern [ every b=" + bean + " ].std:firstunique(b.symbol) " ; String s3 =" on " + bean + "(price=0) as b delete from myWin as w where b.symbol=w.symbol "; epService.getEPAdministrator().createEPL(s1); insertInto = epService.getEPAdministrator().createEPL(s2); insertInto.addListener(insertListener); deleteFrom = epService.getEPAdministrator().createEPL(s3); deleteFrom.addListener(deleteListener); runAssertion(); } private void runAssertion() { // Insert one DELL event sendEvent(SYMBOL_DELL,"1" ,10d); assertEvents(insertListener,SYMBOL_DELL,"1",10d); // second DELL event Ignored sendEvent(SYMBOL_DELL,"2", 11d); assertFalse(insertListener.isInvoked()); // Insert one IBM event sendEvent(SYMBOL_IBM,"3", 20d); assertEvents(insertListener,SYMBOL_IBM,"3",20d); // This Dell Event Ignored AND also deletes old (and only) DELL in myWin sendEvent(SYMBOL_DELL,"4",0d); assertEvents(deleteListener,SYMBOL_DELL,"1",10d); // Ignore second IBM event sendEvent(SYMBOL_IBM,"5", 21d); assertFalse(insertListener.isInvoked()); //Now this *should* insert new DELL event into myWin but FAILS. sendEvent(SYMBOL_DELL,"6", 12d); assertTrue("Did not Insert !!",insertListener.isInvoked()); assertEvents(insertListener,SYMBOL_DELL,"6",12d); } private void assertEvents(SupportUpdateListener listener,String symbol,String id,Double price) { EventBean[] newData =listener.getLastNewData(); if(newData==null) fail("No new Event Received"); assertEquals(1, newData.length); SupportMarketDataBean bean =(SupportMarketDataBean) newData[0].getUnderlying() ; assertEquals(symbol, bean.getSymbol()); assertEquals("id wrong", id, bean.getId()); insertListener.reset(); assertFalse(insertListener.isInvoked()); } private void sendEvent(String symbol,String id, double price) { SupportMarketDataBean bean = new SupportMarketDataBean(symbol,id,price); epService.getEPRuntime().sendEvent(bean); } private static final Log log = LogFactory.getLog(TestFirstUniqueWithOnDelete.class); } --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: on-delete problem in a keepall() window ..Hi Sandhu replace String s1=" create window myWin.win:keepall() as "+bean ; String s2=" insert into myWin select b from pattern [ every b=" + bean + " ].std:firstunique(b.symbol) " ; String s3 =" on " + bean + "(price=0) as b delete from myWin as w where b.symbol=w.symbol "; with: String s1=" create window myWin.std:firstunique(symbol) as "+bean ; String s2=" insert into myWin select b from " + bean ; String s3 =" on " + bean + "(price=0) as b delete from myWin as w where b.symbol=w.symbol "; -Tom From: sandhu <sandhuqed@...> To: user@... Sent: Saturday, September 26, 2009 6:44:15 AM Subject: Re: [esper-user] on-delete problem in a keepall() window .. Pls find attached a test case of what I'm doing.. per com.espertech.esper.regression.view pkg. The last test after on-delete removal still fails. Thanks, On Fri, Sep 25, 2009 at 5:57 PM, Thomas Bernhardt <bernhardttom@...> wrote: > The std:firstunique handles delete, do you want to put a small test case > together to a named window based on first unique and on-delete. > Best regards, > Tom > ________________________________ > From: sandhu <sandhuqed@...> > To: user@... > Sent: Friday, September 25, 2009 7:03:32 AM > Subject: Re: [esper-user] on-delete problem in a keepall() window .. > > Tom, > Have tried also std:firstunique(symbol) .. which should be exactly my > usecase.. but again the subsequent same symbol events are ignored even > if on-delete removed the old event. :( > Thanks for help. > > On Fri, Sep 25, 2009 at 3:53 PM, Thomas Bernhardt > <bernhardttom@...> wrote: >> why not simply use the std:unique data window? i.e. create window >> MyWin.std:unique(id) as ... >> -Tom >> ________________________________ >> From: sandhu <sandhuqed@...> >> To: user@... >> Sent: Friday, September 25, 2009 5:36:38 AM >> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >> >> Problem: To insert event into myWin.win:keepall() only if previous >> event with same symbol is deleted or does not exist. >> >> Tried the foll : >> >> 1. on-delete removes the event correctly, "select * from myWin" no >> longer shows the event . >> >> 2. Insert works correctly ( if no symbol check) ..but results in >> duplicates : "insert into myWin symbol,price from pattern[ ... ] " >> >> 3. Insert fails if we check (not in / not exists ) for symbol that was >> deleted in step 1 : >> "insert into myWin symbol,price from pattern[ ... ] as ss where >> ss.symbol not in (select symbol from myWin) " >> >> Thanks for any help, >> >> >> On Thu, Sep 24, 2009 at 4:29 PM, Thomas Bernhardt >> <bernhardttom@...> wrote: >>> not sure what you are doing wrong, you can send a simple test to >>> reproduce >>> and we will look into >>> -Tom >>> ________________________________ >>> From: sandhu <sandhuqed@...> >>> To: user@... >>> Sent: Thursday, September 24, 2009 2:39:24 AM >>> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >>> >>> Yes, the 'someEvent' is always sent .. >>> Rgds, >>> >>> On Tue, Sep 22, 2009 at 6:57 AM, Thomas Bernhardt >>> <bernhardttom@...> wrote: >>>> Hi >>>> did your application send the "someEvent" to trigger deletion? >>>> -Tom >>>> ________________________________ >>>> From: sandhu <sandhuqed@...> >>>> To: user@... >>>> Sent: Friday, September 18, 2009 2:58:56 PM >>>> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >>>> >>>> Am still missing something obvious :( >>>> >>>> After executing an on-delete on a keepall() window ( myWin).. >>>> "on someEvent delete from myWin where id=1" >>>> >>>> BUT the event ( supposedly deleted ) is still found by - >>>> "select * from myWin where id=1" >>>> >>>> this should work right ? >>>> >>>> >>>> >>>> >>>> On Sun, Jul 19, 2009 at 2:35 AM, Thomas Bernhardt >>>> <bernhardttom@...> wrote: >>>>> well the delete would post an rstream, does your statement "select >>>>> rstream" >>>>> or "select irstream"? >>>>> BR >>>>> Tom >>>>> ________________________________ >>>>> From: sandhu <sandhuqed@...> >>>>> To: user@... >>>>> Sent: Thursday, July 16, 2009 4:13:31 PM >>>>> Subject: [esper-user] on-delete problem in a keepall() window .. >>>>> >>>>> Could any one point out where is the mistake in the foll .. its >>>>> driving me crazy! >>>>> >>>>> 1.create window Signals.win:keepall() >>>>> 2. create window Trades .. >>>>> >>>>> 3. insert into Signals select.. >>>>> 4. insert into Trades select .. >>>>> >>>>> 5. on Trades delete from Signals where .. // this >>>>> statement correctly outputs the deleted Signals. >>>>> 6. select .. from Ticks inner join Signals on .... // this >>>>> still shows ALL the Signals ever created.- no effect of delete. >>>>> >>>>> Is the inner join creating a problem? >>>>> Any other way to check content of the keepall() window thru a >>>>> statement. >>>>> Tks , >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe from this list, please visit: >>>>> >>>>> >>>>> >>>>> >>>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe from this list, please visit: >>>> >>>> http://xircles.codehaus.org/manage_email >>>> >>>> >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe from this list, please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >>> >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> >> > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > > To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: on-delete problem in a keepall() window ..Doing that seems to ignore the firstunique() altogether -
String s1=" create window myWin.std:firstunique(symbol) as "+bean ; String s2=" insert into myWin select * from " + bean ; String s3 =" on " + bean + "(price=0) as b delete from myWin as w where b.symbol=w.symbol "; The foll both passed without any on-delete :( sendEvent(SYMBOL_DELL,"1" ,10d); assertEvents(insertListener,SYMBOL_DELL,"1",10d); sendEvent(SYMBOL_DELL,"2", 11d); assertEvents(insertListener,SYMBOL_DELL,"2",11d); On Sat, Sep 26, 2009 at 5:16 PM, Thomas Bernhardt <bernhardttom@...> wrote: > Hi Sandhu > replace > String s1=" create window myWin.win:keepall() as "+bean ; > String s2=" insert into myWin select b from pattern [ every b=" + > bean + " ].std:firstunique(b.symbol) " ; > String s3 =" on " + bean + "(price=0) as b delete from myWin as w > where b.symbol=w.symbol "; > with: > String s1=" create window myWin.std:firstunique(symbol) as "+bean ; > String s2=" insert into myWin select b from " + bean ; > String s3 =" on " + bean + "(price=0) as b delete from myWin as w > where b.symbol=w.symbol "; > -Tom > ________________________________ > From: sandhu <sandhuqed@...> > To: user@... > Sent: Saturday, September 26, 2009 6:44:15 AM > Subject: Re: [esper-user] on-delete problem in a keepall() window .. > > Pls find attached a test case of what I'm doing.. per > com.espertech.esper.regression.view pkg. > > The last test after on-delete removal still fails. > > Thanks, > > > > On Fri, Sep 25, 2009 at 5:57 PM, Thomas Bernhardt > <bernhardttom@...> wrote: >> The std:firstunique handles delete, do you want to put a small test case >> together to a named window based on first unique and on-delete. >> Best regards, >> Tom >> ________________________________ >> From: sandhu <sandhuqed@...> >> To: user@... >> Sent: Friday, September 25, 2009 7:03:32 AM >> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >> >> Tom, >> Have tried also std:firstunique(symbol) .. which should be exactly my >> usecase.. but again the subsequent same symbol events are ignored even >> if on-delete removed the old event. :( >> Thanks for help. >> >> On Fri, Sep 25, 2009 at 3:53 PM, Thomas Bernhardt >> <bernhardttom@...> wrote: >>> why not simply use the std:unique data window? i.e. create window >>> MyWin.std:unique(id) as ... >>> -Tom >>> ________________________________ >>> From: sandhu <sandhuqed@...> >>> To: user@... >>> Sent: Friday, September 25, 2009 5:36:38 AM >>> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >>> >>> Problem: To insert event into myWin.win:keepall() only if previous >>> event with same symbol is deleted or does not exist. >>> >>> Tried the foll : >>> >>> 1. on-delete removes the event correctly, "select * from myWin" no >>> longer shows the event . >>> >>> 2. Insert works correctly ( if no symbol check) ..but results in >>> duplicates : "insert into myWin symbol,price from pattern[ ... ] " >>> >>> 3. Insert fails if we check (not in / not exists ) for symbol that was >>> deleted in step 1 : >>> "insert into myWin symbol,price from pattern[ ... ] as ss where >>> ss.symbol not in (select symbol from myWin) " >>> >>> Thanks for any help, >>> >>> >>> On Thu, Sep 24, 2009 at 4:29 PM, Thomas Bernhardt >>> <bernhardttom@...> wrote: >>>> not sure what you are doing wrong, you can send a simple test to >>>> reproduce >>>> and we will look into >>>> -Tom >>>> ________________________________ >>>> From: sandhu <sandhuqed@...> >>>> To: user@... >>>> Sent: Thursday, September 24, 2009 2:39:24 AM >>>> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >>>> >>>> Yes, the 'someEvent' is always sent .. >>>> Rgds, >>>> >>>> On Tue, Sep 22, 2009 at 6:57 AM, Thomas Bernhardt >>>> <bernhardttom@...> wrote: >>>>> Hi >>>>> did your application send the "someEvent" to trigger deletion? >>>>> -Tom >>>>> ________________________________ >>>>> From: sandhu <sandhuqed@...> >>>>> To: user@... >>>>> Sent: Friday, September 18, 2009 2:58:56 PM >>>>> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >>>>> >>>>> Am still missing something obvious :( >>>>> >>>>> After executing an on-delete on a keepall() window ( myWin).. >>>>> "on someEvent delete from myWin where id=1" >>>>> >>>>> BUT the event ( supposedly deleted ) is still found by - >>>>> "select * from myWin where id=1" >>>>> >>>>> this should work right ? >>>>> >>>>> >>>>> >>>>> >>>>> On Sun, Jul 19, 2009 at 2:35 AM, Thomas Bernhardt >>>>> <bernhardttom@...> wrote: >>>>>> well the delete would post an rstream, does your statement "select >>>>>> rstream" >>>>>> or "select irstream"? >>>>>> BR >>>>>> Tom >>>>>> ________________________________ >>>>>> From: sandhu <sandhuqed@...> >>>>>> To: user@... >>>>>> Sent: Thursday, July 16, 2009 4:13:31 PM >>>>>> Subject: [esper-user] on-delete problem in a keepall() window .. >>>>>> >>>>>> Could any one point out where is the mistake in the foll .. its >>>>>> driving me crazy! >>>>>> >>>>>> 1.create window Signals.win:keepall() >>>>>> 2. create window Trades .. >>>>>> >>>>>> 3. insert into Signals select.. >>>>>> 4. insert into Trades select .. >>>>>> >>>>>> 5. on Trades delete from Signals where .. // this >>>>>> statement correctly outputs the deleted Signals. >>>>>> 6. select .. from Ticks inner join Signals on .... // this >>>>>> still shows ALL the Signals ever created.- no effect of delete. >>>>>> >>>>>> Is the inner join creating a problem? >>>>>> Any other way to check content of the keepall() window thru a >>>>>> statement. >>>>>> Tks , >>>>>> >>>>>> --------------------------------------------------------------------- >>>>>> To unsubscribe from this list, please visit: >>>>>> >>>>>> http://xircles.codehaus.org/manage_email >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe from this list, please visit: >>>>> >>>>> http://xircles.codehaus.org/manage_email >>>>> >>>>> >>>>> >>>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe from this list, please visit: >>>> >>>> http://xircles.codehaus.org/manage_email >>>> >>>> >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe from this list, please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >>> >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> >> > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: on-delete problem in a keepall() window ..The insertListener is listening to the insert-into statement I presume? It will therefore receive all events attempted to be inserted (insert stream) including those ignored by the named window data window. You could iterate the named window statement (s1) to find current events in the named window, or create a statement that consumes from the named window, i.e. "select * from MyWin". Best regards, Tom From: sandhu <sandhuqed@...> To: user@... Sent: Saturday, September 26, 2009 8:12:37 AM Subject: Re: [esper-user] on-delete problem in a keepall() window .. Doing that seems to ignore the firstunique() altogether - String s1=" create window myWin.std:firstunique(symbol) as "+bean ; String s2=" insert into myWin select * from " + bean ; String s3 =" on " + bean + "(price=0) as b delete from myWin as w where b.symbol=w.symbol "; The foll both passed without any on-delete :( sendEvent(SYMBOL_DELL,"1" ,10d); assertEvents(insertListener,SYMBOL_DELL,"1",10d); sendEvent(SYMBOL_DELL,"2", 11d); assertEvents(insertListener,SYMBOL_DELL,"2",11d); On Sat, Sep 26, 2009 at 5:16 PM, Thomas Bernhardt <bernhardttom@...> wrote: > Hi Sandhu > replace > String s1=" create window myWin.win:keepall() as "+bean ; > String s2=" insert into myWin select b from pattern [ every b=" + > bean + " ].std:firstunique(b.symbol) " ; > String s3 =" on " + bean + "(price=0) as b delete from myWin as w > where b.symbol=w.symbol "; > with: > String s1=" create window myWin.std:firstunique(symbol) as "+bean ; > String s2=" insert into myWin select b from " + bean ; > String s3 =" on " + bean + "(price=0) as b delete from myWin as w > where b.symbol=w.symbol "; > -Tom > ________________________________ > From: sandhu <sandhuqed@...> > To: user@... > Sent: Saturday, September 26, 2009 6:44:15 AM > Subject: Re: [esper-user] on-delete problem in a keepall() window .. > > Pls find attached a test case of what I'm doing.. per > com.espertech.esper.regression.view pkg. > > The last test after on-delete removal still fails. > > Thanks, > > > > On Fri, Sep 25, 2009 at 5:57 PM, Thomas Bernhardt > <bernhardttom@...> wrote: >> The std:firstunique handles delete, do you want to put a small test case >> together to a named window based on first unique and on-delete. >> Best regards, >> Tom >> ________________________________ >> From: sandhu <sandhuqed@...> >> To: user@... >> Sent: Friday, September 25, 2009 7:03:32 AM >> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >> >> Tom, >> Have tried also std:firstunique(symbol) .. which should be exactly my >> usecase.. but again the subsequent same symbol events are ignored even >> if on-delete removed the old event. :( >> Thanks for help. >> >> On Fri, Sep 25, 2009 at 3:53 PM, Thomas Bernhardt >> <bernhardttom@...> wrote: >>> why not simply use the std:unique data window? i.e. create window >>> MyWin.std:unique(id) as ... >>> -Tom >>> ________________________________ >>> From: sandhu <sandhuqed@...> >>> To: user@... >>> Sent: Friday, September 25, 2009 5:36:38 AM >>> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >>> >>> Problem: To insert event into myWin.win:keepall() only if previous >>> event with same symbol is deleted or does not exist. >>> >>> Tried the foll : >>> >>> 1. on-delete removes the event correctly, "select * from myWin" no >>> longer shows the event . >>> >>> 2. Insert works correctly ( if no symbol check) ..but results in >>> duplicates : "insert into myWin symbol,price from pattern[ ... ] " >>> >>> 3. Insert fails if we check (not in / not exists ) for symbol that was >>> deleted in step 1 : >>> "insert into myWin symbol,price from pattern[ ... ] as ss where >>> ss.symbol not in (select symbol from myWin) " >>> >>> Thanks for any help, >>> >>> >>> On Thu, Sep 24, 2009 at 4:29 PM, Thomas Bernhardt >>> <bernhardttom@...> wrote: >>>> not sure what you are doing wrong, you can send a simple test to >>>> reproduce >>>> and we will look into >>>> -Tom >>>> ________________________________ >>>> From: sandhu <sandhuqed@...> >>>> To: user@... >>>> Sent: Thursday, September 24, 2009 2:39:24 AM >>>> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >>>> >>>> Yes, the 'someEvent' is always sent .. >>>> Rgds, >>>> >>>> On Tue, Sep 22, 2009 at 6:57 AM, Thomas Bernhardt >>>> <bernhardttom@...> wrote: >>>>> Hi >>>>> did your application send the "someEvent" to trigger deletion? >>>>> -Tom >>>>> ________________________________ >>>>> From: sandhu <sandhuqed@...> >>>>> To: user@... >>>>> Sent: Friday, September 18, 2009 2:58:56 PM >>>>> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >>>>> >>>>> Am still missing something obvious :( >>>>> >>>>> After executing an on-delete on a keepall() window ( myWin).. >>>>> "on someEvent delete from myWin where id=1" >>>>> >>>>> BUT the event ( supposedly deleted ) is still found by - >>>>> "select * from myWin where id=1" >>>>> >>>>> this should work right ? >>>>> >>>>> >>>>> >>>>> >>>>> On Sun, Jul 19, 2009 at 2:35 AM, Thomas Bernhardt >>>>> <bernhardttom@...> wrote: >>>>>> well the delete would post an rstream, does your statement "select >>>>>> rstream" >>>>>> or "select irstream"? >>>>>> BR >>>>>> Tom >>>>>> ________________________________ >>>>>> From: sandhu <sandhuqed@...> >>>>>> To: user@... >>>>>> Sent: Thursday, July 16, 2009 4:13:31 PM >>>>>> Subject: [esper-user] on-delete problem in a keepall() window .. >>>>>> >>>>>> Could any one point out where is the mistake in the foll .. its >>>>>> driving me crazy! >>>>>> >>>>>> 1.create window Signals.win:keepall() >>>>>> 2. create window Trades .. >>>>>> >>>>>> 3. insert into Signals select.. >>>>>> 4. insert into Trades select .. >>>>>> >>>>>> 5. on Trades delete from Signals where .. // this >>>>>> statement correctly outputs the deleted Signals. >>>>>> 6. select .. from Ticks inner join Signals on .... // this >>>>>> still shows ALL the Signals ever created.- no effect of delete. >>>>>> >>>>>> Is the inner join creating a problem? >>>>>> Any other way to check content of the keepall() window thru a >>>>>> statement. >>>>>> Tks , >>>>>> >>>>>> --------------------------------------------------------------------- >>>>>> To unsubscribe from this list, please visit: >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe from this list, please visit: >>>>> >>>>> http://xircles.codehaus.org/manage_email >>>>> >>>>> >>>>> >>>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe from this list, please visit: >>>> >>>> http://xircles.codehaus.org/manage_email >>>> >>>> >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe from this list, please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >>> >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> >> > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: on-delete problem in a keepall() window ..Tom,
It appears to be not ignored because on the next event ( the deleter event ) the deleteListener records 2 events deleted from window instead of expected 1. sendEvent(SYMBOL_DELL,"1" ,10d); assertEvents(insertListener,SYMBOL_DELL,"1",10d); sendEvent(SYMBOL_DELL,"2", 11d); assertEvents(insertListener,SYMBOL_DELL,"2",11d); sendEvent(SYMBOL_DELL,"4",0d); assertEvents(deleteListener,SYMBOL_DELL,"1",10d); // FAILS junit.framework.AssertionFailedError: expected:<1> but was:<2> Is it possible for you to see how get this test case to pass. Thanks, On 9/28/09, Thomas Bernhardt <bernhardttom@...> wrote: > The insertListener is listening to the insert-into statement I presume? > It will therefore receive all events attempted to be inserted (insert > stream) including those ignored by the named window data window. > > You could iterate the named window statement (s1) to find current events in > the named window, or create a statement that consumes from the named window, > i.e. "select * from MyWin". > > Best regards, > Tom > > > ________________________________ > From: sandhu <sandhuqed@...> > To: user@... > Sent: Saturday, September 26, 2009 8:12:37 AM > Subject: Re: [esper-user] on-delete problem in a keepall() window .. > > Doing that seems to ignore the firstunique() altogether - > String s1=" create window myWin.std:firstunique(symbol) as "+bean ; > String s2=" insert into myWin select * from " + bean ; > String s3 =" on " + bean + "(price=0) as b delete from myWin as w > where b.symbol=w.symbol "; > > The foll both passed without any on-delete :( > > sendEvent(SYMBOL_DELL,"1" ,10d); > assertEvents(insertListener,SYMBOL_DELL,"1",10d); > > sendEvent(SYMBOL_DELL,"2", 11d); > assertEvents(insertListener,SYMBOL_DELL,"2",11d); > > > > On Sat, Sep 26, 2009 at 5:16 PM, Thomas Bernhardt > <bernhardttom@...> wrote: >> Hi Sandhu >> replace >> String s1=" create window myWin.win:keepall() as "+bean ; >> String s2=" insert into myWin select b from pattern [ every b=" >> + >> bean + " ].std:firstunique(b.symbol) " ; >> String s3 =" on " + bean + "(price=0) as b delete from myWin as w >> where b.symbol=w.symbol "; >> with: >> String s1=" create window myWin.std:firstunique(symbol) as "+bean >> ; >> String s2=" insert into myWin select b from " + bean ; >> String s3 =" on " + bean + "(price=0) as b delete from myWin as w >> where b.symbol=w.symbol "; >> -Tom >> ________________________________ >> From: sandhu <sandhuqed@...> >> To: user@... >> Sent: Saturday, September 26, 2009 6:44:15 AM >> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >> >> Pls find attached a test case of what I'm doing.. per >> com.espertech.esper.regression.view pkg. >> >> The last test after on-delete removal still fails. >> >> Thanks, >> >> >> >> On Fri, Sep 25, 2009 at 5:57 PM, Thomas Bernhardt >> <bernhardttom@...> wrote: >>> The std:firstunique handles delete, do you want to put a small test case >>> together to a named window based on first unique and on-delete. >>> Best regards, >>> Tom >>> ________________________________ >>> From: sandhu <sandhuqed@...> >>> To: user@... >>> Sent: Friday, September 25, 2009 7:03:32 AM >>> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >>> >>> Tom, >>> Have tried also std:firstunique(symbol) .. which should be exactly my >>> usecase.. but again the subsequent same symbol events are ignored even >>> if on-delete removed the old event. :( >>> Thanks for help. >>> >>> On Fri, Sep 25, 2009 at 3:53 PM, Thomas Bernhardt >>> <bernhardttom@...> wrote: >>>> why not simply use the std:unique data window? i.e. create window >>>> MyWin.std:unique(id) as ... >>>> -Tom >>>> ________________________________ >>>> From: sandhu <sandhuqed@...> >>>> To: user@... >>>> Sent: Friday, September 25, 2009 5:36:38 AM >>>> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >>>> >>>> Problem: To insert event into myWin.win:keepall() only if previous >>>> event with same symbol is deleted or does not exist. >>>> >>>> Tried the foll : >>>> >>>> 1. on-delete removes the event correctly, "select * from myWin" no >>>> longer shows the event . >>>> >>>> 2. Insert works correctly ( if no symbol check) ..but results in >>>> duplicates : "insert into myWin symbol,price from pattern[ ... ] " >>>> >>>> 3. Insert fails if we check (not in / not exists ) for symbol that was >>>> deleted in step 1 : >>>> "insert into myWin symbol,price from pattern[ ... ] as ss where >>>> ss.symbol not in (select symbol from myWin) " >>>> >>>> Thanks for any help, >>>> >>>> >>>> On Thu, Sep 24, 2009 at 4:29 PM, Thomas Bernhardt >>>> <bernhardttom@...> wrote: >>>>> not sure what you are doing wrong, you can send a simple test to >>>>> reproduce >>>>> and we will look into >>>>> -Tom >>>>> ________________________________ >>>>> From: sandhu <sandhuqed@...> >>>>> To: user@... >>>>> Sent: Thursday, September 24, 2009 2:39:24 AM >>>>> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >>>>> >>>>> Yes, the 'someEvent' is always sent .. >>>>> Rgds, >>>>> >>>>> On Tue, Sep 22, 2009 at 6:57 AM, Thomas Bernhardt >>>>> <bernhardttom@...> wrote: >>>>>> Hi >>>>>> did your application send the "someEvent" to trigger deletion? >>>>>> -Tom >>>>>> ________________________________ >>>>>> From: sandhu <sandhuqed@...> >>>>>> To: user@... >>>>>> Sent: Friday, September 18, 2009 2:58:56 PM >>>>>> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >>>>>> >>>>>> Am still missing something obvious :( >>>>>> >>>>>> After executing an on-delete on a keepall() window ( myWin).. >>>>>> "on someEvent delete from myWin where id=1" >>>>>> >>>>>> BUT the event ( supposedly deleted ) is still found by - >>>>>> "select * from myWin where id=1" >>>>>> >>>>>> this should work right ? >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> On Sun, Jul 19, 2009 at 2:35 AM, Thomas Bernhardt >>>>>> <bernhardttom@...> wrote: >>>>>>> well the delete would post an rstream, does your statement "select >>>>>>> rstream" >>>>>>> or "select irstream"? >>>>>>> BR >>>>>>> Tom >>>>>>> ________________________________ >>>>>>> From: sandhu <sandhuqed@...> >>>>>>> To: user@... >>>>>>> Sent: Thursday, July 16, 2009 4:13:31 PM >>>>>>> Subject: [esper-user] on-delete problem in a keepall() window .. >>>>>>> >>>>>>> Could any one point out where is the mistake in the foll .. its >>>>>>> driving me crazy! >>>>>>> >>>>>>> 1.create window Signals.win:keepall() >>>>>>> 2. create window Trades .. >>>>>>> >>>>>>> 3. insert into Signals select.. >>>>>>> 4. insert into Trades select .. >>>>>>> >>>>>>> 5. on Trades delete from Signals where .. // this >>>>>>> statement correctly outputs the deleted Signals. >>>>>>> 6. select .. from Ticks inner join Signals on .... // this >>>>>>> still shows ALL the Signals ever created.- no effect of delete. >>>>>>> >>>>>>> Is the inner join creating a problem? >>>>>>> Any other way to check content of the keepall() window thru a >>>>>>> statement. >>>>>>> Tks , >>>>>>> >>>>>>> --------------------------------------------------------------------- >>>>>>> To unsubscribe from this list, please visit: >>>>>>> >>>>>>> http://xircles.codehaus.org/manage_email >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> --------------------------------------------------------------------- >>>>>> To unsubscribe from this list, please visit: >>>>>> >>>>>> http://xircles.codehaus.org/manage_email >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe from this list, please visit: >>>>> >>>>> http://xircles.codehaus.org/manage_email >>>>> >>>>> >>>>> >>>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe from this list, please visit: >>>> >>>> http://xircles.codehaus.org/manage_email >>>> >>>> >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe from this list, please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >>> >>> >>> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: on-delete problem in a keepall() window ..Hi Sandhu, is that with the named window using the "std:firstunique" view or with it using the "win:keepall" view? Can you please provide the latest unit test that you have to make sure we are looking at the same code? Best regards, Tom From: sandhu <sandhuqed@...> To: user@... Sent: Mon, October 5, 2009 3:21:58 AM Subject: Re: [esper-user] on-delete problem in a keepall() window .. Tom, It appears to be not ignored because on the next event ( the deleter event ) the deleteListener records 2 events deleted from window instead of expected 1. sendEvent(SYMBOL_DELL,"1" ,10d); assertEvents(insertListener,SYMBOL_DELL,"1",10d); sendEvent(SYMBOL_DELL,"2", 11d); assertEvents(insertListener,SYMBOL_DELL,"2",11d); sendEvent(SYMBOL_DELL,"4",0d); assertEvents(deleteListener,SYMBOL_DELL,"1",10d); // FAILS junit.framework.AssertionFailedError: expected:<1> but was:<2> Is it possible for you to see how get this test case to pass. Thanks, On 9/28/09, Thomas Bernhardt <bernhardttom@...> wrote: > The insertListener is listening to the insert-into statement I presume? > It will therefore receive all events attempted to be inserted (insert > stream) including those ignored by the named window data window. > > You could iterate the named window statement (s1) to find current events in > the named window, or create a statement that consumes from the named window, > i.e. "select * from MyWin". > > Best regards, > Tom > > > ________________________________ > From: sandhu <sandhuqed@...> > To: user@... > Sent: Saturday, September 26, 2009 8:12:37 AM > Subject: Re: [esper-user] on-delete problem in a keepall() window .. > > Doing that seems to ignore the firstunique() altogether - > String s1=" create window myWin.std:firstunique(symbol) as "+bean ; > String s2=" insert into myWin select * from " + bean ; > String s3 =" on " + bean + "(price=0) as b delete from myWin as w > where b.symbol=w.symbol "; > > The foll both passed without any on-delete :( > > sendEvent(SYMBOL_DELL,"1" ,10d); > assertEvents(insertListener,SYMBOL_DELL,"1",10d); > > sendEvent(SYMBOL_DELL,"2", 11d); > assertEvents(insertListener,SYMBOL_DELL,"2",11d); > > > > On Sat, Sep 26, 2009 at 5:16 PM, Thomas Bernhardt > <bernhardttom@...> wrote: >> Hi Sandhu >> replace >> String s1=" create window myWin.win:keepall() as "+bean ; >> String s2=" insert into myWin select b from pattern [ every b=" >> + >> bean + " ].std:firstunique(b.symbol) " ; >> String s3 =" on " + bean + "(price=0) as b delete from myWin as w >> where b.symbol=w.symbol "; >> with: >> String s1=" create window myWin.std:firstunique(symbol) as "+bean >> ; >> String s2=" insert into myWin select b from " + bean ; >> String s3 =" on " + bean + "(price=0) as b delete from myWin as w >> where b.symbol=w.symbol "; >> -Tom >> ________________________________ >> From: sandhu <sandhuqed@...> >> To: user@... >> Sent: Saturday, September 26, 2009 6:44:15 AM >> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >> >> Pls find attached a test case of what I'm doing.. per >> com.espertech.esper.regression.view pkg. >> >> The last test after on-delete removal still fails. >> >> Thanks, >> >> >> >> On Fri, Sep 25, 2009 at 5:57 PM, Thomas Bernhardt >> <bernhardttom@...> wrote: >>> The std:firstunique handles delete, do you want to put a small test case >>> together to a named window based on first unique and on-delete. >>> Best regards, >>> Tom >>> ________________________________ >>> From: sandhu <sandhuqed@...> >>> To: user@... >>> Sent: Friday, September 25, 2009 7:03:32 AM >>> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >>> >>> Tom, >>> Have tried also std:firstunique(symbol) .. which should be exactly my >>> usecase.. but again the subsequent same symbol events are ignored even >>> if on-delete removed the old event. :( >>> Thanks for help. >>> >>> On Fri, Sep 25, 2009 at 3:53 PM, Thomas Bernhardt >>> <bernhardttom@...> wrote: >>>> why not simply use the std:unique data window? i.e. create window >>>> MyWin.std:unique(id) as ... >>>> -Tom >>>> ________________________________ >>>> From: sandhu <sandhuqed@...> >>>> To: user@... >>>> Sent: Friday, September 25, 2009 5:36:38 AM >>>> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >>>> >>>> Problem: To insert event into myWin.win:keepall() only if previous >>>> event with same symbol is deleted or does not exist. >>>> >>>> Tried the foll : >>>> >>>> 1. on-delete removes the event correctly, "select * from myWin" no >>>> longer shows the event . >>>> >>>> 2. Insert works correctly ( if no symbol check) ..but results in >>>> duplicates : "insert into myWin symbol,price from pattern[ ... ] " >>>> >>>> 3. Insert fails if we check (not in / not exists ) for symbol that was >>>> deleted in step 1 : >>>> "insert into myWin symbol,price from pattern[ ... ] as ss where >>>> ss.symbol not in (select symbol from myWin) " >>>> >>>> Thanks for any help, >>>> >>>> >>>> On Thu, Sep 24, 2009 at 4:29 PM, Thomas Bernhardt >>>> <bernhardttom@...> wrote: >>>>> not sure what you are doing wrong, you can send a simple test to >>>>> reproduce >>>>> and we will look into >>>>> -Tom >>>>> ________________________________ >>>>> From: sandhu <sandhuqed@...> >>>>> To: user@... >>>>> Sent: Thursday, September 24, 2009 2:39:24 AM >>>>> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >>>>> >>>>> Yes, the 'someEvent' is always sent .. >>>>> Rgds, >>>>> >>>>> On Tue, Sep 22, 2009 at 6:57 AM, Thomas Bernhardt >>>>> <bernhardttom@...> wrote: >>>>>> Hi >>>>>> did your application send the "someEvent" to trigger deletion? >>>>>> -Tom >>>>>> ________________________________ >>>>>> From: sandhu <sandhuqed@...> >>>>>> To: user@... >>>>>> Sent: Friday, September 18, 2009 2:58:56 PM >>>>>> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >>>>>> >>>>>> Am still missing something obvious :( >>>>>> >>>>>> After executing an on-delete on a keepall() window ( myWin).. >>>>>> "on someEvent delete from myWin where id=1" >>>>>> >>>>>> BUT the event ( supposedly deleted ) is still found by - >>>>>> "select * from myWin where id=1" >>>>>> >>>>>> this should work right ? >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> On Sun, Jul 19, 2009 at 2:35 AM, Thomas Bernhardt >>>>>> <bernhardttom@...> wrote: >>>>>>> well the delete would post an rstream, does your statement "select >>>>>>> rstream" >>>>>>> or "select irstream"? >>>>>>> BR >>>>>>> Tom >>>>>>> ________________________________ >>>>>>> From: sandhu <sandhuqed@...> >>>>>>> To: user@... >>>>>>> Sent: Thursday, July 16, 2009 4:13:31 PM >>>>>>> Subject: [esper-user] on-delete problem in a keepall() window .. >>>>>>> >>>>>>> Could any one point out where is the mistake in the foll .. its >>>>>>> driving me crazy! >>>>>>> >>>>>>> 1.create window Signals.win:keepall() >>>>>>> 2. create window Trades .. >>>>>>> >>>>>>> 3. insert into Signals select.. >>>>>>> 4. insert into Trades select .. >>>>>>> >>>>>>> 5. on Trades delete from Signals where .. // this >>>>>>> statement correctly outputs the deleted Signals. >>>>>>> 6. select .. from Ticks inner join Signals on .... // this >>>>>>> still shows ALL the Signals ever created.- no effect of delete. >>>>>>> >>>>>>> Is the inner join creating a problem? >>>>>>> Any other way to check content of the keepall() window thru a >>>>>>> statement. >>>>>>> Tks , >>>>>>> >>>>>>> --------------------------------------------------------------------- >>>>>>> To unsubscribe from this list, please visit: >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> --------------------------------------------------------------------- >>>>>> To unsubscribe from this list, please visit: >>>>>> >>>>>> http://xircles.codehaus.org/manage_email >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe from this list, please visit: >>>>> >>>>> http://xircles.codehaus.org/manage_email >>>>> >>>>> >>>>> >>>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe from this list, please visit: >>>> >>>> http://xircles.codehaus.org/manage_email >>>> >>>> >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe from this list, please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >>> >>> >>> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: on-delete problem in a keepall() window ..It was with std:firstunique , pls find attached test again.
Am also unable to get keepall() pass .. (the commented out statements in testcase) Greatly appreciate the help , Thanks, On 10/6/09, Thomas Bernhardt <bernhardttom@...> wrote: > Hi Sandhu, > > is that with the named window using the "std:firstunique" view or with it > using the "win:keepall" view? > Can you please provide the latest unit test that you have to make sure we > are looking at the same code? > > Best regards, > Tom > > > ________________________________ > From: sandhu <sandhuqed@...> > To: user@... > Sent: Mon, October 5, 2009 3:21:58 AM > Subject: Re: [esper-user] on-delete problem in a keepall() window .. > > Tom, > It appears to be not ignored because on the next event ( the deleter > event ) the deleteListener records 2 events deleted from window > instead of expected 1. > > sendEvent(SYMBOL_DELL,"1" ,10d); > assertEvents(insertListener,SYMBOL_DELL,"1",10d); > > sendEvent(SYMBOL_DELL,"2", 11d); > assertEvents(insertListener,SYMBOL_DELL,"2",11d); > > sendEvent(SYMBOL_DELL,"4",0d); > assertEvents(deleteListener,SYMBOL_DELL,"1",10d); // FAILS > > junit.framework.AssertionFailedError: expected:<1> but was:<2> > > Is it possible for you to see how get this test case to pass. > > Thanks, > > On 9/28/09, Thomas Bernhardt <bernhardttom@...> wrote: >> The insertListener is listening to the insert-into statement I presume? >> It will therefore receive all events attempted to be inserted (insert >> stream) including those ignored by the named window data window. >> >> You could iterate the named window statement (s1) to find current events >> in >> the named window, or create a statement that consumes from the named >> window, >> i.e. "select * from MyWin". >> >> Best regards, >> Tom >> >> >> ________________________________ >> From: sandhu <sandhuqed@...> >> To: user@... >> Sent: Saturday, September 26, 2009 8:12:37 AM >> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >> >> Doing that seems to ignore the firstunique() altogether - >> String s1=" create window myWin.std:firstunique(symbol) as "+bean ; >> String s2=" insert into myWin select * from " + bean ; >> String s3 =" on " + bean + "(price=0) as b delete from myWin as w >> where b.symbol=w.symbol "; >> >> The foll both passed without any on-delete :( >> >> sendEvent(SYMBOL_DELL,"1" ,10d); >> assertEvents(insertListener,SYMBOL_DELL,"1",10d); >> >> sendEvent(SYMBOL_DELL,"2", 11d); >> assertEvents(insertListener,SYMBOL_DELL,"2",11d); >> >> >> >> On Sat, Sep 26, 2009 at 5:16 PM, Thomas Bernhardt >> <bernhardttom@...> wrote: >>> Hi Sandhu >>> replace >>> String s1=" create window myWin.win:keepall() as "+bean ; >>> String s2=" insert into myWin select b from pattern [ every b=" >>> + >>> bean + " ].std:firstunique(b.symbol) " ; >>> String s3 =" on " + bean + "(price=0) as b delete from myWin as w >>> where b.symbol=w.symbol "; >>> with: >>> String s1=" create window myWin.std:firstunique(symbol) as "+bean >>> ; >>> String s2=" insert into myWin select b from " + bean ; >>> String s3 =" on " + bean + "(price=0) as b delete from myWin as w >>> where b.symbol=w.symbol "; >>> -Tom >>> ________________________________ >>> From: sandhu <sandhuqed@...> >>> To: user@... >>> Sent: Saturday, September 26, 2009 6:44:15 AM >>> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >>> >>> Pls find attached a test case of what I'm doing.. per >>> com.espertech.esper.regression.view pkg. >>> >>> The last test after on-delete removal still fails. >>> >>> Thanks, >>> >>> >>> >>> On Fri, Sep 25, 2009 at 5:57 PM, Thomas Bernhardt >>> <bernhardttom@...> wrote: >>>> The std:firstunique handles delete, do you want to put a small test case >>>> together to a named window based on first unique and on-delete. >>>> Best regards, >>>> Tom >>>> ________________________________ >>>> From: sandhu <sandhuqed@...> >>>> To: user@... >>>> Sent: Friday, September 25, 2009 7:03:32 AM >>>> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >>>> >>>> Tom, >>>> Have tried also std:firstunique(symbol) .. which should be exactly my >>>> usecase.. but again the subsequent same symbol events are ignored even >>>> if on-delete removed the old event. :( >>>> Thanks for help. >>>> >>>> On Fri, Sep 25, 2009 at 3:53 PM, Thomas Bernhardt >>>> <bernhardttom@...> wrote: >>>>> why not simply use the std:unique data window? i.e. create window >>>>> MyWin.std:unique(id) as ... >>>>> -Tom >>>>> ________________________________ >>>>> From: sandhu <sandhuqed@...> >>>>> To: user@... >>>>> Sent: Friday, September 25, 2009 5:36:38 AM >>>>> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >>>>> >>>>> Problem: To insert event into myWin.win:keepall() only if previous >>>>> event with same symbol is deleted or does not exist. >>>>> >>>>> Tried the foll : >>>>> >>>>> 1. on-delete removes the event correctly, "select * from myWin" no >>>>> longer shows the event . >>>>> >>>>> 2. Insert works correctly ( if no symbol check) ..but results in >>>>> duplicates : "insert into myWin symbol,price from pattern[ ... ] " >>>>> >>>>> 3. Insert fails if we check (not in / not exists ) for symbol that was >>>>> deleted in step 1 : >>>>> "insert into myWin symbol,price from pattern[ ... ] as ss where >>>>> ss.symbol not in (select symbol from myWin) " >>>>> >>>>> Thanks for any help, >>>>> >>>>> >>>>> On Thu, Sep 24, 2009 at 4:29 PM, Thomas Bernhardt >>>>> <bernhardttom@...> wrote: >>>>>> not sure what you are doing wrong, you can send a simple test to >>>>>> reproduce >>>>>> and we will look into >>>>>> -Tom >>>>>> ________________________________ >>>>>> From: sandhu <sandhuqed@...> >>>>>> To: user@... >>>>>> Sent: Thursday, September 24, 2009 2:39:24 AM >>>>>> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >>>>>> >>>>>> Yes, the 'someEvent' is always sent .. >>>>>> Rgds, >>>>>> >>>>>> On Tue, Sep 22, 2009 at 6:57 AM, Thomas Bernhardt >>>>>> <bernhardttom@...> wrote: >>>>>>> Hi >>>>>>> did your application send the "someEvent" to trigger deletion? >>>>>>> -Tom >>>>>>> ________________________________ >>>>>>> From: sandhu <sandhuqed@...> >>>>>>> To: user@... >>>>>>> Sent: Friday, September 18, 2009 2:58:56 PM >>>>>>> Subject: Re: [esper-user] on-delete problem in a keepall() window .. >>>>>>> >>>>>>> Am still missing something obvious :( >>>>>>> >>>>>>> After executing an on-delete on a keepall() window ( myWin).. >>>>>>> "on someEvent delete from myWin where id=1" >>>>>>> >>>>>>> BUT the event ( supposedly deleted ) is still found by - >>>>>>> "select * from myWin where id=1" >>>>>>> >>>>>>> this should work right ? >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Sun, Jul 19, 2009 at 2:35 AM, Thomas Bernhardt >>>>>>> <bernhardttom@...> wrote: >>>>>>>> well the delete would post an rstream, does your statement "select >>>>>>>> rstream" >>>>>>>> or "select irstream"? >>>>>>>> BR >>>>>>>> Tom >>>>>>>> ________________________________ >>>>>>>> From: sandhu <sandhuqed@...> >>>>>>>> To: user@... >>>>>>>> Sent: Thursday, July 16, 2009 4:13:31 PM >>>>>>>> Subject: [esper-user] on-delete problem in a keepall() window .. >>>>>>>> >>>>>>>> Could any one point out where is the mistake in the foll .. its >>>>>>>> driving me crazy! >>>>>>>> >>>>>>>> 1.create window Signals.win:keepall() >>>>>>>> 2. create window Trades .. >>>>>>>> >>>>>>>> 3. insert into Signals select.. >>>>>>>> 4. insert into Trades select .. >>>>>>>> >>>>>>>> 5. on Trades delete from Signals where .. // this >>>>>>>> statement correctly outputs the deleted Signals. >>>>>>>> 6. select .. from Ticks inner join Signals on .... // this >>>>>>>> still shows ALL the Signals ever created.- no effect of delete. >>>>>>>> >>>>>>>> Is the inner join creating a problem? >>>>>>>> Any other way to check content of the keepall() window thru a >>>>>>>> statement. >>>>>>>> Tks , >>>>>>>> >>>>>>>> --------------------------------------------------------------------- >>>>>>>> To unsubscribe from this list, please visit: >>>>>>>> >>>>>>>> http://xircles.codehaus.org/manage_email >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> --------------------------------------------------------------------- >>>>>>> To unsubscribe from this list, please visit: >>>>>>> >>>>>>> http://xircles.codehaus.org/manage_email >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> --------------------------------------------------------------------- >>>>>> To unsubscribe from this list, please visit: >>>>>> >>>>>> http://xircles.codehaus.org/manage_email >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe from this list, please visit: >>>>> >>>>> http://xircles.codehaus.org/manage_email >>>>> >>>>> >>>>> >>>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe from this list, please visit: >>>> >>>> http://xircles.codehaus.org/manage_email >>>> >>>> >>>> >>>> >>> --------------------------------------------------------------------- >>> To unsubscribe from this list, please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > [TestFirstUniqueWithOnDelete.java] package com.espertech.esper.regression.view; import junit.framework.TestCase; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.espertech.esper.client.EPServiceProvider; import com.espertech.esper.client.EPServiceProviderManager; import com.espertech.esper.client.EPStatement; import com.espertech.esper.client.EventBean; import com.espertech.esper.support.bean.SupportMarketDataBean; import com.espertech.esper.support.client.SupportConfigFactory; import com.espertech.esper.support.util.SupportUpdateListener; public class TestFirstUniqueWithOnDelete extends TestCase { private static String SYMBOL_DELL = "DELL"; private static String SYMBOL_IBM = "IBM"; private EPServiceProvider epService; private SupportUpdateListener insertListener; private SupportUpdateListener deleteListener; private EPStatement insertInto; private EPStatement deleteFrom; public void setUp() { insertListener = new SupportUpdateListener(); deleteListener = new SupportUpdateListener(); epService = EPServiceProviderManager.getDefaultProvider(SupportConfigFactory.getConfiguration()); epService.initialize(); } public void testSumOneView() { String bean =SupportMarketDataBean.class.getName(); // String s1=" create window myWin.win:keepall() as "+bean ; // String s2=" insert into myWin select b from pattern [ every b=" + bean + " ].std:firstunique(b.symbol) " ; // String s3 =" on " + bean + "(price=0) as b delete from myWin as w where b.symbol=w.symbol "; String s1=" create window myWin.std:firstunique(symbol) as "+bean ; String s2=" insert into myWin select * from " + bean ; String s3 =" on " + bean + "(price=0) as b delete from myWin as w where b.symbol=w.symbol "; epService.getEPAdministrator().createEPL(s1); insertInto = epService.getEPAdministrator().createEPL(s2); insertInto.addListener(insertListener); deleteFrom = epService.getEPAdministrator().createEPL(s3); deleteFrom.addListener(deleteListener); runAssertion(); } private void runAssertion() { // Insert one DELL event sendEvent(SYMBOL_DELL,"1" ,10d); assertEvents(insertListener,SYMBOL_DELL,"1",10d); // second DELL event Ignored sendEvent(SYMBOL_DELL,"2", 11d); // assertEvents(insertListener,SYMBOL_DELL,"2",11d); // assertFalse(insertListener.isInvoked()); // Insert one IBM event sendEvent(SYMBOL_IBM,"3", 20d); assertEvents(insertListener,SYMBOL_IBM,"3",20d); // This Dell Event Ignored AND also deletes old (and only) DELL in myWin sendEvent(SYMBOL_DELL,"4",0d); assertEvents(deleteListener,SYMBOL_DELL,"1",10d); // Ignore second IBM event sendEvent(SYMBOL_IBM,"5", 21d); assertFalse(insertListener.isInvoked()); //Now this *should* insert new DELL event into myWin but FAILS. sendEvent(SYMBOL_DELL,"6", 12d); assertTrue("Did not Insert !!",insertListener.isInvoked()); assertEvents(insertListener,SYMBOL_DELL,"6",12d); } private void assertEvents(SupportUpdateListener listener,String symbol,String id,Double price) { EventBean[] newData =listener.getLastNewData(); if(newData==null) fail("No new Event Received"); assertEquals(1, newData.length); SupportMarketDataBean bean =(SupportMarketDataBean) newData[0].getUnderlying() ; assertEquals(symbol, bean.getSymbol()); assertEquals("id wrong", id, bean.getId()); listener.reset(); assertFalse(listener.isInvoked()); } private void sendEvent(String symbol,String id, double price) { SupportMarketDataBean bean = new SupportMarketDataBean(symbol,id,price); epService.getEPRuntime().sendEvent(bean); } private static final Log log = LogFactory.getLog(TestFirstUniqueWithOnDelete.class); } --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| < Prev | 1 - 2 | Next > |
| Free embeddable forum powered by Nabble | Forum Help |