ChaomingZhangCN commented on code in PR #3826:
URL: https://github.com/apache/flink-cdc/pull/3826#discussion_r1904868819


##########
flink-cdc-runtime/src/main/java/org/apache/flink/cdc/runtime/operators/transform/PostTransformOperator.java:
##########
@@ -434,23 +436,36 @@ private Optional<DataChangeEvent> 
processDataChangeEvent(DataChangeEvent dataCha
                         && transformProjectionOptional.get().isValid()) {
                     TransformProjection transformProjection = 
transformProjectionOptional.get();
                     if (!transformProjectionProcessorMap.containsKey(
-                                    Tuple2.of(tableId, transformProjection))
-                            || !transformProjectionProcessorMap
-                                    .get(Tuple2.of(tableId, 
transformProjection))
-                                    .hasTableInfo()) {
+                            Tuple2.of(tableId, 
transformProjection.getProjection()))) {
                         transformProjectionProcessorMap.put(
-                                Tuple2.of(tableId, transformProjection),
+                                Tuple2.of(tableId, 
transformProjection.getProjection()),
                                 TransformProjectionProcessor.of(
                                         tableInfo,
                                         transformProjection,
                                         timezone,
                                         udfDescriptors,
                                         getUdfFunctionInstances(),
                                         
transform.getSupportedMetadataColumns()));
+                    } else if (!transformProjectionProcessorMap
+                            .get(Tuple2.of(tableId, 
transformProjection.getProjection()))
+                            .hasTableInfo()) {
+                        TransformProjectionProcessor 
transformProjectionProcessorWithoutTableInfo =
+                                transformProjectionProcessorMap.get(
+                                        Tuple2.of(tableId, 
transformProjection.getProjection()));
+                        transformProjectionProcessorMap.put(
+                                Tuple2.of(tableId, 
transformProjection.getProjection()),
+                                TransformProjectionProcessor.of(

Review Comment:
   +1 Use TransformProjectionProcessor#copy() to create a non-shared object 
seems better.



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