Skip to main content

Module time

Module time 

Source
Expand description

Event time, watermarks, and timer management.

Structs§

AscendingTimestampsGenerator
Watermark generator for strictly ascending timestamps; the watermark equals the current timestamp.
BoundedOutOfOrdernessGenerator
Watermark = max_timestamp_seen - max_out_of_orderness. on_event ignores timestamps far beyond wall clock for advancement.
CastError
Error returned when a column isn’t a Timestamp(_) type or Arrow’s cast kernel fails.
EventTimeExtractor
Extracts event timestamps from Arrow RecordBatch columns.
PeriodicGenerator
Wraps another generator and emits watermarks at fixed wall-clock intervals so idle sources don’t stall time-based windows.
ProcessingTimeGenerator
Processing-time watermark generator.
PunctuatedGenerator
Punctuated watermark generator that emits based on special events.
SourceProvidedGenerator
Watermark generator for sources with embedded watermarks.
TimerRegistration
A timer registration for delayed processing.
TimerService
Timer service for scheduling and managing timers.
Watermark
A monotonically-increasing assertion that no events with timestamps earlier than this will arrive. Drives window emission, late-event detection, and cross-operator time alignment.
WatermarkTracker
Tracks watermarks across multiple input sources.

Enums§

EventTimeError
Errors that can occur during event time extraction.
ExtractionMode
Multi-row extraction strategy.
FilterError
Reasons filter_batch_by_timestamp cannot filter a batch.
ThresholdOp
Direction of timestamp threshold comparison.
TimeError
Errors that can occur in time operations.
TimestampField
Column identifier for timestamp field.

Constants§

DEFAULT_MAX_FUTURE_SKEW_MS
Default max_future_skew_ms: 5 min.

Traits§

WatermarkGenerator
Trait for generating watermarks from event timestamps.

Functions§

cast_to_millis_array
Cast any Timestamp(_) array to TimestampMillisecondArray.
filter_batch_by_timestamp
Filter a RecordBatch by comparing a Timestamp(_) column against a millisecond threshold. Returns Ok(None) when no rows survive.
now_unix_millis
Wall clock as epoch milliseconds; 0 if unreadable (callers fail open).
parse_duration_str
Parses a config duration string. Returns None on malformed input.

Type Aliases§

FiredTimersVec
Collection type for fired timers.
TimerKey
Timer key type optimized for window IDs (16 bytes).