/** * Returns if this query should buffer before emitting the final results. You can use this to wait for the final * results in your Join or Combine stage after a query is {@link #isDone()}. * * @return A boolean that is true if the query results should be buffered in the Join phase. */ public boolean shouldBuffer() { Window window = runningQuery.getQuery().getWindow(); boolean noWindow = window == null; // Only buffer if there is no window (including Raw) or if it's a record based window. return noWindow || !window.isTimeBased(); }