use of org.apache.hadoop.hive.serde2.objectinspector.primitive.JavaStringObjectInspector in project presto by prestodb.
the class AbstractTestParquetReader method testStructOfTwoNestedSingleLevelSchemaArrays.
@Test
public void testStructOfTwoNestedSingleLevelSchemaArrays() throws Exception {
Iterable<List<List<Integer>>> intArrayField = createNullableTestArrays(createTestArrays(limit(cycle(ImmutableList.of(1, 3, 5, 7, 11, 13, 17)), 30_000)));
Iterable<List<List<String>>> stringArrayField = createNullableTestArrays(createTestArrays(transform(intsBetween(0, 31_234), Object::toString)));
List<List> values = createTestStructs(stringArrayField, intArrayField);
List<String> structFieldNames = asList("stringArrayField", "intArrayField");
Type structType = RowType.from(asList(field("stringArrayField", new ArrayType(new ArrayType(VARCHAR))), field("intArrayField", new ArrayType(new ArrayType(INTEGER)))));
ObjectInspector objectInspector = getStandardStructObjectInspector(structFieldNames, asList(getStandardListObjectInspector(getStandardListObjectInspector(javaStringObjectInspector)), getStandardListObjectInspector(getStandardListObjectInspector(javaIntObjectInspector))));
tester.testSingleLevelArraySchemaRoundTrip(objectInspector, values, values, structType);
}
Aggregations