dhruvarya-db opened a new pull request, #3260:
URL: https://github.com/apache/iceberg-rust/pull/3260

   ## Which issue does this PR close?
   
   None.
   
   ## What changes are included in this PR?
   
   Adds timestamp-based time travel through `snapshot_id_as_of_time` and 
`TableScanBuilder::as_of_time`:
   
   ```rust
   let scan = table.scan().as_of_time(timestamp_ms).build()?;
   ```
   
   The timestamp is in epoch milliseconds with an inclusive cutoff. Selection 
uses the loaded table's main snapshot history, including rollback events. The 
first history entry wins equal timestamps, and lookup handles clock-skewed 
history without assuming timestamp order.
   
   The selected snapshot uses the existing snapshot-ID scan path, including its 
historical schema, projection, filtering and reader behavior. Unavailable 
history or a missing snapshot returns an error. Mixing timestamp and 
snapshot-ID selectors is rejected; repeated calls to the same selector keep the 
last value. Default scans remain unchanged. Public API signatures are included.
   
   ## Are these changes tested?
   
   Yes. Tests cover timestamp boundaries and extremes, rollback, ties, clock 
skew, unavailable history, missing snapshots, selector conflicts, historical 
schemas, and file-task/Arrow-row equivalence with explicit snapshot-ID scans.
   
   The historical-row regression reads real Parquet data through distinct 
snapshots: timestamp and explicit-ID scans return the older row (`x = 100`) 
with a one-column schema, while the default scan returns 2,048 current rows (`x 
= 1`) with eight columns. The test was also verified to fail when timestamp 
selection was temporarily bypassed; the implementation was then restored.
   
   ## AI Disclosure
   
   Implemented with assistance from OpenAI Codex. All code has been manually 
reviewed.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to