Class JaninoCompiler


  • public class JaninoCompiler
    extends Object
    Use Janino compiler to compiler the statement of flink cdc pipeline transform into the executable code of Janino. For example, compiler 'string1 || string2' into 'concat(string1, string2)'. The core logic is to traverse SqlNode tree and transform to Atom tree. Janino documents: https://www.janino.net/index.html#properties
    • Constructor Detail

      • JaninoCompiler

        public JaninoCompiler()
    • Method Detail

      • loadSystemFunction

        public static String loadSystemFunction​(String expression)
      • compileExpression

        public static org.codehaus.janino.ExpressionEvaluator compileExpression​(String expression,
                                                                                List<String> argumentNames,
                                                                                List<Class<?>> argumentClasses,
                                                                                Class<?> returnClass)
      • translateSqlNodeToJaninoExpression

        public static String translateSqlNodeToJaninoExpression​(JaninoCompiler.Context context,
                                                                org.apache.calcite.sql.SqlNode transform)
      • translateSqlNodeToJaninoRvalue

        public static org.codehaus.janino.Java.Rvalue translateSqlNodeToJaninoRvalue​(JaninoCompiler.Context context,
                                                                                     org.apache.calcite.sql.SqlNode transform)