yuxiqian commented on code in PR #4525:
URL: https://github.com/apache/flink-cdc/pull/4525#discussion_r3965405079


##########
flink-cdc-runtime/src/main/java/org/apache/flink/cdc/runtime/operators/transform/TransformExpressionCompiler.java:
##########
@@ -85,10 +70,8 @@ public static ExpressionEvaluator compileExpression(
                             
argumentClasses.add(Class.forName(udfFunction.getClasspath()));
                         }
 
-                        for (String paramName : modelClients.keySet()) {
-                            argumentNames.add(paramName);
-                            argumentClasses.add(AiModelClient.class);
-                        }
+                        
argumentNames.add(JaninoCompiler.DEFAULT_AI_MODEL_CLIENTS);

Review Comment:
   Not relevant to this PR, but the previous argument declaration & binding 
implementation is rather weird:
   
   - Projection column/time parameters are declared and bound in 
`ProjectionColumnProcessor`.
   - Filter column/time parameters are declared and bound in 
`TransformFilterProcessor`.
   - UDF and AI model parameters are declared in `TransformExpressionCompiler`.
   - Their values are bound separately in `ProjectionColumnProcessor` and 
`TransformFilterProcessor`.
   
   The order is consistent, but the logic is scattered. Shall we build the 
complete parameter layout in one shared place and let 
`TransformExpressionCompiler` only consume it? This could be done later in a 
following ticket.



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