lvyanquan commented on code in PR #3960: URL: https://github.com/apache/flink-cdc/pull/3960#discussion_r2009049446
########## flink-cdc-runtime/src/main/java/org/apache/flink/cdc/runtime/operators/transform/PreTransformOperator.java: ########## @@ -274,6 +275,28 @@ public void close() throws Exception { @Override public void processElement(StreamRecord<Event> element) throws Exception { Event event = element.getValue(); + TableId tableId = null; + Schema schemaBefore = null; + Schema schemaAfter = null; + + if (event instanceof ChangeEvent) { + tableId = ((ChangeEvent) event).tableId(); + PreTransformChangeInfo info = preTransformChangeInfoMap.get(tableId); + if (info != null) { + schemaBefore = info.getSourceSchema(); + schemaAfter = info.getPreTransformedSchema(); + } + } + + try { + processEvent(event); + } catch (Exception e) { Review Comment: Ditto. ########## flink-cdc-runtime/src/main/java/org/apache/flink/cdc/runtime/operators/transform/PostTransformOperator.java: ########## @@ -244,6 +246,29 @@ public void close() throws Exception { @Override public void processElement(StreamRecord<Event> element) throws Exception { Event event = element.getValue(); + TableId tableId = null; + Schema schemaBefore = null; + Schema schemaAfter = null; + + if (event instanceof ChangeEvent) { + tableId = ((ChangeEvent) event).tableId(); + + PostTransformChangeInfo info = postTransformChangeInfoMap.get(tableId); + if (info != null) { + schemaBefore = info.getPreTransformedSchema(); + schemaAfter = info.getPostTransformedSchema(); + } + } + + try { + processEvent(event); + } catch (Exception e) { + throw new TransformException( Review Comment: We can add these variables later after exception happened. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org