-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-24253][SQL][WIP] Implement DeleteFrom for v2 tables #21888
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Rename CatalogSupport to TableSupport * Rename DataSourceCatalog to TableCatalog * Remove name and database from Table
This is needed for catalyst plans to use catalogs.
This adds a new logical plan, AppendData, that was proposed in SPARK-23521. This also adds an analyzer rule to validate data written with AppendData against the target table. DataFrameWriter is also updated so that v2 writes use the new AppendData logical plan.
This uses the catalog API introduced in SPARK-24252 to implement CTAS and RTAS plans.
|
Test build #93635 has finished for PR 21888 at commit
|
19b83bd to
62f09df
Compare
|
Test build #93641 has finished for PR 21888 at commit
|
62f09df to
f8b178d
Compare
|
Test build #93650 has finished for PR 21888 at commit
|
|
Test build #98986 has finished for PR 21888 at commit
|
|
Test build #113755 has finished for PR 21888 at commit
|
Contributor
|
This is done by #25115, closing this PR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This adds support for DELETE FROM in SQL using the new DeleteFrom logical plan and v2 DeleteSupport mix-in.
To identify the v2 table to delete data from, this uses the TableCatalog API introduced in #21306.
TableIdentifier has been updated with a new superclass, CatalogTableIdentifier. Code paths that don't support identifiers with a catalog continue to use TableIdentifier, allowing a smooth transition even though some code assumes there is no support for multiple catalogs.
UnresovledRelation now supports CatalogTableIdentifier, but resolution will only happen when the catalog is not defined or through a new rule with support for v2 TableCatalog. Existing uses of UnresolvedRelation access the catalog using tableIdentifier, which asserts that the catalog is not defined before returning to ensure catalog identifiers don't leak to code without catalog support.
WIP: This is based on #21306, #21305, and #21877 and includes the changes from those PRs.
How was this patch tested?
WIP, will add tests.