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

Add partition stats in snapshot summary #521

Merged
merged 4 commits into from
Mar 18, 2024

Conversation

jqin61
Copy link
Contributor

@jqin61 jqin61 commented Mar 12, 2024

Changes include:

  • add write.summary.partition-limit to table properties
  • add changed-partition-count to snapshot summary
  • add partition stats. these are key value pairs whose key is like partitiion.<partition_key> and whose value is like a nested mini-summary string concatenated by ','.
    For example:
    'partitions.int_field=1': 'added-files-size=1234,removed-files-size=1234,added-data-files=1,deleted-data-files=1,added-records=100,deleted-records=100'

Copy link
Contributor Author

@jqin61 jqin61 left a comment

Choose a reason for hiding this comment

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

@Fokko As we were discussing last time, it looks like the trustPartitionMetrics flag is always set to true in spark, so I ignored the flag. Please let me know the concerns if there is any!

@Fokko
Copy link
Contributor

Fokko commented Mar 12, 2024

@Fokko As we were discussing last time, it looks like the trustPartitionMetrics flag is always set to true in spark, so I ignored the flag. Please let me know the concerns if there is any!

This is correct! It is only affected when we add manifests directly to the manifest list, but that's something we want to avoid (at almost all cost :)

@jqin61 jqin61 force-pushed the partition-stats-of-snapshotsummary branch from dc61893 to cbf1afd Compare March 12, 2024 18:50
Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

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

Small nits @jqin61 Looking good 👍

pyiceberg/table/__init__.py Outdated Show resolved Hide resolved
pyiceberg/table/snapshots.py Outdated Show resolved Hide resolved
pyiceberg/table/snapshots.py Outdated Show resolved Hide resolved
pyiceberg/table/snapshots.py Outdated Show resolved Hide resolved
tests/integration/test_writes.py Show resolved Hide resolved
@Fokko Fokko merged commit c311dac into apache:main Mar 18, 2024
7 checks passed
@Fokko
Copy link
Contributor

Fokko commented Mar 18, 2024

This is great, thanks for working on this @jqin61

@jqin61 jqin61 mentioned this pull request Mar 22, 2024
13 tasks
This pull request was closed.
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