yuxiqian commented on code in PR #3758: URL: https://github.com/apache/flink-cdc/pull/3758#discussion_r1872477658
########## flink-cdc-runtime/src/main/java/org/apache/flink/cdc/runtime/operators/transform/TransformFilterProcessor.java: ########## @@ -135,6 +159,19 @@ private Object[] generateParams(BinaryRecordData record, long epochTime, String params.add(opType); continue; } + + boolean foundInMeta = false; + for (SupportedMetadataColumn supportedMetadataColumn : supportedMetadataColumns) { + if (supportedMetadataColumn.getName().equals(columnName)) { + params.add(supportedMetadataColumn.read(meta)); + foundInMeta = true; + break; + } + } + if (foundInMeta) { + continue; + } Review Comment: Is it possible to let `supportedMetadataColumns()` return a `Map<String, SupportedMetadataColumn>`? This code would be executed for each stream data record and this array traversing seems a little inefficient. ########## flink-cdc-runtime/src/main/java/org/apache/flink/cdc/runtime/operators/transform/TransformFilterProcessor.java: ########## @@ -67,15 +73,22 @@ public static TransformFilterProcessor of( TransformFilter transformFilter, String timezone, List<UserDefinedFunctionDescriptor> udfDescriptors, - List<Object> udfFunctionInstances) { + List<Object> udfFunctionInstances, + SupportedMetadataColumn[] supportedMetadataColumns) { return new TransformFilterProcessor( - tableInfo, transformFilter, timezone, udfDescriptors, udfFunctionInstances); + tableInfo, + transformFilter, + timezone, + udfDescriptors, + udfFunctionInstances, + supportedMetadataColumns); Review Comment: Feels like we need something like `TransformContext` to gather all these things together instead of extending arguments lists forever, but it's not a must in this PR. -- 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