Skip to content

Commit 1bec9cf

Browse files
authored
fix: incorrect descriptions of snapshot operations (#2513)
…unctions. <!-- Thanks for opening a pull request! --> <!-- In the case this PR will resolve an issue, please replace ${GITHUB_ISSUE_ID} below with the actual Github issue id. --> <!-- Closes #${GITHUB_ISSUE_ID} --> # Rationale for this change Currently, the documentation of these write functions contains some inaccuracies regarding snapshot operations. These update methods do not actually produce `replace` snapshots, but rather `overwrite` snapshots, because the rewrite here modifies the data (dropping the records that match the overwrite filter). A `replace` snapshot is only generated when the table data itself is not changed, such as during data file rewrites or manifest rewrites. https://iceberg.apache.org/spec/#snapshots <img width="1536" height="418" alt="image" src="https://github.com/user-attachments/assets/a96b0e1c-86af-45da-98e5-58753e7f7482" /> ## Are these changes tested? ## Are there any user-facing changes? <!-- In the case of user-facing changes, please add the changelog label. -->
1 parent cff0c64 commit 1bec9cf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pyiceberg/table/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ def overwrite(
569569
An overwrite may produce zero or more snapshots based on the operation:
570570
571571
- DELETE: In case existing Parquet files can be dropped completely.
572-
- REPLACE: In case existing Parquet files need to be rewritten.
572+
- OVERWRITE: In case existing Parquet files need to be rewritten to drop rows that match the overwrite filter.
573573
- APPEND: In case new data is being inserted into the table.
574574
575575
Args:
@@ -629,7 +629,7 @@ def delete(
629629
A delete may produce zero or more snapshots based on the operation:
630630
631631
- DELETE: In case existing Parquet files can be dropped completely.
632-
- REPLACE: In case existing Parquet files need to be rewritten
632+
- OVERWRITE: In case existing Parquet files need to be rewritten to drop rows that match the delete filter.
633633
634634
Args:
635635
delete_filter: A boolean expression to delete rows from a table
@@ -1396,7 +1396,7 @@ def overwrite(
13961396
An overwrite may produce zero or more snapshots based on the operation:
13971397
13981398
- DELETE: In case existing Parquet files can be dropped completely.
1399-
- REPLACE: In case existing Parquet files need to be rewritten.
1399+
- OVERWRITE: In case existing Parquet files need to be rewritten to drop rows that match the overwrite filter..
14001400
- APPEND: In case new data is being inserted into the table.
14011401
14021402
Args:

0 commit comments

Comments
 (0)