ajantha-bhat commented on code in PR #14640:
URL: https://github.com/apache/iceberg/pull/14640#discussion_r2559769958


##########
api/src/main/java/org/apache/iceberg/Table.java:
##########
@@ -83,6 +83,18 @@ default IncrementalChangelogScan 
newIncrementalChangelogScan() {
     throw new UnsupportedOperationException("Incremental changelog scan is not 
supported");
   }
 
+  /**
+   * Create a new {@link PartitionStatisticsScan} for this table.
+   *
+   * <p>Once a partition statistics scan is created, it can be refined to 
project columns and filter
+   * data.
+   *
+   * @return a partition statistics scan for this table
+   */
+  default PartitionStatisticsScan newPartitionStatisticsScan() {

Review Comment:
   Do we really need this method here? 
   
   Why can't we have this method in `PartitionStatsHandler`? 
`PartitionStatsHandler.scanPartitionStatistics` that accepts filter, project 
and snapshot id and returns the `PartitionStatisticsScan`
   
   Because, the write functionality still depends on `PartitionStatsHandler` 
class and if we keep a static method for scan there, it will be less disruptive 
change. Just for scan API, moving the classes to different module seems like an 
overkill to me. 
   
   If I understand correctly, the previous implementation was not having an 
option to filter the output. We can just add that functionality without a major 
refactoring? 



-- 
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]

Reply via email to