kevinjqliu commented on code in PR #1810:
URL: https://github.com/apache/iceberg-python/pull/1810#discussion_r2002333427


##########
pyiceberg/table/__init__.py:
##########
@@ -1198,10 +1198,11 @@ def upsert(
 
                 update_row_cnt = len(rows_to_update)
 
-                # build the match predicate filter
-                overwrite_mask_predicate = 
upsert_util.create_match_filter(rows_to_update, join_cols)
+                if len(rows_to_update) > 0:
+                    # build the match predicate filter
+                    overwrite_mask_predicate = 
upsert_util.create_match_filter(rows_to_update, join_cols)
 
-                tx.overwrite(rows_to_update, 
overwrite_filter=overwrite_mask_predicate)
+                    tx.overwrite(rows_to_update, 
overwrite_filter=overwrite_mask_predicate)

Review Comment:
   should we enforce not producing empty snapshots lower in the stack, in the 
write functions themselves (`overwrite`/`append`)? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to