Skip to content

Conversation

@rdblue
Copy link
Contributor

@rdblue rdblue commented Dec 5, 2018

No description provided.

@rdblue
Copy link
Contributor Author

rdblue commented Dec 5, 2018

@danielcweeks, can you review this?

TableMetadata updated = internalApply();
ops.commit(base, updated);
// only commit the updated metadata if at least one snapshot was removed
if (updated.snapshots().size() != base.snapshots().size()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be more precise to check for if (updated.snapshots().size() < base.snapshots().size())?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think those two checks are functionally equivalent for this check. This is to effectively check that the number of snapshots has not changed. I would err on the side of equality as the proposed change would conceptually mean that you could increase the number of snapshots, which would not be expected in this case.

@danielcweeks
Copy link
Contributor

+1

@rdblue rdblue merged commit 8713fb3 into apache:master Dec 6, 2018
@rdblue
Copy link
Contributor Author

rdblue commented Dec 6, 2018

Thanks for the reviews!

rdsr pushed a commit to rdsr/incubator-iceberg that referenced this pull request Mar 13, 2020
…e#10)

Add custom hive catalog to not override existing Hive metadata

Fail early with a proper exception if the metadata file is not existing

Simplify CustomHiveCatalog (apache#22)
HotSushi pushed a commit to HotSushi/iceberg that referenced this pull request Jul 31, 2020
Hive Catalog: Add a hive catalog that does not override existing Hive metadata (apache#10)

Add custom hive catalog to not override existing Hive metadata

Fail early with a proper exception if the metadata file is not existing

Simplify CustomHiveCatalog (apache#22)
bkahloon pushed a commit to bkahloon/iceberg that referenced this pull request Feb 27, 2021
… metadata (apache#10)

Add custom hive catalog to not override existing Hive metadata

Fail early with a proper exception if the metadata file is not existing

Simplify CustomHiveCatalog (apache#22)
puchengy added a commit to puchengy/iceberg that referenced this pull request Dec 20, 2022
The CI is failing because a new version of mypy
has been released yesterday:
https://pypi.org/project/mypy/0.982/

(cherry picked from commit 2868871)

Co-authored-by: Fokko Driesprong <fokko@apache.org>
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