|  | @@ -26,6 +26,7 @@ import org.elasticsearch.xpack.eql.session.Payload.Type;
 | 
	
		
			
				|  |  |  import org.elasticsearch.xpack.eql.util.ReversedIterator;
 | 
	
		
			
				|  |  |  import org.elasticsearch.xpack.ql.util.ActionListeners;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +import java.util.Collections;
 | 
	
		
			
				|  |  |  import java.util.Iterator;
 | 
	
		
			
				|  |  |  import java.util.LinkedHashMap;
 | 
	
		
			
				|  |  |  import java.util.List;
 | 
	
	
		
			
				|  | @@ -548,6 +549,9 @@ public class TumblingWindow implements Executable {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          // get results through search (to keep using PIT)
 | 
	
		
			
				|  |  |          client.fetchHits(hits(completed), ActionListeners.map(listener, listOfHits -> {
 | 
	
		
			
				|  |  | +            if (criteria.get(0).descending()) {
 | 
	
		
			
				|  |  | +                Collections.reverse(completed);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |              SequencePayload payload = new SequencePayload(completed, listOfHits, false, timeTook());
 | 
	
		
			
				|  |  |              close(listener);
 | 
	
		
			
				|  |  |              return payload;
 |