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

[Spark] Support committing multiple column changes in one txn #4186

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

Conversation

ctring
Copy link
Contributor

@ctring ctring commented Feb 25, 2025

Which Delta project/connector is this regarding?

  • Spark
  • Standalone
  • Flink
  • Kernel
  • Other (fill in here)

Description

The DeltaCatalog::alterTable accepts a list of table changes. However, we are currently committing the column changes in separate transactions. This PR does the following refactoring:

  • introduces DeltaChangeColumnSpec as arguments to AlterTableChangeColumnDeltaCommand so that we can pass multiple changes and commit them in one transaction.
  • updates DeltaCatalog::alterTable to collect the column changes into DeltaChangeColumnSpec
  • for SYNC IDENITY, DeltaCatalog::alterTable previously has a single syncIdentity variable for all table changes to denote whether to run sync identity or not. This PR fixes that and record the sync identity parameter separately for each column.

How was this patch tested?

Existing unit tests

Does this PR introduce any user-facing changes?

No

@ctring ctring changed the title Support committing multiple column changes in one txn [Spark] Support committing multiple column changes in one txn Feb 25, 2025
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.

1 participant