Hi Micah,

Your understanding is right, as of today there is no mechanism for performing 
time travel on branch. Time travel relies on history which captures all the 
changes on the main table state. At present there is no history metadata for 
branches (we can’t use snapshot lineages), for more details checkout this PR 
comment.<https://github.com/apache/iceberg/pull/5364#issuecomment-1227902420>

For “I assume in this case users need to query the underlying Iceberg metadata 
to determine a snapshot of interest)?” just curious how were you planning on 
doing this (bearing in mind time travel relies on history)?

Thanks,

Amogh Jahagirdar

From: Micah Kornfield <emkornfi...@gmail.com>
Reply-To: "dev@iceberg.apache.org" <dev@iceberg.apache.org>
Date: Tuesday, April 25, 2023 at 3:09 PM
To: Iceberg Dev List <dev@iceberg.apache.org>
Subject: [EXTERNAL] SQL Syntax for Time Travel on a Branch?


CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you can confirm the sender and know the 
content is safe.


Looking through the documents for Spark SQL syntax [1], it appears that Iceberg 
supports reading a branch at the latest version or time-travel on the main 
table, but I didn't see any queries that compose the two.

Is my understanding correct that there isn't existing SQL for time travel on a 
specific branch (I assume in this case users need to query the underlying 
Iceberg metadata to determine a snapshot of interest)?

Thanks,
Micah

[1] https://iceberg.apache.org/docs/latest/spark-queries/

Reply via email to