jackye1995 commented on pull request #3269: URL: https://github.com/apache/iceberg/pull/3269#issuecomment-960380098
> 1. No branch is specified (I'm not sure if that is possible, but if it is), we default to the main branch. Time travel behaves as though only the main branch exists. > > 2. A branch is specified. We go up the tree from the head of the branch, until we are at or before the timestamp. We select the snapshot we find there. There are two ways this might fail: a. We pass the beginning of the branch -- we can either say there is no snapshot or we can continue on the tree up another branch our branch is branched from. b. We do not find any snapshot at or before the timestamp -- we say there is no snapshot. Yes I totally agree with this resolution strategy. The only question I have is around pure SQL support. For branch: `SELECT * from t.<branch> TIMESTAMP AS OF <timestamp>` is also what I am considering, although it means we cannot use metadata table name as the branch name, but we can discuss on that. The question I have more is if we want to have a more "formal" support, like `SELECT * from table TIMESTAMP AS OF <timestamp> IN BRANCH <branch>` just to make things up. For tag: I am okay with the `VERSION 'tag'` approach. String seems like a good way to define version as it is the most flexible across systems. We can also make it typed, so both `VERSION 123` and `VERSION '123'` work. This is the approach we are proposing in Trino right now, where the query engine can declare supported version types and parse them differently. But there might be some more complexity for Spark to implement this, and the benefit is not clear compared to using String. -- 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]
