use of org.apache.iceberg.data.InternalRecordWrapper in project hive by apache.
the class TestInputFormatReaderDeletes method rowSet.
@Override
public StructLikeSet rowSet(String name, Table table, String... columns) {
InputFormatConfig.ConfigBuilder builder = new InputFormatConfig.ConfigBuilder(conf).readFrom(table.location());
Schema projected = table.schema().select(columns);
StructLikeSet set = StructLikeSet.create(projected.asStruct());
set.addAll(TestIcebergInputFormats.TESTED_INPUT_FORMATS.stream().filter(recordFactory -> recordFactory.name().equals(inputFormat)).map(recordFactory -> recordFactory.create(builder.project(projected).conf()).getRecords()).flatMap(List::stream).map(record -> new InternalRecordWrapper(projected.asStruct()).wrap(record)).collect(Collectors.toList()));
return set;
}
Aggregations