//col_uft8: (name: chararray,value: chararray),
//col_uuid: (name: chararray,value: chararray),
//columns: {(name: chararray,value: chararray)}}
Iterator<Tuple> it = pig.openIterator("rows");
if (it.hasNext()) {
Tuple t = it.next();
Assert.assertEquals(t.get(0), "foo");
Tuple column = (Tuple) t.get(1);
Assert.assertEquals(column.get(1), "ascii");
column = (Tuple) t.get(2);
Assert.assertEquals(column.get(1), false);
column = (Tuple) t.get(3);
Assert.assertEquals(column.get(1), new DataByteArray(Hex.hexToBytes("DEADBEEF")));
column = (Tuple) t.get(4);
Assert.assertEquals(column.get(1), 1296705900000L);
column = (Tuple) t.get(5);
Assert.assertEquals(column.get(1), "23.345");
column = (Tuple) t.get(6);
Assert.assertEquals(column.get(1), 2.7182818284590451d);
column = (Tuple) t.get(7);
Assert.assertEquals(column.get(1), 23.45f);
column = (Tuple) t.get(8);
Assert.assertEquals(column.get(1), "127.0.0.1");
column = (Tuple) t.get(9);
Assert.assertEquals(column.get(1), 23);
column = (Tuple) t.get(10);
Assert.assertEquals(column.get(1), 12345);
column = (Tuple) t.get(11);
Assert.assertEquals(column.get(1), new DataByteArray((TimeUUIDType.instance.fromString("e23f450f-53a6-11e2-7f7f-7f7f7f7f7f77").array())));
column = (Tuple) t.get(12);
Assert.assertEquals(column.get(1), 12345678L);
column = (Tuple) t.get(13);
Assert.assertEquals(column.get(1), new DataByteArray((TimeUUIDType.instance.fromString("e23f450f-53a6-11e2-7f7f-7f7f7f7f7f7f").array())));
column = (Tuple) t.get(14);
Assert.assertEquals(column.get(1), "hello");
column = (Tuple) t.get(15);
Assert.assertEquals(column.get(1), new DataByteArray((UUIDType.instance.fromString("550e8400-e29b-41d4-a716-446655440000").array())));
}
pig.registerQuery("cc_rows = LOAD 'cassandra://thriftKs/CC?" + defaultParameters + "' USING CassandraStorage();");
//(chuck,{(kick,3)})
it = pig.openIterator("cc_rows");
if (it.hasNext()) {
Tuple t = it.next();
Assert.assertEquals(t.get(0), "chuck");
DataBag columns = (DataBag) t.get(1);
Iterator<Tuple> iter = columns.iterator();
if(iter.hasNext())
{
Tuple column = iter.next();
Assert.assertEquals(column.get(0), "kick");
Assert.assertEquals(column.get(1), 3L);
}
}
}