...
Discussion thread | https://lists.apache.org/thread/d8toll8042k3m4z3pvn1pwg0n8twm0wt |
---|---|
Vote thread | TBDhttps://lists.apache.org/thread/ppg4tpl9dwo4z6gtrgkqb92nxgm7swdt |
ISSUE | TBDhttps://github.com/apache/incubator-paimon/issues/1269 |
Release | Paimon-0.5 |
Motivation
...
Like snapshot, a new directory `/tag` will be created under table directory for storing tags. The qualified path for a tag file is `/path/to/table/tag/<tag-name>`, and the tag name is specified by user.
New Classes
It's not necessary to introduce a new `Tag` class because the tag is very similar to snapshot, we can just reuse the `Snapshot`. When we create a tag from a snapshot, we can just copy the corresponding snapshot file to the tag directory with tag name; when we read a tag, we can deserialize the tag file to a snapshot.
...
SELECT * FROM t VERSION AS OF tag-name
Note: The tag name can not be an numeric string to make a difference from snapshot. This limitation will be checked when creating tag and documented.
Flink
SELECT * FROM t /*+ OPTIONS('scan.tag-name'='<name>') */
...