-
Notifications
You must be signed in to change notification settings - Fork 435
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
GH-473: Add shredding version #474
Open
emkornfield
wants to merge
1
commit into
apache:master
Choose a base branch
from
emkornfield:add_shredding_version
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+5
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about encoding version? If we include the encoding version, that would help us change it in the future. For shredding, do we want to have a single version that includes shredding or a separate version for shredding?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
encoding version is already embedded in metadata, so I thought wouldn't be needed here. Shredding version is only encoded implicitly based on the spec without this.
I think shredding should probably evolve differently from encoding (hopefully we won't need to evolve any for some time). But shredding seems like we need at least some more experimentation to determine if there are other forms that might be better.
I might not be fully understanding the question here though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would that mean that we allow mixed versions based on the metadata for each record? That seems like unnecessary complication to me. And it also means that older clients would fail at read time when they encounter a newer record, rather than failing quickly at the schema check stage.
I think it makes sense to put the encoding version here and expect uniform encoding throughout a Parquet file. Writers should produce the latest encoding, not carry records through.
For the shredding question, I would rather have one version of variant instead of evolving them separately. I think that would get confusing and there would be dependencies between them. For example, can you shred a type defined by a newer version of the encoding? Probably not, so bumping the encoding version also requires bumping the shredding version. So is it worth it to have one version number that can increase independently? I would combine them into a single variant version for shredding and encoding.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In discussions on footer optimization most of the community seemed to lean towards not putting in extra metadata to allow for quick failure. Putting this value in the schema I think also disallows simple merging of non-shredded values between two different versions (and as a strong indication that the variant is shredded, I think it is an interesting API consideration on whether we separate API for interrogating shredded columns or return the schema "as is"). The reason I want to version the shredding is to ensure we aren't reliant on detecting column name differences to determine version but maybe even this is premature.
We can add it but I think it is just as reasonable require if there is ever a V2, that all values within a row group are consistent which I think gives uniformity at a reasonable level?
Right, but I don't think the inverse is true, it is likely we can have different shredding versions based on the same binary encoded format which is why I think versioning them separately makes sense.