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

Protocol version downgrade support in Delta Tables #2061

Closed
wants to merge 5 commits into from

Conversation

andreaschat-db
Copy link
Contributor

@andreaschat-db andreaschat-db commented Sep 15, 2023

Which Delta project/connector is this regarding?

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

Description

Currently, we support Protocol downgrade in the form of feature removal but downgrading protocol versions is not possible. This PR adds support for protocol version downgrade. This is only allowed for tables that support either reader+writer table features or writer table features. The protocol downgrade takes place when the user removes a table feature and there are no non-legacy table features left in the table. The protocol is downgraded to the minimum reader/writer versions required to support all enabled legacy features.

For example, Protocol(3, 7, readerFeatures=(DeletionVectors), writerFeatures=(DeletionVectors, ChangeDataFeed) is downgraded to Protocol(1, 4) after removing the DeletionVectors table feature.

How was this patch tested?

Added tests in DeltaProtocolVersionSuite and DeltaTableFeatureSuite.

Does this PR introduce any user-facing changes?

The protocol versions are downgraded when there are non-legacy features in the table.

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.

2 participants