types.add(builder.build());
builder.clear().setKind(OrcProto.Type.Kind.INT);
types.add(builder.build());
types.add(builder.build());
types.add(builder.build());
SearchArgument isNull = SearchArgument.FACTORY.newBuilder()
.startAnd().isNull("cost").end().build();
conf.set(OrcInputFormat.SARG_PUSHDOWN, isNull.toKryo());
conf.set(ColumnProjectionUtils.READ_COLUMN_NAMES_CONF_STR,
"url,cost");
options.include(new boolean[]{true, true, false, true, false});
OrcInputFormat.setSearchArgument(options, types, conf, false);
String[] colNames = options.getColumnNames();
assertEquals(null, colNames[0]);
assertEquals("url", colNames[1]);
assertEquals(null, colNames[2]);
assertEquals("cost", colNames[3]);
assertEquals(null, colNames[4]);
SearchArgument arg = options.getSearchArgument();
List<PredicateLeaf> leaves = arg.getLeaves();
assertEquals("cost", leaves.get(0).getColumnName());
assertEquals(PredicateLeaf.Operator.IS_NULL, leaves.get(0).getOperator());
}