Search in sources :

Example 1 with InternalJoinFilterFunction

use of com.facebook.presto.operator.InternalJoinFilterFunction in project presto by prestodb.

the class JoinFilterFunctionCompiler method compileInternalJoinFilterFunction.

private Class<? extends InternalJoinFilterFunction> compileInternalJoinFilterFunction(RowExpression filterExpression, int leftBlocksSize) {
    ClassDefinition classDefinition = new ClassDefinition(a(PUBLIC, FINAL), makeClassName("JoinFilterFunction"), type(Object.class), type(InternalJoinFilterFunction.class));
    CallSiteBinder callSiteBinder = new CallSiteBinder();
    new JoinFilterFunctionCompiler(metadata).generateMethods(classDefinition, callSiteBinder, filterExpression, leftBlocksSize);
    //
    // toString method
    //
    generateToString(classDefinition, callSiteBinder, toStringHelper(classDefinition.getType().getJavaClassName()).add("filter", filterExpression).add("leftBlocksSize", leftBlocksSize).toString());
    return defineClass(classDefinition, InternalJoinFilterFunction.class, callSiteBinder.getBindings(), getClass().getClassLoader());
}
Also used : ClassDefinition(com.facebook.presto.bytecode.ClassDefinition) InternalJoinFilterFunction(com.facebook.presto.operator.InternalJoinFilterFunction)

Aggregations

ClassDefinition (com.facebook.presto.bytecode.ClassDefinition)1 InternalJoinFilterFunction (com.facebook.presto.operator.InternalJoinFilterFunction)1