Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Spark] Inline non-correlated scalar subqueries in Merge #2134

Closed

Conversation

tomvanbussel
Copy link
Collaborator

Which Delta project/connector is this regarding?

  • Spark
  • Standalone
  • Flink
  • Kernel
  • Other (fill in here)

Description

This PR fixes a bug in MERGE that affects MERGE statements that contain a scalar subquery with non-deterministic results. Such a subquery can return different results during source materialization, while finding matches, and while writing modified rows. This can cause rows to be either dropped or duplicated.

How was this patch tested?

Added a test with a non-deterministic subquery in the source in Merge. Also expanded test coverage of subqueries in Merge in general.

Does this PR introduce any user-facing changes?

No

scottsand-db pushed a commit that referenced this pull request Oct 6, 2023
This PR fixes a bug in MERGE that affects MERGE statements that contain a scalar subquery with non-deterministic results. Such a subquery can return different results during source materialization, while finding matches, and while writing modified rows. This can cause rows to be either dropped or duplicated.

Closes #2134

GitOrigin-RevId: 79b5eadebf5781a10a31c85088261783a02c98a0
xupefei pushed a commit to xupefei/delta that referenced this pull request Oct 31, 2023
This PR fixes a bug in MERGE that affects MERGE statements that contain a scalar subquery with non-deterministic results. Such a subquery can return different results during source materialization, while finding matches, and while writing modified rows. This can cause rows to be either dropped or duplicated.

Closes delta-io#2134

GitOrigin-RevId: 79b5eadebf5781a10a31c85088261783a02c98a0
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