-
Notifications
You must be signed in to change notification settings - Fork 28.1k
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-48794][CONNECT] df.mergeInto support for Spark Connect (Scala and Python) #46960
Conversation
### What changes were proposed in this pull request? Spark 4.0 added a new `df.mergeInto` API, but it is missing from PySpark. This PR fixes that. The support for this API in Spark Connect Python API will be added later by #46960. ### Why are the changes needed? Because PySpark does not support `df.mergeInto`. ### Does this PR introduce _any_ user-facing change? Yes, the user would be able to use the `df.mergeInto` API. ### How was this patch tested? New unit tests. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #47086 from xupefei/pyspark-mergeinto. Authored-by: Paddy Xu <xupaddy@gmail.com> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
@HyukjinKwon and @grundprinzip Could you review this PR? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine otherwise
|
||
// (Required) Whether to enable schema evolution. | ||
bool with_schema_evolution = 7; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would need some reviews from @hvanhovell and/or @grundprinzip
cc @zhengruifeng and @ueshin too |
### What changes were proposed in this pull request? Spark 4.0 added a new `df.mergeInto` API, but it is missing from PySpark. This PR fixes that. The support for this API in Spark Connect Python API will be added later by apache#46960. ### Why are the changes needed? Because PySpark does not support `df.mergeInto`. ### Does this PR introduce _any_ user-facing change? Yes, the user would be able to use the `df.mergeInto` API. ### How was this patch tested? New unit tests. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#47086 from xupefei/pyspark-mergeinto. Authored-by: Paddy Xu <xupaddy@gmail.com> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
@xupefei mind resolving conflicts? I will just merge |
Done! |
Merged to master. |
What changes were proposed in this pull request?
This PR introduces
df.mergeInto
support for Spark Connect Scala and Python clients.This work contains four components:
MergeIntoTableCommand
and expressionMergeAction
.MergeIntoCommand
s.MetgeIntoWriter
that allows users to build merges.MetgeIntoWriter
that allows users to build merges.Components 3 and 4 and independent to each other. They both depends on Component 1.
Why are the changes needed?
We need to increase the functionality of Spark Connect to be on par with Classic.
Does this PR introduce any user-facing change?
Yes, new Dataframe APIs are introduced.
How was this patch tested?
Added new tests.
Was this patch authored or co-authored using generative AI tooling?
No.