use of org.apache.parquet.scrooge.test.TestPersonWithAllInformation in project parquet-mr by apache.
the class ParquetScroogeSchemeTest method testNestedReadingInScrooge.
@Test
public void testNestedReadingInScrooge() throws Exception {
Map<String, org.apache.parquet.thrift.test.Phone> phoneMap = new HashMap<String, Phone>();
phoneMap.put("key1", new org.apache.parquet.thrift.test.Phone("111", "222"));
org.apache.parquet.thrift.test.TestPersonWithAllInformation toWrite = new org.apache.parquet.thrift.test.TestPersonWithAllInformation(new org.apache.parquet.thrift.test.Name("first"), new Address("my_street", "my_zip"), phoneMap);
toWrite.setInfo("my_info");
String expected = "TestPersonWithAllInformation(Name(first,None),None,Address(my_street,my_zip),None,Some(my_info),Map(key1 -> Phone(111,222)),None,None)\n";
verifyScroogeRead(thriftRecords(toWrite), TestPersonWithAllInformation.class, expected, "**");
String expectedProjected = "TestPersonWithAllInformation(Name(first,None),None,Address(my_street,my_zip),None,Some(my_info),Map(),None,None)\n";
verifyScroogeRead(thriftRecords(toWrite), TestPersonWithAllInformation.class, expectedProjected, "address/*;info;name/first_name");
}
Aggregations