Skip to content

Commit d85a388

Browse files
committed
Fix statistics documentation by removing snapshot_id references
1 parent 3b53edc commit d85a388

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

mkdocs/docs/api.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,10 +1264,10 @@ Manage table statistics with operations through the `Table` API:
12641264

12651265
```python
12661266
# To run a specific operation
1267-
table.update_statistics().set_statistics(snapshot_id=1, statistics_file=statistics_file).commit()
1267+
table.update_statistics().set_statistics(statistics_file=statistics_file).commit()
12681268
# To run multiple operations
12691269
table.update_statistics()
1270-
.set_statistics(snapshot_id1, statistics_file1)
1270+
.set_statistics(statistics_file1)
12711271
.remove_statistics(snapshot_id2)
12721272
.commit()
12731273
# Operations are applied on commit.
@@ -1277,7 +1277,7 @@ You can also use context managers to make more changes:
12771277

12781278
```python
12791279
with table.update_statistics() as update:
1280-
update.set_statistics(snaphsot_id1, statistics_file)
1280+
update.set_statistics(statistics_file)
12811281
update.remove_statistics(snapshot_id2)
12821282
```
12831283

pyiceberg/table/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1058,7 +1058,7 @@ def update_statistics(self) -> UpdateStatistics:
10581058
We can also use context managers to make more changes. For example:
10591059
10601060
with table.update_statistics() as update:
1061-
update.set_statistics(snapshot_id=1, statistics_file=statistics_file)
1061+
update.set_statistics(statistics_file=statistics_file)
10621062
update.remove_statistics(snapshot_id=2)
10631063
"""
10641064
return UpdateStatistics(transaction=Transaction(self, autocommit=True))

pyiceberg/table/update/statistics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class UpdateStatistics(UpdateTableMetadata["UpdateStatistics"]):
4343
We can also use context managers to make more changes. For example:
4444
4545
with table.update_statistics() as update:
46-
update.set_statistics(snapshot_id=1, statistics_file=statistics_file)
46+
update.set_statistics(statistics_file=statistics_file)
4747
update.remove_statistics(snapshot_id=2)
4848
"""
4949

0 commit comments

Comments
 (0)