Expand description
This module provides functions for performing timestamp queries over the Delta Log, translating between timestamps and Delta versions.
§Usage
Use this module to:
- Convert timestamps or timestamp ranges into Delta versions or version ranges
- Perform time travel queries
- Execute timestamp-based change data feed queries
The history_manager module works with tables regardless of whether they have In-Commit Timestamps (ICT) enabled. ICT is a Delta table feature that stores precise commit timestamps in the commit metadata rather than relying on file modification times, which can be affected by clock skew or filesystem limitations.
§Limitations
All timestamp queries are limited to the state captured in the provided Snapshot. For
tables without ICT enabled, timestamp queries rely on file modification timestamps, which are
not guaranteed to be monotonically increasing across commits.
Modules§
- error
- Error types for the history manager module.
Structs§
Enums§
- History
Commit Type - Selects which commit the
get_earliest_commitquery returns.
Functions§
- first_
version_ after - Gets the first
CommitAt(version and timestamp) with a timestamp at or aftertimestamp. - get_
earliest_ commit - Returns the earliest table version available on the file system at
log_root. The returned version is not guaranteed to exist by the time the caller acts on it: a concurrent log-cleanup operation may delete the underlying file. - latest_
version_ as_ of - Gets the latest
CommitAt(version and timestamp) with a timestamp at or beforetimestamp. - timestamp_
range_ to_ versions - Converts a timestamp range to a corresponding version range.
Type Aliases§
- Timestamp
- A timestamp representing milliseconds since the Unix epoch (1970-01-01 00:00:00 UTC).