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