You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2020/11/09 13:51:08 UTC
[GitHub] [iceberg] RussellSpitzer edited a comment on issue #1735: Exceptions thrown when column pruning metadata tables from partitioned Iceberg tables
RussellSpitzer edited a comment on issue #1735:
URL: https://github.com/apache/iceberg/issues/1735#issuecomment-724025648
Repo for IcebergSourceTableTest
``` java
@Test
public void testEntriesTablePartitionedPrune() throws Exception {
TableIdentifier tableIdentifier = TableIdentifier.of("db", "entries_test");
Table table = createTable(tableIdentifier, SCHEMA, SPEC);
Table entriesTable = loadTable(tableIdentifier, "entries");
List<SimpleRecord> records = Lists.newArrayList(new SimpleRecord(1, "1"));
Dataset<Row> inputDf = spark.createDataFrame(records, SimpleRecord.class);
inputDf.select("id", "data").write()
.format("iceberg")
.mode("append")
.save(loadLocation(tableIdentifier));
table.refresh();
List<Row> actual = spark.read()
.format("iceberg")
.load(loadLocation(tableIdentifier, "entries"))
.select("status")
.collectAsList();
Snapshot snapshot = table.currentSnapshot();
Assert.assertEquals("Should only contain one manifest", 1, snapshot.allManifests().size());
Assert.assertEquals("Results should contain only one status", 1, actual.size());
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org