pvary commented on code in PR #12629:
URL: https://github.com/apache/iceberg/pull/12629#discussion_r2016267334
##########
core/src/main/java/org/apache/iceberg/PartitionStatsUtil.java:
##########
@@ -45,22 +49,53 @@ private PartitionStatsUtil() {}
* @param table the table for which partition stats to be computed.
* @param snapshot the snapshot for which partition stats is computed.
* @return the collection of {@link PartitionStats}
+ * @deprecated since 1.9.0, will be removed in 1.10.0; use {@link
#computeStats(Table, Snapshot,
+ * Snapshot)} instead.
*/
+ @Deprecated
Review Comment:
I have to think about this, but I don't really like API methods where `null`
means specific handling.
My gut tells me, that we need:
```
// full recompute
public static Collection<PartitionStats> computeStats(Table table, Snapshot
snapshot) {
// Precondition checks - everything should be set
```
and
```
// incremental recompute
public static Collection<PartitionStats> computeStats(Table table, Snapshot
fromSnapshot, Snapshot currentSnapshot) {
// Precondition checks - everything should be set
```
and
```
private static Collection<PartitionStats> computeStats(Table table,
Function<ManifestFile, Boolean> filter) {
```
We might even fail, if we don't find the pervious stats when
`computeStats(Table, Snapshot, Snapshot) is called.
But let me think about this a bit.
What do you think?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]