Class ColumnStatsWatermarkExtractor
java.lang.Object
org.apache.iceberg.flink.source.reader.ColumnStatsWatermarkExtractor
- All Implemented Interfaces:
Serializable
,SplitWatermarkExtractor
@Internal
public class ColumnStatsWatermarkExtractor
extends Object
implements SplitWatermarkExtractor, Serializable
SplitWatermarkExtractor
implementation which uses an Iceberg timestamp column statistics
to get the watermarks for the IcebergSourceSplit
. This watermark is emitted by the WatermarkExtractorRecordEmitter
along with the actual records.- See Also:
-
Constructor Summary
ConstructorDescriptionColumnStatsWatermarkExtractor
(Schema schema, String eventTimeFieldName, TimeUnit timeUnit) Creates the extractor. -
Method Summary
Modifier and TypeMethodDescriptionlong
Get the watermark for a split using column statistics.
-
Constructor Details
-
ColumnStatsWatermarkExtractor
Creates the extractor.- Parameters:
schema
- The schema of the TableeventTimeFieldName
- The column which should be used as an event timetimeUnit
- Used for converting the long value to epoch milliseconds
-
-
Method Details
-
extractWatermark
Get the watermark for a split using column statistics.- Specified by:
extractWatermark
in interfaceSplitWatermarkExtractor
- Parameters:
split
- The split- Returns:
- The watermark
- Throws:
IllegalArgumentException
- if there is no statistics for the column
-