use of io.openlineage.spark.agent.facets.TableProviderFacet in project OpenLineage by OpenLineage.
the class PlanUtils3Test method testIncludeProviderFacet.
@Test
public void testIncludeProviderFacet() {
try (MockedStatic<CatalogUtils3> mocked = mockStatic(CatalogUtils3.class)) {
Map<String, OpenLineage.DatasetFacet> facets = new HashMap<>();
TableProviderFacet tableProviderFacet = new TableProviderFacet("iceberg", "parquet");
when(CatalogUtils3.getTableProviderFacet(tableCatalog, tableProperties)).thenReturn(Optional.of(tableProviderFacet));
PlanUtils3.includeProviderFacet(tableCatalog, tableProperties, facets);
assertEquals(tableProviderFacet, facets.get("tableProvider"));
}
}
Aggregations