@Test
public void testGetColumnTypes()
throws Exception
{
RecordSet recordSet = new ExampleRecordSet(new ExampleSplit("test", "schema", "table", dataUri), ImmutableList.of(
new ExampleColumnHandle("test", "text", STRING, 0),
new ExampleColumnHandle("test", "value", LONG, 1)));
assertEquals(recordSet.getColumnTypes(), ImmutableList.of(STRING, LONG));
recordSet = new ExampleRecordSet(new ExampleSplit("test", "schema", "table", dataUri), ImmutableList.of(
new ExampleColumnHandle("test", "value", LONG, 1),
new ExampleColumnHandle("test", "text", STRING, 0)));
assertEquals(recordSet.getColumnTypes(), ImmutableList.of(LONG, STRING));
recordSet = new ExampleRecordSet(new ExampleSplit("test", "schema", "table", dataUri), ImmutableList.of(
new ExampleColumnHandle("test", "value", LONG, 1),
new ExampleColumnHandle("test", "value", LONG, 1),
new ExampleColumnHandle("test", "text", STRING, 0)));
assertEquals(recordSet.getColumnTypes(), ImmutableList.of(LONG, LONG, STRING));
recordSet = new ExampleRecordSet(new ExampleSplit("test", "schema", "table", dataUri), ImmutableList.<ExampleColumnHandle>of());
assertEquals(recordSet.getColumnTypes(), ImmutableList.of());
}