-
Notifications
You must be signed in to change notification settings - Fork 414
refactor partition_summary_limit into SnapshotSummaryCollector constr… #1940
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -272,10 +272,10 @@ class SnapshotSummaryCollector: | |
| partition_metrics: DefaultDict[str, UpdateMetrics] | ||
| max_changed_partitions_for_summaries: int | ||
|
|
||
| def __init__(self) -> None: | ||
| def __init__(self, partition_summary_limit: int = 0) -> None: | ||
| self.metrics = UpdateMetrics() | ||
| self.partition_metrics = defaultdict(UpdateMetrics) | ||
| self.max_changed_partitions_for_summaries = 0 | ||
| self.max_changed_partitions_for_summaries = partition_summary_limit | ||
|
|
||
| def set_partition_summary_limit(self, limit: int) -> None: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe we can deprecate this in favor of the init function
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah, I was thinking about this.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Deprecation means that we first signal the user, see: https://py.iceberg.apache.org/contributing/#api-compatibility, and in the next release, we can remove it. I don't have strong feelings around removing this one. |
||
| self.max_changed_partitions_for_summaries = limit | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
Let's also keep the method below so people that actually use this, won't get any errors: