Skip to content

Add upsert regression test for non-join partition changes#3409

Open
ndrluis wants to merge 1 commit into
apache:mainfrom
ndrluis:ndr/upsert-partition-change-regression-test
Open

Add upsert regression test for non-join partition changes#3409
ndrluis wants to merge 1 commit into
apache:mainfrom
ndrluis:ndr/upsert-partition-change-regression-test

Conversation

@ndrluis
Copy link
Copy Markdown
Collaborator

@ndrluis ndrluis commented May 24, 2026

Rationale for this change

While reviewing #3387, I found a missing regression test for upsert behavior when a table is partitioned by a column that is not part of join_cols, and the source row changes that partition column value.

For example, if the table is partitioned by order_date but the upsert matches rows using only order_id, an existing row should still be matched by order_id even when the incoming row has a different order_date. The expected behavior is that the row is updated and moved to the new partition, not treated as a new insert.

Regardless of whether #3387 is merged, I believe this behavior should be protected in the repository because partition pruning optimizations in this area can otherwise accidentally prune away the existing target row before the join-key match is evaluated.

@ndrluis ndrluis requested review from Fokko and kevinjqliu May 24, 2026 13:18
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.

1 participant