if( analyze.isFilter() )
{
// Build a program that has a condition (a possibly complex expression)
// but projects all inputs.
final RexProgramBuilder builder = new RexProgramBuilder( previous.getOutputRowType(), rexBuilder );
builder.addIdentity();
builder.addCondition( program.gatherExpr( program.getCondition() ) );
previous = builder.getProgram();
list.add( Pair.of( Op.FILTER, previous ) );
// Remove condition from the remaining program.