diff --git a/docs/content/pypaimon/data-evolution.md b/docs/content/pypaimon/data-evolution.md index f941136e9d63..e35e40fe9ddd 100644 --- a/docs/content/pypaimon/data-evolution.md +++ b/docs/content/pypaimon/data-evolution.md @@ -98,6 +98,16 @@ table_commit.close() # 'f1': [-1001, 1002] ``` +## Filter by _ROW_ID + +Requires the same [Prerequisites](#prerequisites) (row-tracking and data-evolution enabled). On such tables you can filter by `_ROW_ID` to prune files at scan time. Supported: `equal('_ROW_ID', id)`, `is_in('_ROW_ID', [id1, ...])`, `between('_ROW_ID', low, high)`. + +```python +pb = table.new_read_builder().new_predicate_builder() +rb = table.new_read_builder().with_filter(pb.equal('_ROW_ID', 0)) +result = rb.new_read().to_arrow(rb.new_scan().plan().splits()) +``` + ## Update Columns By Shards If you want to **compute a derived column** (or **update an existing column based on other columns**) without providing diff --git a/docs/content/pypaimon/python-api.md b/docs/content/pypaimon/python-api.md index cf838372fafb..9da4a07b66a7 100644 --- a/docs/content/pypaimon/python-api.md +++ b/docs/content/pypaimon/python-api.md @@ -258,7 +258,7 @@ predicate_5 = predicate_builder.and_predicates([predicate3, predicate4]) read_builder = read_builder.with_filter(predicate_5) ``` -See [Predicate]({{< ref "python-api#predicate" >}}) for all supported filters and building methods. +See [Predicate]({{< ref "python-api#predicate" >}}) for all supported filters and building methods. Filter by `_ROW_ID`: see [Data Evolution]({{< ref "pypaimon/data-evolution#filter-by-_row_id" >}}). You can also pushdown projection by `ReadBuilder`: