Beispiel #1
0
  private Operator interpretedFilterProject(
      Expression filter, Expression projection, Session session) {
    FilterFunction filterFunction =
        new InterpretedFilterFunction(
            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 GenericPageProcessor(filterFunction, ImmutableList.of(projectionFunction)),
            toTypes(ImmutableList.of(projectionFunction)));
    return operatorFactory.createOperator(createDriverContext(session));
  }
Beispiel #2
0
 private static boolean executeFilter(OperatorFactory operatorFactory, Session session) {
   return executeFilter(operatorFactory.createOperator(createDriverContext(session)));
 }
Beispiel #3
0
 private Object selectSingleValue(OperatorFactory operatorFactory, Session session) {
   Operator operator = operatorFactory.createOperator(createDriverContext(session));
   return selectSingleValue(operator);
 }