Skip to content

Commit b5ad53c

Browse files
[doc] add doc for filter by _ROW_ID on data evolution (#7262)
1 parent b89a685 commit b5ad53c

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

docs/content/pypaimon/data-evolution.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,16 @@ table_commit.close()
9898
# 'f1': [-1001, 1002]
9999
```
100100

101+
## Filter by _ROW_ID
102+
103+
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)`.
104+
105+
```python
106+
pb = table.new_read_builder().new_predicate_builder()
107+
rb = table.new_read_builder().with_filter(pb.equal('_ROW_ID', 0))
108+
result = rb.new_read().to_arrow(rb.new_scan().plan().splits())
109+
```
110+
101111
## Update Columns By Shards
102112

103113
If you want to **compute a derived column** (or **update an existing column based on other columns**) without providing

docs/content/pypaimon/python-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ predicate_5 = predicate_builder.and_predicates([predicate3, predicate4])
258258
read_builder = read_builder.with_filter(predicate_5)
259259
```
260260

261-
See [Predicate]({{< ref "python-api#predicate" >}}) for all supported filters and building methods.
261+
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" >}}).
262262

263263
You can also pushdown projection by `ReadBuilder`:
264264

0 commit comments

Comments
 (0)