JingsongLi commented on code in PR #1497:
URL: https://github.com/apache/incubator-paimon/pull/1497#discussion_r1253828274
##########
docs/content/engines/spark3.md:
##########
@@ -205,6 +205,50 @@ dataset.createOrReplaceTempView("my_table")
spark.sql("SELECT * FROM my_table").show()
```
+## Time travel
+
+### SQL
+
+Spark 3.3 and later supports time travel in SQL queries using `TIMESTAMP AS
OF` or `VERSION AS OF` clauses.
+
+
+```sql
+-- read the snapshot with id 1L (use snapshot id as version)
+SELECT * FROM t VERSION AS OF 1;
+
+-- read the snapshot from specified timestamp
+SELECT * FROM t TIMESTAMP AS OF '2023-06-01 00:00:00.123';
+
+-- read the snapshot from specified timestamp in unix seconds
+SELECT * FROM t TIMESTAMP AS OF 1678883047;
+
+-- read tag 'my-tag'
+SELECT * FROM t VERSION AS OF 'my-tag';
+```
+
+### DataFrame
+
+To select a specific table snapshot or the snapshot at some time in the
DataFrame API, Paimon supports:
Review Comment:
Can we just put this into query-table page?
--
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]