Anurag-S1ngh opened a new pull request, #4454: URL: https://github.com/apache/iceberg-python/pull/4454
<!-- Closes #3598 --> # Rationale for this change Upsert compared every non-key column to decide whether a matched row changed. For wide or nested rows this is expensive, and callers often already know which column signals a change, such as a hash column. Add an optional `difference_cols` parameter to `Table.upsert`, `Transaction.upsert`, and `get_rows_to_update`. When set, only those columns are compared. Unknown columns raise a `ValueError`, and the selection must contain at least one non-key column. The parameter is added at the end of the signature to keep positional calls working. ## Are these changes tested? Yes. Unit tests cover comparing only the selected columns, unchanged selected columns, unknown columns, and key-only selections. An end-to-end upsert test confirms that a change in an unselected column does not update the row. `tests/table` passes. ## Are there any user-facing changes? Yes. `upsert` accepts a new optional `difference_cols` argument. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
