Search in sources :

Example 1 with InterpretedProjectionFunction

use of com.facebook.presto.sql.planner.InterpretedProjectionFunction in project presto by prestodb.

the class FunctionAssertions method interpretedFilterProject.

private Operator interpretedFilterProject(Expression filter, Expression projection, Session session) {
    FilterFunction filterFunction = new InterpretedInternalFilterFunction(filter, SYMBOL_TYPES, INPUT_MAPPING, metadata, SQL_PARSER, session);
    ProjectionFunction projectionFunction = new InterpretedProjectionFunction(projection, SYMBOL_TYPES, INPUT_MAPPING, metadata, SQL_PARSER, session);
    OperatorFactory operatorFactory = new FilterAndProjectOperator.FilterAndProjectOperatorFactory(0, new PlanNodeId("test"), () -> new GenericPageProcessor(filterFunction, ImmutableList.of(projectionFunction)), toTypes(ImmutableList.of(projectionFunction)));
    return operatorFactory.createOperator(createDriverContext(session));
}
Also used : PlanNodeId(com.facebook.presto.sql.planner.plan.PlanNodeId) ProjectionFunction(com.facebook.presto.operator.ProjectionFunction) InterpretedProjectionFunction(com.facebook.presto.sql.planner.InterpretedProjectionFunction) FilterFunction(com.facebook.presto.operator.FilterFunction) InterpretedInternalFilterFunction(com.facebook.presto.sql.planner.InterpretedInternalFilterFunction) SourceOperatorFactory(com.facebook.presto.operator.SourceOperatorFactory) OperatorFactory(com.facebook.presto.operator.OperatorFactory) InterpretedInternalFilterFunction(com.facebook.presto.sql.planner.InterpretedInternalFilterFunction) InterpretedProjectionFunction(com.facebook.presto.sql.planner.InterpretedProjectionFunction) GenericPageProcessor(com.facebook.presto.operator.GenericPageProcessor)

Aggregations

FilterFunction (com.facebook.presto.operator.FilterFunction)1 GenericPageProcessor (com.facebook.presto.operator.GenericPageProcessor)1 OperatorFactory (com.facebook.presto.operator.OperatorFactory)1 ProjectionFunction (com.facebook.presto.operator.ProjectionFunction)1 SourceOperatorFactory (com.facebook.presto.operator.SourceOperatorFactory)1 InterpretedInternalFilterFunction (com.facebook.presto.sql.planner.InterpretedInternalFilterFunction)1 InterpretedProjectionFunction (com.facebook.presto.sql.planner.InterpretedProjectionFunction)1 PlanNodeId (com.facebook.presto.sql.planner.plan.PlanNodeId)1