Skip to content

v1.2.911-rc5

@dantengsky dantengsky tagged this 08 Jun 10:57
Add NO_CHECK support for TIMESTAMP time travel:

  SELECT * FROM t AT (TIMESTAMP => '2024-01-01'::TIMESTAMP, NO_CHECK => true)

When NO_CHECK is enabled with TIMESTAMP, navigate_to_time_point_unchecked
constructs a deterministic UUID v7 boundary (all-zero random bytes, the
minimum for the target millisecond) and uses OpenDAL's start_after() to
jump directly to the right region of the snapshot file list. The first V4
snapshot after the target time is read, and its prev_snapshot_id is used
as the result.

This uses exclusive semantics (ts < time_point) rather than the checked
path's inclusive (ts <= time_point), which is a deliberate tradeoff for
determinism and safety in a fast path that skips chain verification.

Safety checks:
- Early rejection if table's current snapshot is not V4 format
- Rejection of negative timestamps (before 1970-01-01)
- Rejection if the predecessor snapshot is pre-V4 (mixed-format tables)
- Only V4 snapshot files (_v4.mpk) are matched during listing

Limitations:
- V4 snapshots only: requires UUID v7 temporal ordering in file names
- No chain verification: may return a snapshot on a forked chain
- Exclusive semantics: result timestamp is strictly less than target

(cherry picked from commit ae9fc1225bf38e4dddb13f9aaf465d7d2d77661b)
Assets 2
Loading