Skip to content

Combine ManifestReaders into one parameterized class#1099

Merged
danielcweeks merged 1 commit intoapache:masterfrom
rdblue:refactor-manifest-readers
Jun 9, 2020
Merged

Combine ManifestReaders into one parameterized class#1099
danielcweeks merged 1 commit intoapache:masterfrom
rdblue:refactor-manifest-readers

Conversation

@rdblue
Copy link
Contributor

@rdblue rdblue commented Jun 5, 2020

This refactors ManifestReader and DeleteManifestReader into the same parameterized class, ManifestReader<DataFile | DeleteFile>. Using two separate classes didn't match the write side, where there is one ManifestWriter that is parameterized, and prevented code paths from supporting both data and delete files. For example, a class to merge manifests should be agnostic to the type of manifest, as long as either data or delete manifests are consistently merged.

This commit is also included in #1098 because it is required for those changes. I will rebase that commit this is merged first.

throw new UnsupportedOperationException("Cannot write manifest for table version: " + formatVersion);
}

static ManifestReader<?> open(ManifestFile manifest, FileIO io) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that these aren't public.

@rdblue rdblue added this to the Row-level Delete milestone Jun 8, 2020
@danielcweeks
Copy link
Contributor

+1 This looks good to me. I would point out that it's confusing in a number of places where it's necessary to distinguish between deleteManifests and deletedManifests, but I'm not sure what we can do to be more clear about the distinction.

@danielcweeks danielcweeks merged commit 2ac53b3 into apache:master Jun 9, 2020
@rdblue
Copy link
Contributor Author

rdblue commented Jun 9, 2020

I'll start renaming deletedManifests to removedManifests to be more clear. Thanks for pointing this out.

cmathiesen pushed a commit to ExpediaGroup/iceberg that referenced this pull request Aug 19, 2020
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

Comments