title: What happens if the aggregator of a KGroupedStream returns null?
body: <pre><code>KStream&lt;Integer, Integer&gt; stream;
  KGroupedStream&lt;Integer, Integer&gt; grouped = stream.groupByKey();
  KTable&lt;Integer, Integer&gt; aggregated = grouped.aggregate(
      () -&gt; 0,
      (k, i, agg) -&gt; {
         if (agg == null)
           agg = 0;
         Integer sum = agg + i;
         return sum &gt; 100 ? null : sum;
      });
  </code></pre>
  
  <p>The messages on my stream are:</p>
  
  <ol>
  <li>(1, 50)</li>
  <li>(1, 75)</li>
  <li>(1, 50)</li>
  </ol>
  
  <p>When the second message arrives the Aggregator returns null. Does <code>KTable aggregated</code> receive (1, null) and deletes its state for key=1?</p>
  
  <p>When message#3 arrives is <code>agg</code> null or is the Initializer called again and sets <code>agg</code> to 0?</p>
  
  <p>What if I use reduce instead of aggregate, if the Reducer returns null will the next message go through the Reducer or will it be used 'as is' like it was the first message in the group?</p>
  
  <p>Thanks,
  David</p>