|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
[jira] Created: (ESPER-419) Group-by with "output last" output rate limiting and wildcard select outputs last event and not last event per groupGroup-by with "output last" output rate limiting and wildcard select outputs last event and not last event per group
-------------------------------------------------------------------------------------------------------------------- Key: ESPER-419 URL: http://jira.codehaus.org/browse/ESPER-419 Project: Esper Issue Type: Bug Components: Build Affects Versions: 3.2 Reporter: Thomas Bernhardt Priority: Minor Fix For: 4.0 - requires JDK6 The difference in output is between the following two statements: // outputs last event (not per symbol) select * from ABC group by symbol output last every 2 sec // outputs last value per symbol select symbol, price from ABC group by symbol output last every 2 sec Test code: EPServiceProvider engine = EPServiceProviderManager.getDefaultProvider(); Map<String, Object> type = new HashMap<String, Object>(); type.put("symbol", String.class); type.put("price", Integer.class); engine.getEPAdministrator().getConfiguration().addEventType("ABC", type); EPStatement stmt = engine.getEPAdministrator().createEPL("select * from ABC group by symbol output last every 2 sec"); SupportUpdateListener listener = new SupportUpdateListener(); stmt.addListener(listener); Map<String, Object> event = new HashMap<String, Object>(); event.put("symbol", "IBM"); event.put("price", 10); engine.getEPRuntime().sendEvent(event, "ABC"); event = new HashMap<String, Object>(); event.put("symbol", "ATT"); event.put("price", 11); engine.getEPRuntime().sendEvent(event, "ABC"); event = new HashMap<String, Object>(); event.put("symbol", "IBM"); event.put("price", 100); engine.getEPRuntime().sendEvent(event, "ABC"); Thread.sleep(3000); EventBean[] events = listener.getNewDataListFlattened(); for (EventBean out : events) { System.out.println(out.get("symbol") + " " + out.get("price")); } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Commented: (ESPER-419) Group-by with "output last" output rate limiting and wildcard select outputs last event and not last event per group[ http://jira.codehaus.org/browse/ESPER-419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=197473#action_197473 ] Thomas Bernhardt commented on ESPER-419: ---------------------------------------- Workaround is to list individual properties, or to add the group-by property, i.e. select symbol as s, * from ABC group by symbol output last every 2 sec > Group-by with "output last" output rate limiting and wildcard select outputs last event and not last event per group > -------------------------------------------------------------------------------------------------------------------- > > Key: ESPER-419 > URL: http://jira.codehaus.org/browse/ESPER-419 > Project: Esper > Issue Type: Bug > Components: Build > Affects Versions: 3.2 > Reporter: Thomas Bernhardt > Priority: Minor > Fix For: 4.0 - requires JDK6 > > > The difference in output is between the following two statements: > // outputs last event (not per symbol) > select * from ABC group by symbol output last every 2 sec > // outputs last value per symbol > select symbol, price from ABC group by symbol output last every 2 sec > Test code: > EPServiceProvider engine = EPServiceProviderManager.getDefaultProvider(); > Map<String, Object> type = new HashMap<String, Object>(); > type.put("symbol", String.class); > type.put("price", Integer.class); > engine.getEPAdministrator().getConfiguration().addEventType("ABC", type); > EPStatement stmt = engine.getEPAdministrator().createEPL("select * from ABC group by symbol output last every 2 sec"); > SupportUpdateListener listener = new SupportUpdateListener(); > stmt.addListener(listener); > Map<String, Object> event = new HashMap<String, Object>(); > event.put("symbol", "IBM"); > event.put("price", 10); > engine.getEPRuntime().sendEvent(event, "ABC"); > > event = new HashMap<String, Object>(); > event.put("symbol", "ATT"); > event.put("price", 11); > engine.getEPRuntime().sendEvent(event, "ABC"); > event = new HashMap<String, Object>(); > event.put("symbol", "IBM"); > event.put("price", 100); > engine.getEPRuntime().sendEvent(event, "ABC"); > Thread.sleep(3000); > EventBean[] events = listener.getNewDataListFlattened(); > for (EventBean out : events) { > System.out.println(out.get("symbol") + " " + out.get("price")); > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Resolved: (ESPER-419) Group-by with "output last" output rate limiting and wildcard select outputs last event and not last event per group[ http://jira.codehaus.org/browse/ESPER-419?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Bernhardt resolved ESPER-419. ------------------------------------ Resolution: Fixed Fix Version/s: (was: 4.0 - requires JDK6) 3.3 In release 3.3 > Group-by with "output last" output rate limiting and wildcard select outputs last event and not last event per group > -------------------------------------------------------------------------------------------------------------------- > > Key: ESPER-419 > URL: http://jira.codehaus.org/browse/ESPER-419 > Project: Esper > Issue Type: Bug > Components: Build > Affects Versions: 3.2 > Reporter: Thomas Bernhardt > Priority: Minor > Fix For: 3.3 > > > The difference in output is between the following two statements: > // outputs last event (not per symbol) > select * from ABC group by symbol output last every 2 sec > // outputs last value per symbol > select symbol, price from ABC group by symbol output last every 2 sec > Test code: > EPServiceProvider engine = EPServiceProviderManager.getDefaultProvider(); > Map<String, Object> type = new HashMap<String, Object>(); > type.put("symbol", String.class); > type.put("price", Integer.class); > engine.getEPAdministrator().getConfiguration().addEventType("ABC", type); > EPStatement stmt = engine.getEPAdministrator().createEPL("select * from ABC group by symbol output last every 2 sec"); > SupportUpdateListener listener = new SupportUpdateListener(); > stmt.addListener(listener); > Map<String, Object> event = new HashMap<String, Object>(); > event.put("symbol", "IBM"); > event.put("price", 10); > engine.getEPRuntime().sendEvent(event, "ABC"); > > event = new HashMap<String, Object>(); > event.put("symbol", "ATT"); > event.put("price", 11); > engine.getEPRuntime().sendEvent(event, "ABC"); > event = new HashMap<String, Object>(); > event.put("symbol", "IBM"); > event.put("price", 100); > engine.getEPRuntime().sendEvent(event, "ABC"); > Thread.sleep(3000); > EventBean[] events = listener.getNewDataListFlattened(); > for (EventBean out : events) { > System.out.println(out.get("symbol") + " " + out.get("price")); > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free embeddable forum powered by Nabble | Forum Help |