Versions Compared

Key

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

...

/**
* Join records of this {@code KStream} with {@code KTable} using non-windowed left join.
* <p>
* This is a foreign key join, where the joining key is determined by the {@code foreignKeyExtractor}.
*
* @param rightTable the {@code KTable} on the right side of join to be joined with this
* {@code KStream}. Keyed by KO.
* @param foreignKeyExtractor a {@link Function} that extracts the key (KO) from this table's value (V). If the
* result is null, the update is ignored as invalid.
* @param joiner a {@link ValueJoiner} that computes the join result for a pair of matching records
* @param <VR> the value type of the result {@code KTable}
* @param <KO> the key type of the right {@code KTable}
* @param <VO> the value type of the right {@code KTable}
* @return a {@code KStream} that contains the result of joining this stream with {@code rightTable}
*/
<VR, KO, VO> KStream<K, VR> leftJoin(final KTable<KO, VO> rightTable,
final Function<VO, KO> foreignKeyExtractor,
final ValueJoiner<V, VO, VR> joiner);

Proposed Changes

Describe the new thing you want to do in appropriate detail. This may be fairly extensive and have large subsections of its own. Or it may be a few sentences. Use judgement based on the scope of the change.The design for this new public interface is based on old KIP-213 (Table-Table join on foreign key). For stream-table left join on FK the KIP-213 design could be significantly simplified because output stream events are only generated for each input stream events. Please refer to KIP-213 for the design details on most complex part which is materializing the composite key in State Store and scanning for the composite key prefix in State Store in order to match stream events with the table entities based on foreign key. 

Gliffy Diagram
macroIdc6bef4d8-c933-4957-ad49-235b9e7b0122
displayNameWorkflow
nameWorkflow
pagePin3

...