From 7bc8c0dcd1db27465661e135cea8e800c337f19e Mon Sep 17 00:00:00 2001 From: John Roesler Date: Mon, 21 Oct 2019 16:25:41 -0500 Subject: [PATCH] MINOR: don't require key serde in join materialized (#7557) Reviewers: Bill Bejeck , Guozhang Wang , Matthias J. Sax --- .../apache/kafka/streams/kstream/internals/KTableImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/streams/src/main/java/org/apache/kafka/streams/kstream/internals/KTableImpl.java b/streams/src/main/java/org/apache/kafka/streams/kstream/internals/KTableImpl.java index 301710ddb44..f6f2ada6ce5 100644 --- a/streams/src/main/java/org/apache/kafka/streams/kstream/internals/KTableImpl.java +++ b/streams/src/main/java/org/apache/kafka/streams/kstream/internals/KTableImpl.java @@ -712,7 +712,10 @@ public class KTableImpl extends AbstractStream implements KTable< final StoreBuilder> storeBuilder; if (materializedInternal != null) { - keySerde = materializedInternal.keySerde() != null ? materializedInternal.keySerde() : this.keySerde; + if (materializedInternal.keySerde() == null) { + materializedInternal.withKeySerde(this.keySerde); + } + keySerde = materializedInternal.keySerde(); valueSerde = materializedInternal.valueSerde(); queryableStoreName = materializedInternal.storeName(); storeBuilder = new TimestampedKeyValueStoreMaterializer<>(materializedInternal).materialize();