Frameworks.withPrepare(
new Frameworks.PrepareAction<Void>() {
public Void apply(RelOptCluster cluster, RelOptSchema relOptSchema,
SchemaPlus rootSchema, OptiqServerStatement statement) {
final RexBuilder rexBuilder = cluster.getRexBuilder();
DataContext dataContext =
Schemas.createDataContext(statement.getConnection());
final RexExecutorImpl executor = new RexExecutorImpl(dataContext);
action.check(rexBuilder, executor);
return null;
}