Interface SupportsSourceWatermark
-
@PublicEvolving public interface SupportsSourceWatermarkEnables to fully rely on the watermark strategy provided by theScanTableSourceitself.The concept of watermarks defines when time operations based on an event time attribute will be triggered. A watermark tells operators that no elements with a timestamp older or equal to the watermark timestamp should arrive at the operator. Thus, watermarks are a trade-off between latency and completeness.
Given the following SQL:
CREATE TABLE t (i INT, ts TIMESTAMP(3), WATERMARK FOR ts AS SOURCE_WATERMARK()) // `ts` becomes a time attributeIn the above example, the
SOURCE_WATERMARK()is a built-in marker function that will be detected by the planner and translated into a call to this interface if available. If a source does not implement this interface, an exception will be thrown.Compared to
SupportsWatermarkPushDown, it is not possible to influence a source's watermark strategy using customs expressions ifSOURCE_WATERMARK()is declared. Nevertheless, a source can implement both interfaces if necessary.- See Also:
SupportsWatermarkPushDown
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidapplySourceWatermark()Instructs the source to emit source-specific watermarks during runtime.
-