use of io.trino.plugin.deltalake.transactionlog.MetadataEntry in project trino by trinodb.
the class TestTransactionLogAccess method testGetMetadataEntry.
@Test
public void testGetMetadataEntry() throws Exception {
setupTransactionLogAccess("person");
MetadataEntry metadataEntry = transactionLogAccess.getMetadataEntry(tableSnapshot, SESSION).get();
assertEquals(metadataEntry.getCreatedTime(), 1579190100722L);
assertEquals(metadataEntry.getId(), "b6aeffad-da73-4dde-b68e-937e468b1fdf");
assertThat(metadataEntry.getOriginalPartitionColumns()).containsOnly("age");
assertThat(metadataEntry.getCanonicalPartitionColumns()).containsOnly("age");
MetadataEntry.Format format = metadataEntry.getFormat();
assertEquals(format.getOptions().keySet().size(), 0);
assertEquals(format.getProvider(), "parquet");
assertEquals(tableSnapshot.getCachedMetadata(), Optional.of(metadataEntry));
}
Aggregations