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

[3.2][Spark] Execute MERGE using Dataframe API in Scala #3585

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

vkorukanti
Copy link
Collaborator

(cherrypick of #3456)

Due to Spark unfortunate behavior of resolving plan nodes it doesn't know, the DeltaMergeInto plan created when using the MERGE scala API needs to be manually resolved to ensure spark doesn't interfere with its analysis.

This currently completely bypasses Spark's analysis as we then manually execute the MERGE command which has negatiev effects, e.g. the execution is not visible in QueryExecutionListener.

This change addresses this issue, by executing the plan using the Dataframe API after it's manually resolved so that the command goes through the regular code path.

Resolves #1521 Covered by existing tests.

(cherrypick of delta-io#3456)

Due to Spark unfortunate behavior of resolving plan nodes it doesn't
know, the `DeltaMergeInto` plan created when using the MERGE scala API
needs to be manually resolved to ensure spark doesn't interfere with its
analysis.

This currently completely bypasses Spark's analysis as we then manually
execute the MERGE command which has negatiev effects, e.g. the execution
is not visible in QueryExecutionListener.

This change addresses this issue, by executing the plan using the
Dataframe API after it's manually resolved so that the command goes
through the regular code path.

Resolves delta-io#1521
Covered by existing tests.
@vkorukanti vkorukanti merged commit 07a4db8 into delta-io:branch-3.2 Aug 20, 2024
9 checks passed
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