int result = (Integer) ep.getColumn(col, Type.getPrimitive(Type.TypeName.INT));
LOG.info("Column col=" + col + "; result=" + result);
assertEquals(8 - i, result);
}
Utf8 s;
// In-order parsing with strings.
ep.reset(makeEvent("bar,quux"));
s = (Utf8) ep.getColumn(0, Type.getPrimitive(Type.TypeName.STRING));
assertEquals(new Utf8("bar"), s);
s = (Utf8) ep.getColumn(1, Type.getPrimitive(Type.TypeName.STRING));
assertEquals(new Utf8("quux"), s);
// Go backward with strings.
ep.reset(makeEvent("meep,foo"));
s = (Utf8) ep.getColumn(1, Type.getPrimitive(Type.TypeName.STRING));
assertEquals(new Utf8("foo"), s);
s = (Utf8) ep.getColumn(0, Type.getPrimitive(Type.TypeName.STRING));
assertEquals(new Utf8("meep"), s);
// Ask for a column that does not exist; then go back and ask for one that does.
ep.reset(makeEvent("1,2,3"));
try {
ep.getColumn(4, Type.getPrimitive(Type.TypeName.STRING));