use of org.apache.iceberg.data.Record in project hive by apache.
the class TestHiveIcebergComplexTypeWrites method testWriteArrayOfArraysInTable.
@Test
public void testWriteArrayOfArraysInTable() throws IOException {
Schema schema = new Schema(required(1, "id", Types.LongType.get()), required(2, "arrayofarrays", Types.ListType.ofRequired(3, Types.ListType.ofRequired(4, Types.StringType.get()))));
List<Record> records = TestHelper.generateRandomRecords(schema, 3, 1L);
testComplexTypeWrite(schema, records);
}
use of org.apache.iceberg.data.Record in project hive by apache.
the class TestHiveIcebergComplexTypeWrites method testWriteMapOfArraysInTable.
@Test
public void testWriteMapOfArraysInTable() throws IOException {
Schema schema = new Schema(required(1, "id", Types.LongType.get()), required(2, "mapofarrays", Types.MapType.ofRequired(3, 4, Types.StringType.get(), Types.ListType.ofRequired(5, Types.StringType.get()))));
List<Record> records = TestHelper.generateRandomRecords(schema, 5, 0L);
testComplexTypeWrite(schema, records);
}
use of org.apache.iceberg.data.Record in project hive by apache.
the class TestHiveIcebergComplexTypeWrites method testWriteMapOfStructsInTable.
@Test
public void testWriteMapOfStructsInTable() throws IOException {
Schema schema = new Schema(required(1, "id", Types.LongType.get()), required(2, "mapofstructs", Types.MapType.ofRequired(3, 4, Types.StringType.get(), Types.StructType.of(required(5, "something", Types.StringType.get()), required(6, "someone", Types.StringType.get()), required(7, "somewhere", Types.StringType.get())))));
List<Record> records = TestHelper.generateRandomRecords(schema, 5, 0L);
testComplexTypeWrite(schema, records);
}
use of org.apache.iceberg.data.Record in project hive by apache.
the class TestHiveIcebergComplexTypeWrites method testWriteArrayOfMapsInTable.
@Test
public void testWriteArrayOfMapsInTable() throws IOException {
Schema schema = new Schema(required(1, "id", Types.LongType.get()), required(2, "arrayofmaps", Types.ListType.ofRequired(3, Types.MapType.ofRequired(4, 5, Types.StringType.get(), Types.StringType.get()))));
List<Record> records = TestHelper.generateRandomRecords(schema, 5, 1L);
testComplexTypeWrite(schema, records);
}
use of org.apache.iceberg.data.Record in project hive by apache.
the class TestHiveIcebergComplexTypeWrites method testWriteStructOfArraysInTable.
@Test
public void testWriteStructOfArraysInTable() throws IOException {
Schema schema = new Schema(required(1, "id", Types.LongType.get()), required(2, "structofarrays", Types.StructType.of(required(3, "names", Types.ListType.ofRequired(4, Types.StringType.get())), required(5, "birthdays", Types.ListType.ofRequired(6, Types.StringType.get())))));
List<Record> records = TestHelper.generateRandomRecords(schema, 5, 1L);
testComplexTypeWrite(schema, records);
}
Aggregations