final RelDataTypeFactory typeFactory = new FieldTypeFactory();
final RelDataType inputType = typeFactory.createStructType( new RelDataTypeFactory.FieldInfoBuilder() );
final RexBuilder builder = new RexBuilder( typeFactory );
final RexProgramBuilder programBuilder = new RexProgramBuilder( inputType, builder );
programBuilder.addProject( builder.makeExactLiteral( BigDecimal.ONE ), "x" );
programBuilder.addProject( builder.makeCharLiteral( new NlsString( "foo", null, null ) ), "y" );
final RexProgram program = programBuilder.getProgram();
final ProgramUtil.Analyzed analyze = ProgramUtil.analyze( program );
assertTrue( analyze.hasConstants );
assertFalse( analyze.hasFunctions );
assertNull( analyze.permutation );