-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[Feature Request][Spark] Add support for Deletion Vectors to Merge #2426
Comments
Is this duplicate of #2296? |
Yes it is. Thanks for pointing out! I will fix it. |
Since the previous one exists... @andreaschat-db could you please use that one (and close this one)? |
@tdas In that case, please update the description of the original ticket and I will close this one. |
I updated the description in that one. and commented that you are implementing this. you can close this now. |
Closing as a duplicate of #2296. |
Feature request
Which Delta project/connector is this regarding?
Overview
This FR is about providing deletion vector support in Merge. It is part of a wider effort to speed up DML operations with Deletion Vectors (DVs). It builds on top of previous work: #1591 and #1923.
Motivation
The current implementation of merge is based on the Copy-on-Write (CoW) approach where touched files are rewritten entirely. This includes both the modified rows as well as the unmodified rows. On the other hand, deletion vectors allow a Merge-on-Read (MoR) approach where we "soft" delete the affected rows in the touched files and only rewrite the modified rows. The "soft" deleted rows are then filtered out on read. This can result into significant performance gains during writes by trading off a small overhead on read. This is because on the most common case merge operations only touch a small portion of data.
Further details
The current implementation implementation of merge consists of 2 jobs:
Job 1
: Finds touched files by joining the source and target tables.Job 2
: Rewrites touched files.The new implementation splits job 2 into two parts: one for writing the modified rows and one for writing the deletion vectors. Overall, merge with DVs consists of the following jobs:
Job 1
: Finds touched files by joining the source and target tables.Job 2.a
: Writes modified and new rows.Job 2.b
: writes deletions vectors for the modified rows.From a performance point of view, the extra job adds some overhead but only operates on the touched files produced by job 1 and only shuffles the columns required by the predicates. Furthermore, jobs
2.a
and2.b
perform stricter joins.Willingness to contribute
The Delta Lake Community encourages new feature contributions. Would you or another member of your organization be willing to contribute an implementation of this feature?
The text was updated successfully, but these errors were encountered: