Skip to content

[SPARK-52326][SQL] Add partitions related ExternalCatalogEvent and post them in corresponding operations #51030

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

waterlx
Copy link

@waterlx waterlx commented May 27, 2025

What changes were proposed in this pull request?

  1. Add Partitions related events, for the following external catalog operations: create / drop / alter / rename. A base "PartitionsEvent" is added by extending "TableEvent". One "PartitionsEvent" (and its subs) could contain the operation for one or more partitions. So it is named as "PartitionsEvent" in plural form, so are its subs.

  2. Post those events in the corresponding external catalog operations

Why are the changes needed?

The operation list extracted from Spark events are of great help for user to summarize what have been done against a db/table/function/partition, for the purpose of logging and/or auditing.
In ExternalCatalogWithListener, there are events posted against db, table and function for all registered listeners. But an operation against operation does not have its event posted.

Does this PR introduce any user-facing change?

With this change, partition related operations are posted into register listener as events

How was this patch tested?

Enrich UT and also tested on local cluster

Was this patch authored or co-authored using generative AI tooling?

No

@github-actions github-actions bot added the SQL label May 27, 2025
@waterlx waterlx changed the title Add partition related ExternalCatalogEvent and post them in external catalog related operations Add partitions related ExternalCatalogEvent and post them in external catalog related operations May 27, 2025
@waterlx waterlx changed the title Add partitions related ExternalCatalogEvent and post them in external catalog related operations Add partitions related ExternalCatalogEvent and post them in corresponding operations May 27, 2025
@waterlx
Copy link
Author

waterlx commented May 27, 2025

@gatorsmile @dongjoon-hyun Can you help to review this PR? Thanks!

@waterlx waterlx changed the title Add partitions related ExternalCatalogEvent and post them in corresponding operations [SPARK-52326][SQL] Add partitions related ExternalCatalogEvent and post them in corresponding operations May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant