From ab62f979db445d2ee69cc1af961c79d82abf3d61 Mon Sep 17 00:00:00 2001 From: Gatefixer <313497061+lancedb-gatefixer[bot]@users.noreply.github.com> Date: Thu, 5 Nov 2026 01:40:19 +0000 Subject: [PATCH] docs: explain remote tag checkout branch requirements --- docs/web/management/table.mdx | 7 +++++++ python/python/lancedb/remote/table.py | 10 ++++++++++ python/python/lancedb/table.py | 12 ++++++++++++ 3 files changed, 29 insertions(+) diff --git a/docs/web/management/table.mdx b/docs/web/management/table.mdx index 14ff57cf4..d91e7c7ea 100644 --- a/docs/web/management/table.mdx +++ b/docs/web/management/table.mdx @@ -1471,6 +1471,13 @@ page). The tags API supports the standard CRUD operations (create, list, update, delete), plus checking out by tag name. +A tag identifies both a branch and a version. On remote tables, a tag must belong +to the handle's current branch; checking out a tag on another branch raises an +error without changing the current selection. Obtain a handle for the tag's +branch first: in Python, use `branch_table = table.branches.checkout("exp")`, then +`branch_table.checkout("baseline")` to read a tag named `baseline` on `exp`. +See [Branches](/tables/branching) for more on branch handles. + {VersioningTags} diff --git a/python/python/lancedb/remote/table.py b/python/python/lancedb/remote/table.py index db74c5375..451739755 100644 --- a/python/python/lancedb/remote/table.py +++ b/python/python/lancedb/remote/table.py @@ -307,6 +307,16 @@ class RemoteTable(Table): ) def checkout(self, version: Union[int, str]): + """Check out a version number or tag as a read-only view in place. + + A tag must belong to this handle's current branch. To read a tag on + another branch, first obtain that branch's handle with + `table.branches.checkout("branch_name")`, then call `checkout(tag)` on + that handle. A tag on another branch raises an error without changing + the current selection. + + Call `checkout_latest()` to return to the latest version of this branch. + """ result = LOOP.run(self._table.checkout(version)) self._checkout_version = self.version return result diff --git a/python/python/lancedb/table.py b/python/python/lancedb/table.py index 23bc25b97..d826e4c07 100644 --- a/python/python/lancedb/table.py +++ b/python/python/lancedb/table.py @@ -3464,6 +3464,12 @@ class Table(ABC): out state. To return the table to a normal state use `[Self::checkout_latest]`. + For remote tables, a tag must belong to this handle's current branch. + To read a tag on another branch, first obtain that branch's handle with + `table.branches.checkout("branch_name")`, then call `checkout(tag)` on + that handle. A tag on another branch raises an error without changing + the current selection. + Parameters ---------- version: int | str, @@ -7994,6 +8000,12 @@ class AsyncTable: out state. To return the table to a normal state use `[Self::checkout_latest]`. + For remote tables, a tag must belong to this handle's current branch. + To read a tag on another branch, first obtain that branch's handle with + `await table.branches.checkout("branch_name")`, then call + `await branch_table.checkout(tag)` on that handle. A tag on another + branch raises an error without changing the current selection. + Parameters ---------- version: int | str,