Chuckame commented on code in PR #16218:
URL: https://github.com/apache/kafka/pull/16218#discussion_r1821434447


##########
streams/src/main/java/org/apache/kafka/streams/kstream/internals/foreignkeyjoin/ForeignTableJoinProcessorSupplier.java:
##########
@@ -111,34 +110,26 @@ public void process(final Record<KO, Change<VO>> record) {
                 return;
             }
 
-            final Bytes prefixBytes = keySchema.prefixBytes(record.key());
+            final Bytes foreignKeyBytes = keySchema.prefixBytes(record.key());
 
             //Perform the prefixScan and propagate the results
             try (final KeyValueIterator<Bytes, 
ValueAndTimestamp<SubscriptionWrapper<K>>> prefixScanResults =
-                     subscriptionStore.range(prefixBytes, 
Bytes.increment(prefixBytes))) {
+                     subscriptionStore.prefixScan(foreignKeyBytes, new 
BytesSerializer())) {

Review Comment:
   The main issue is that replacing the current default `prefixScan` is 
complicated as we are not talking about `Bytes` but generic types:
   ```java
       default <PS extends Serializer<P>, P> KeyValueIterator<K, V> 
prefixScan(P prefix, PS prefixKeySerializer) {
           throw new UnsupportedOperationException();
       }
   ```
   
   We could still check if the `prefix` is of type `Bytes` and if 
`prefixKeySerializer` is about `BytesSerializer`... I don't have any other 
solution to replace this `UnsupportedOperationException`...



-- 
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]

Reply via email to