peterxcli commented on code in PR #17756:
URL: https://github.com/apache/kafka/pull/17756#discussion_r1867745064
##########
streams/streams-scala/src/main/scala/org/apache/kafka/streams/scala/kstream/KTable.scala:
##########
@@ -643,6 +644,26 @@ class KTable[K, V](val inner: KTableJ[K, V]) {
): KTable[K, VR] =
new KTable(inner.join(other.inner, keyExtractor.asJavaFunction, joiner,
materialized))
+ /**
+ * Join records of this [[KTable]] with another [[KTable]]'s records using
non-windowed inner join. Records from this
+ * table are joined according to the result of keyExtractor on the other
KTable.
+ *
+ * @param other the other [[KTable]] to be joined with this
[[KTable]], keyed on the value obtained from keyExtractor
+ * @param keyExtractor a function that extracts the foreign key from this
table's key and value
+ * @param joiner a function that computes the join result for a pair
of matching records
+ * @param materialized a `Materialized` that describes how the `StateStore`
for the resulting [[KTable]]
+ * should be materialized.
+ * @return a [[KTable]] that contains join-records for each key and values
computed by the given joiner,
+ * one for each matched record-pair with the same key
+ */
+ def join[VR, KO, VO](
+ other: KTable[KO, VO],
+ keyExtractor: BiFunction[K, V, KO],
Review Comment:
Agree. Thanks!
-
https://github.com/apache/kafka/pull/17756/commits/a40932cf79858c4ec51aa09051dd2132bf75694e
Also the test for this change is added:
https://github.com/apache/kafka/pull/17756/commits/e8429dbf04063abb82b28489739000f458636bd4
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]