@PublicEvolving public interface SupportsSourceWatermark
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.
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.
|Modifier and Type||Method and Description|
Instructs the source to emit source-specific watermarks during runtime.
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.