Developing Apama Applications > Developing Apama Applications in EPL > Working with Streams and Stream Queries > Troubleshooting and stream query coding guidelines > Be aware that fixed-size windows can overflow
Be aware that fixed-size windows can overflow
Consider the following example:
stream<temperature> batchedTemperatures :=
   from t in all Temperature(sensorId="S001")
   within 60.0 every 60.0 select t;
from t in batchedTemperatures
   retain 5
   select count():c { print c.toString(); }
During execution of the first query, suppose that more than 5 matching events are found within one minute. The query outputs all of the matching events as a single lot. A lot that contains more than 5 items overflows the retain window in the second query. All but the most recent five items are lost. Calculations operate on only the most recent 5 items.
Note that you are unlikely to need the query combination shown in the code example above.
Copyright © 2013-2015 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.