Skip to content

[PROTOCOL RFC][FOLLOW-UP] Variant Shredding #4714

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 2 commits into
base: master
Choose a base branch
from

Conversation

harshmotw-db
Copy link
Contributor

@harshmotw-db harshmotw-db commented Jun 5, 2025

Which Delta project/connector is this regarding?

  • Spark
  • Standalone
  • Flink
  • Kernel
  • Other (Protocol RFC)

Description

This PR adds a requirement to the Variant Shredding Protocol RFC for writers to add the variantShredding table feature when enabling the enableVariantShredding table property. This way, writers can assume that the enablement of the table property implies the existence of the table feature, and can safely write shredded data.

How was this patch tested?

N/A

Does this PR introduce any user-facing changes?

N/A

@harshmotw-db harshmotw-db marked this pull request as ready for review June 5, 2025 20:29
@harshmotw-db
Copy link
Contributor Author

@bart-samwel @gene-db Can you look at this PR, thanks!

Copy link
Contributor

@gene-db gene-db left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Co-authored-by: Gene Pang <77996944+gene-db@users.noreply.github.com>
@harshmotw-db harshmotw-db requested a review from gene-db June 5, 2025 22:20
@@ -36,7 +36,8 @@ typed_value | * | (optional) This can be any Parquet type, representing the data
## Writer Requirements for Variant Shredding

When Variant Shredding is supported (`writerFeatures` field of a table's `protocol` action contains `variantShredding`), writers:
- must respect the `delta.enableVariantShredding` table property configuration. If `delta.enableVariantShredding=false`, a column of type `variant` must not be written as a shredded Variant, but as an unshredded Variant. If `delta.enableVariantShredding=true`, the writer can choose to shred a Variant column according to the [Parquet Variant Shredding specification](https://github.com/apache/parquet-format/blob/master/VariantShredding.md)
- must respect the `delta.enableVariantShredding` table property configuration. If `delta.enableVariantShredding=false`, a column of type `variant` must not be written as a shredded Variant, but as an unshredded Variant. If `delta.enableVariantShredding=true`, the writer can choose to shred a Variant column according to the [Parquet Variant Shredding specification](https://github.com/apache/parquet-format/blob/master/VariantShredding.md).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either this, or require that the setting must be exactly "true" or "false" or unset. I think requiring that might lead to more annoyances.

Suggested change
- must respect the `delta.enableVariantShredding` table property configuration. If `delta.enableVariantShredding=false`, a column of type `variant` must not be written as a shredded Variant, but as an unshredded Variant. If `delta.enableVariantShredding=true`, the writer can choose to shred a Variant column according to the [Parquet Variant Shredding specification](https://github.com/apache/parquet-format/blob/master/VariantShredding.md).
- must respect the `delta.enableVariantShredding` table property configuration. If `delta.enableVariantShredding` is not present or if it is set to any value other than `true`, a column of type `variant` must not be written as a shredded Variant, but as an unshredded Variant. If `delta.enableVariantShredding=true`, the writer can choose to shred a Variant column according to the [Parquet Variant Shredding specification](https://github.com/apache/parquet-format/blob/master/VariantShredding.md).

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.

3 participants