agavra commented on code in PR #18047:
URL: https://github.com/apache/kafka/pull/18047#discussion_r1870567816
##########
streams/src/main/java/org/apache/kafka/streams/kstream/internals/KStreamKTableJoin.java:
##########
@@ -32,18 +36,28 @@ class KStreamKTableJoin<K, V1, V2, VOut> implements
ProcessorSupplier<K, V1, K,
private final boolean leftJoin;
private final Optional<Duration> gracePeriod;
private final Optional<String> storeName;
-
+ private final Optional<StoreBuilder<?>> storeBuilder;
KStreamKTableJoin(final KTableValueGetterSupplier<K, V2>
valueGetterSupplier,
final ValueJoinerWithKey<? super K, ? super V1, ? super
V2, VOut> joiner,
final boolean leftJoin,
final Optional<Duration> gracePeriod,
- final Optional<String> storeName) {
+ final Optional<StoreBuilder<?>> storeBuilder) {
this.valueGetterSupplier = valueGetterSupplier;
this.joiner = joiner;
this.leftJoin = leftJoin;
this.gracePeriod = gracePeriod;
- this.storeName = storeName;
+ this.storeName = storeBuilder.map(StoreBuilder::name);
+ this.storeBuilder = storeBuilder;
+ }
+
+ @Override
+ public Set<StoreBuilder<?>> stores() {
Review Comment:
I think `stores()` is only ever called once, so it's probably fine doing it
here, but just wondering why you chose to do this here instead of in the
constructor given it always returns the same thing?
--
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]