Interface SupportsSourceWatermark


@PublicEvolving public interface SupportsSourceWatermark
Enables to fully rely on the watermark strategy provided by the ScanTableSource itself.

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 attribute
 

In 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 if SOURCE_WATERMARK() is declared. Nevertheless, a source can implement both interfaces if necessary.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Instructs the source to emit source-specific watermarks during runtime.
  • Method Details

    • applySourceWatermark

      void applySourceWatermark()
      Instructs the source to emit source-specific watermarks during runtime.