lvyanquan commented on code in PR #4474:
URL: https://github.com/apache/flink-cdc/pull/4474#discussion_r3602147485


##########
flink-cdc-runtime/src/main/java/org/apache/flink/cdc/runtime/parser/JaninoCompiler.java:
##########
@@ -322,6 +334,21 @@ private static Java.Rvalue generateUnaryOperation(
         return new Java.UnaryOperation(Location.NOWHERE, operator, atom);
     }
 
+    private static Java.Rvalue generateFunctionOperation(String functionName, 
Java.Rvalue[] atoms) {
+        return new Java.MethodInvocation(Location.NOWHERE, null, functionName, 
atoms);
+    }
+
+    private static Java.Rvalue generateLazyBinaryFunctionOperation(
+            Context context, SqlBasicCall sqlBasicCall, String functionName, 
Java.Rvalue[] atoms) {
+        if (atoms.length != 2) {
+            throw new ParseException("Unrecognized expression: " + 
sqlBasicCall.toString());
+        }
+        Java.Rvalue rightOperandSupplier =
+                new Java.AmbiguousName(Location.NOWHERE, new String[] {"() -> 
" + atoms[1]});

Review Comment:
     Could we add an end-to-end compilation test to `JaninoCompilerTest`?
   
     The existing tests only verify the generated expression string or invoke
     `LogicalFunctions` directly. They do not compile the generated expression 
with
     Janino, so they cannot detect that Janino 3.1.10 does not support lambda
     expressions.



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