Skip to content

Conversation

@Fokko
Copy link
Contributor

@Fokko Fokko commented Feb 21, 2025

When you upsert into an empty table, it fails because it tries to search for records to be updated 🤔

@Fokko Fokko added this to the PyIceberg 0.9.0 milestone Feb 21, 2025
@Fokko Fokko force-pushed the fd-upsert-empty-table branch from 4817b00 to a7501a0 Compare February 21, 2025 15:38
Copy link
Contributor

@kevinjqliu kevinjqliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment on lines +582 to +584
if overwrite_filter != AlwaysFalse():
# Only delete when the filter is != AlwaysFalse
self.delete(delete_filter=overwrite_filter, case_sensitive=case_sensitive, snapshot_properties=snapshot_properties)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i thought self.delete is a no-op when the overwrite_filter is AlwaysFalse, but i like that its more explicit here 👍

@kevinjqliu kevinjqliu merged commit f1c1f8f into main Feb 21, 2025
7 checks passed
@kevinjqliu kevinjqliu deleted the fd-upsert-empty-table branch February 21, 2025 16:12
gabeiglio pushed a commit to Netflix/iceberg-python that referenced this pull request Aug 13, 2025
When you upsert into an empty table, it fails because it tries to search
for records to be updated 🤔
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants