Package org.apache.flink.table.catalog
Class DefaultMaterializedTableEnricher
- java.lang.Object
-
- org.apache.flink.table.catalog.DefaultMaterializedTableEnricher
-
- All Implemented Interfaces:
MaterializedTableEnricher
@Internal public class DefaultMaterializedTableEnricher extends Object implements MaterializedTableEnricher
Default implementation ofMaterializedTableEnricher.Applies default freshness values based on refresh mode and determines the physical refresh mode using freshness threshold comparison.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DefaultMaterializedTableEnrichercreate(Duration defaultContinuousFreshness, Duration defaultFullFreshness, Duration freshnessThreshold)CatalogMaterializedTable.RefreshModederiveRefreshMode(CatalogMaterializedTable.LogicalRefreshMode logicalRefreshMode, IntervalFreshness freshness, Duration threshold)Determines physical refresh mode: CONTINUOUS if freshness is below threshold or explicitly requested, otherwise FULL (validated for cron conversion).MaterializedTableEnrichmentResultenrich(CatalogMaterializedTable table)Enriches a materialized table by determining its final freshness interval and refresh mode.
-
-
-
Method Detail
-
create
public static DefaultMaterializedTableEnricher create(Duration defaultContinuousFreshness, Duration defaultFullFreshness, Duration freshnessThreshold)
-
enrich
public MaterializedTableEnrichmentResult enrich(CatalogMaterializedTable table)
Description copied from interface:MaterializedTableEnricherEnriches a materialized table by determining its final freshness interval and refresh mode.- Specified by:
enrichin interfaceMaterializedTableEnricher- Parameters:
table- the materialized table to enrich, which may have null freshness- Returns:
- the enrichment result with resolved, non-null freshness and refresh mode
-
deriveRefreshMode
public CatalogMaterializedTable.RefreshMode deriveRefreshMode(CatalogMaterializedTable.LogicalRefreshMode logicalRefreshMode, IntervalFreshness freshness, Duration threshold)
Determines physical refresh mode: CONTINUOUS if freshness is below threshold or explicitly requested, otherwise FULL (validated for cron conversion).
-
-