Skip to content

Conversation

@gtrettenero
Copy link
Contributor

@gtrettenero gtrettenero commented Jul 11, 2025

Rationale for this change

Adding the snapshot property to keep parity with Java

Are these changes tested?

Yes I modified two of the existing tests to add this property and added an additional two for cases where the table is unchanged or unpartitioned.

Are there any user-facing changes?

Yes, this will add a property to the Snapshot Summaries when partitions are changed.

add tests

add line breaks for consistency

add line breaks for consistency
@gtrettenero gtrettenero force-pushed the add_snapshot_summary_property branch from 1a21a73 to e552828 Compare July 11, 2025 21:35
@bryanck bryanck requested a review from Fokko July 11, 2025 22:23
Copy link
Contributor

@kevinjqliu kevinjqliu left a comment

Choose a reason for hiding this comment

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

properties = self.metrics.to_dict()
changed_partitions_size = len(self.partition_metrics)
set_when_positive(properties, changed_partitions_size, CHANGED_PARTITION_COUNT_PROP)
if changed_partitions_size <= self.max_changed_partitions_for_summaries:
Copy link
Contributor

Choose a reason for hiding this comment

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

i want to point out that java also gate on the trustPartitionMetrics variable

@kevinjqliu kevinjqliu merged commit a7fbfc4 into apache:main Jul 15, 2025
10 checks passed
@kevinjqliu
Copy link
Contributor

Thanks for the PR @gtrettenero and @bryanck for the review :)

gabeiglio pushed a commit to Netflix/iceberg-python that referenced this pull request Aug 13, 2025
<!--
Thanks for opening a pull request!
-->

<!-- In the case this PR will resolve an issue, please replace
${GITHUB_ISSUE_ID} below with the actual Github issue id. -->
<!-- Closes #${GITHUB_ISSUE_ID} -->

# Rationale for this change

Adding the snapshot property to keep parity with
[Java](https://github.com/apache/iceberg/commits/main/core/src/main/java/org/apache/iceberg/SnapshotSummary.java)

# Are these changes tested?

Yes I modified two of the existing tests to add this property and added
an additional two for cases where the table is unchanged or
unpartitioned.

# Are there any user-facing changes?

Yes, this will add a property to the Snapshot Summaries when partitions
are changed.

<!-- In the case of user-facing changes, please add the changelog label.
-->

---------

Co-authored-by: Giorgio Trettenero <gtret@netflix.com>
Co-authored-by: Kevin Liu <kevin.jq.liu@gmail.com>
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