use of org.apache.drill.metastore.operate.Metadata in project drill by apache.
the class TestIcebergTablesMetastoreConfigAndVersion method testVersionUpdate.
@Test
public void testVersionUpdate() {
DrillConfig config = new DrillConfig(baseIcebergConfig(baseLocation.getRoot()));
Tables tables = new IcebergMetastore(config).tables();
Metadata metadata = tables.metadata();
assertTrue(metadata.supportsVersioning());
assertEquals(0, metadata.version());
tables.modify().overwrite(TableMetadataUnit.builder().storagePlugin("dfs").workspace("tmp").tableName("nation").metadataKey("dir0").build()).execute();
assertNotEquals(0, metadata.version());
}
use of org.apache.drill.metastore.operate.Metadata in project drill by apache.
the class TestIcebergTablesMetastoreConfigAndVersion method testVersionInitial.
@Test
public void testVersionInitial() {
DrillConfig config = new DrillConfig(baseIcebergConfig(baseLocation.getRoot()));
Metastore metastore = new IcebergMetastore(config);
Metadata metadata = metastore.tables().metadata();
assertTrue(metadata.supportsVersioning());
assertEquals(0, metadata.version());
}
Aggregations