Search in sources :

Example 1 with DebuggableExecutableExpression

use of org.apache.storm.sql.runtime.calcite.DebuggableExecutableExpression in project storm by apache.

the class TridentPlanCreator method createScalarInstance.

public ExecutableExpression createScalarInstance(List<RexNode> nodes, RelDataType inputRowType, String className) throws CompilingClassLoader.CompilerException, ClassNotFoundException, IllegalAccessException, InstantiationException {
    String expr = rexCompiler.compile(nodes, inputRowType, className);
    CompilingClassLoader classLoader = new CompilingClassLoader(getLastClassLoader(), className, expr, null);
    ExecutableExpression instance = (ExecutableExpression) classLoader.loadClass(className).newInstance();
    addClassLoader(classLoader);
    return new DebuggableExecutableExpression(instance, expr);
}
Also used : CompilingClassLoader(org.apache.storm.sql.javac.CompilingClassLoader) DebuggableExecutableExpression(org.apache.storm.sql.runtime.calcite.DebuggableExecutableExpression) DebuggableExecutableExpression(org.apache.storm.sql.runtime.calcite.DebuggableExecutableExpression) ExecutableExpression(org.apache.storm.sql.runtime.calcite.ExecutableExpression)

Example 2 with DebuggableExecutableExpression

use of org.apache.storm.sql.runtime.calcite.DebuggableExecutableExpression in project storm by apache.

the class StreamsPlanCreator method createScalarInstance.

public ExecutableExpression createScalarInstance(List<RexNode> nodes, RelDataType inputRowType, String className) throws CompilingClassLoader.CompilerException, ClassNotFoundException, IllegalAccessException, InstantiationException {
    String expr = rexCompiler.compile(nodes, inputRowType, className);
    CompilingClassLoader classLoader = new CompilingClassLoader(getLastClassLoader(), className, expr, null);
    ExecutableExpression instance = (ExecutableExpression) classLoader.loadClass(className).newInstance();
    addClassLoader(classLoader);
    return new DebuggableExecutableExpression(instance, expr);
}
Also used : CompilingClassLoader(org.apache.storm.sql.javac.CompilingClassLoader) DebuggableExecutableExpression(org.apache.storm.sql.runtime.calcite.DebuggableExecutableExpression) DebuggableExecutableExpression(org.apache.storm.sql.runtime.calcite.DebuggableExecutableExpression) ExecutableExpression(org.apache.storm.sql.runtime.calcite.ExecutableExpression)

Example 3 with DebuggableExecutableExpression

use of org.apache.storm.sql.runtime.calcite.DebuggableExecutableExpression in project storm by apache.

the class TridentPlanCreator method createScalarInstance.

public ExecutableExpression createScalarInstance(RexProgram program, String className) throws CompilingClassLoader.CompilerException, ClassNotFoundException, IllegalAccessException, InstantiationException {
    String expr = rexCompiler.compile(program, className);
    CompilingClassLoader classLoader = new CompilingClassLoader(getLastClassLoader(), className, expr, null);
    ExecutableExpression instance = (ExecutableExpression) classLoader.loadClass(className).newInstance();
    addClassLoader(classLoader);
    return new DebuggableExecutableExpression(instance, expr);
}
Also used : CompilingClassLoader(org.apache.storm.sql.javac.CompilingClassLoader) DebuggableExecutableExpression(org.apache.storm.sql.runtime.calcite.DebuggableExecutableExpression) DebuggableExecutableExpression(org.apache.storm.sql.runtime.calcite.DebuggableExecutableExpression) ExecutableExpression(org.apache.storm.sql.runtime.calcite.ExecutableExpression)

Example 4 with DebuggableExecutableExpression

use of org.apache.storm.sql.runtime.calcite.DebuggableExecutableExpression in project storm by apache.

the class StreamsPlanCreator method createScalarInstance.

public ExecutableExpression createScalarInstance(RexProgram program, String className) throws CompilingClassLoader.CompilerException, ClassNotFoundException, IllegalAccessException, InstantiationException {
    String expr = rexCompiler.compile(program, className);
    CompilingClassLoader classLoader = new CompilingClassLoader(getLastClassLoader(), className, expr, null);
    ExecutableExpression instance = (ExecutableExpression) classLoader.loadClass(className).newInstance();
    addClassLoader(classLoader);
    return new DebuggableExecutableExpression(instance, expr);
}
Also used : CompilingClassLoader(org.apache.storm.sql.javac.CompilingClassLoader) DebuggableExecutableExpression(org.apache.storm.sql.runtime.calcite.DebuggableExecutableExpression) DebuggableExecutableExpression(org.apache.storm.sql.runtime.calcite.DebuggableExecutableExpression) ExecutableExpression(org.apache.storm.sql.runtime.calcite.ExecutableExpression)

Aggregations

CompilingClassLoader (org.apache.storm.sql.javac.CompilingClassLoader)4 DebuggableExecutableExpression (org.apache.storm.sql.runtime.calcite.DebuggableExecutableExpression)4 ExecutableExpression (org.apache.storm.sql.runtime.calcite.ExecutableExpression)4