use of org.apache.iceberg.TestHelpers.Row in project hive by apache.
the class DeleteReadTests method selectColumns.
private StructLikeSet selectColumns(StructLikeSet rows, String... columns) {
Schema projection = table.schema().select(columns);
StructLikeSet set = StructLikeSet.create(projection.asStruct());
rows.stream().map(row -> StructProjection.create(table.schema(), projection).wrap(row)).forEach(set::add);
return set;
}
use of org.apache.iceberg.TestHelpers.Row in project hive by apache.
the class DeleteReadTests method rowSetWithoutIds.
private StructLikeSet rowSetWithoutIds(int... idsToRemove) {
Set<Integer> deletedIds = Sets.newHashSet(ArrayUtil.toIntList(idsToRemove));
StructLikeSet set = StructLikeSet.create(table.schema().asStruct());
records.stream().filter(row -> !deletedIds.contains(row.getField("id"))).forEach(set::add);
return set;
}
Aggregations