This is an automated email from the ASF dual-hosted git repository.
lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git
The following commit(s) were added to refs/heads/master by this push:
new b4447ef85 [doc] add 'tag support' document for trino query (#4155)
b4447ef85 is described below
commit b4447ef858f91e3072ae6d78014f8322285727cd
Author: chun.ji <[email protected]>
AuthorDate: Tue Sep 10 16:41:35 2024 +0800
[doc] add 'tag support' document for trino query (#4155)
---
docs/content/engines/trino.md | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/docs/content/engines/trino.md b/docs/content/engines/trino.md
index a48620452..0f0fe8b94 100644
--- a/docs/content/engines/trino.md
+++ b/docs/content/engines/trino.md
@@ -196,8 +196,18 @@ SELECT * FROM t FOR TIMESTAMP AS OF TIMESTAMP '2023-01-01
00:00:00 Asia/Shanghai
-- read the snapshot with id 1L (use snapshot id as version)
SELECT * FROM t FOR VERSION AS OF 1;
+
+-- read tag 'my-tag'
+SELECT * FROM t FOR VERSION AS OF 'my-tag';
+
```
+{{< hint warning >}}
+If tag's name is a number and equals to a snapshot id, the VERSION AS OF
syntax will consider tag first. For example, if
+you have a tag named '1' based on snapshot 2, the statement `SELECT * FROM
paimon.test_db.orders FOR VERSION AS OF '1'` actually queries snapshot 2
+instead of snapshot 1.
+{{< /hint >}}
+
{{< /tab >}}