outputTypes.add(type);
channel++;
}
PageBuilder pageBuilder = new PageBuilder(outputTypes);
for (List<Expression> row : node.getRows()) {
pageBuilder.declarePosition();
IdentityHashMap<Expression, Type> expressionTypes = getExpressionTypes(
context.getSession(),
metadata,
sqlParser,
ImmutableMap.<Symbol, Type>of(),
ImmutableList.copyOf(row));
for (int i = 0; i < row.size(); i++) {
// evaluate the literal value
Object result = ExpressionInterpreter.expressionInterpreter(row.get(i), metadata, context.getSession(), expressionTypes).evaluate(0);
BlockUtils.appendObject(outputTypes.get(i), pageBuilder.getBlockBuilder(i), result);
}
}
OperatorFactory operatorFactory = new ValuesOperatorFactory(context.getNextOperatorId(), outputTypes, ImmutableList.of(pageBuilder.build()));
return new PhysicalOperation(operatorFactory, outputMappings);
}