mjsax commented on a change in pull request #10720:
URL: https://github.com/apache/kafka/pull/10720#discussion_r635364736



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/kstream/internals/KTableTransformValues.java
##########
@@ -141,16 +144,32 @@ public void close() {
 
         @Override
         public void init(final ProcessorContext context) {
+            internalProcessorContext = (InternalProcessorContext) context;
             parentGetter.init(context);
             valueTransformer.init(new 
ForwardingDisabledProcessorContext(context));
         }
 
         @Override
         public ValueAndTimestamp<V1> get(final K key) {
             final ValueAndTimestamp<V> valueAndTimestamp = 
parentGetter.get(key);
-            return ValueAndTimestamp.make(
+
+            final ProcessorRecordContext currentContext = 
internalProcessorContext.recordContext();
+
+            internalProcessorContext.setRecordContext(new 
ProcessorRecordContext(

Review comment:
       I don't think so, because when the write the transformer code, they 
won't even know that it might be executed during a lookup. When they write the 
transformer, they would assume they process a regular input record, and thus 
the transformer logic does not know anything about some other record that 
triggers the lookup.
   
   Also, the record that triggers the lookup will be processed by its own 
processor and will have its own context, to access it's topic name.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to