
Some parts of this message have been removed.
Learn more about Nabble's
security policy.
Tom,
The "is not null" behaved as expected, thanks. Do you have any ideas why the max enumeration method is not returning a value in the second sets of tests?
Thanks
Nathan
From: Thomas Bernhardt [bernhardttom@...]
Sent: Wednesday, May 09, 2012 7:10 PM
To: user@...
Subject: Re: [esper-user] derived event stream question
"null" is a special value, Esper adheres to SQL behavior, see http://esper.codehaus.org/esper-4.6.0/doc/reference/en-US/html_single/index.html#epl-operator-ref-logical-null
I think "is null" or "is not null" may fix it.
Best regards,
Tom
From: "Reese, Nathan" <nreese@...>
To: "user@..." <user@...>
Sent: Monday, May 7, 2012 10:04 AM
Subject: RE: [esper-user] derived event stream question
Tom,
I have attached a unit test demonstrating two unexpected window aggregation behaviors. I am using esper 4.6.0 on JDK 1.6.0_31.
The first unexpected behavior deals with filtering out null window(*) results. Notice how the test testWindowStream receives the expected number of results while the test testWindowStream_withHavingClause does not receive any results.
The second set of tests demonstrates how Enumeration Methods do not seem to function properly when the results of window(*) are placed into a stream with the insert into clause. Notice how the test testMax receives the expected max price but the test testWindowStream_max
receives a null value.
Thanks,
Nathan
From: Thomas Bernhardt [bernhardttom@...]
Sent: Wednesday, May 02, 2012 5:19 PM
To: user@...
Subject: Re: [esper-user] derived event stream question
Do you want to make a small test class that demonstrates when adding "having window(*) != null" the filter you are saying applies to all output even those that have events? What version please?
Data window aggregation do not work like regular aggregations, the class is AggregationAccessImpl
Best regards,
Tom
From: "Reese, Nathan" <nreese@...>
To: "user@..." <user@...>
Sent: Wednesday, May 2, 2012 10:53 AM
Subject: RE: [esper-user] derived event stream question
Tom,
It looks like I can get the window aggregation function to provide the functionality that I am looking for. Below is my insert into clause
insert into GroupedStream select rstream window(*) as collection from BookDesc.win:time_batch(.25 sec) group by BookDesc.author
One problem is that the window aggregation function returns null for groups with no events in the data window. How would I filter these nulls out. I tried adding the clause "having window(*) != null" to the end of the insert into statement but then I never
got any events on the new stream.
Also, what is the underlying window aggregation class?
Thanks,
Nathan
From: Thomas Bernhardt [bernhardttom@...]
Sent: Tuesday, May 01, 2012 4:03 PM
To: user@...
Subject: Re: [esper-user] derived event stream question
I have added an improvement request http://jira.codehaus.org/browse/ESPER-662
The JIRA contains the syntax that should be used, since wildcard is not the right use considering joins and wildcards.
Best regards,
Tom
From: "Reese, Nathan" <nreese@...>
To: "user@..." <user@...>
Sent: Tuesday, May 1, 2012 12:35 PM
Subject: RE: [esper-user] derived event stream question
Tom,
Attached is an example of what I am trying to accomplish in the context of Esper's BookDesc POJO event. I want to create a derived event stream containing collections of BookDesc events grouped by author. The attached junit test and custom aggregation function
fail. Esper is throwing the exception "java.lang.ClassCastException: com.espertech.esper.type.WildcardParameter cannot be cast to java.lang.Comparable".
Does this help clarify the usecase? How would I create a derived event stream containing collections of POJO events?
Thanks,
Nathan
From: Thomas Bernhardt [bernhardttom@...]
Sent: Friday, April 20, 2012 3:56 PM
To: user@...
Subject: Re: [esper-user] derived event stream question
Sounds like the data window aggregation with an enumeration method, or perhaps a custom aggregation function, or perhaps a subquery, depending.
It may be best to provide a simplified example of what arrives and gets output under what conditions.
Best regards
Tom
From: "Reese, Nathan" <nreese@...>
To: "user@..." <user@...>
Sent: Friday, April 20, 2012 5:12 PM
Subject: [esper-user] derived event stream question
I am trying to develop an EPL statement that creates a derived event stream with the "insert into" key word. I would like the derived event stream to contain multiple events grouped
together via a property into a single event. I am having trouble finding the correct EPL construct to perform this task.
I do not think that the "group by" clause will work since aggregate functions are not being used and according to the documentation "You can use group by without aggregate functions, but generally that can produce confusing results"
I do not think that the "for grouped_delivery" will work since the documenation states "The insert into for inserting events into a stream is not affected by the for-clause"
Any ideas or avenues to investigate for the desired functionality?
Thanks,
Nathan
---------------------------------------------------------------------
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