Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

One thing user needs to notice is how to pass in Serde. The type for consumed struct is Consumed<Windowed<K>, V>, because we need to be able to deserialize struct as windowed key and value; The type for materialized, however, was Materialized<K, V, WindowStore<Bytes, byte[]>> because the window store needs to store raw key instead of windowed key. By strict type enforcement, user would be alerted at compile time if they confuse the two.

We Why don't we support windowedTable function without `materialized` or `consumed`., just like table()?

The reason to keep `materialized` is that the window store requires a concrete retention time, window size and number of rolling segments to constructproperly setup. On the application side Stream the stream job could not infer the windowed topic retention or window size, so these are required information from the user. 

...