yyanyy commented on code in PR #6627: URL: https://github.com/apache/iceberg/pull/6627#discussion_r1082937202
########## docs/spark-queries.md: ########## @@ -95,21 +95,37 @@ The above list is in order of priority. For example: a matching catalog will tak #### SQL -Spark 3.3 and later supports time travel in SQL queries using `TIMESTAMP AS OF` or `VERSION AS OF` clauses +Spark 3.3 and later supports time travel in SQL queries using `TIMESTAMP AS OF` or `VERSION AS OF` clauses. +The `VERSION AS OF` clause can contain a long snapshot ID or a string branch or tag name. + +{{< hint info >}} +Note: If the name of a branch or tag is the same as a snapshot ID, then the snapshot which is selected for time travel is the snapshot +with the given snapshot ID. For example, consider the case where there is a tag named '1' and it references snapshot with ID 2. +If the version travel clause is `VERSION AS OF '1'`, time travel will be done to the snapshot with ID 1. +If this is not desired, rename the tag or branch with a well-defined prefix such as 'snapshot-1'. Review Comment: nit: do we have doc/can we link to the instructions for renaming? -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org