gaborkaszab commented on code in PR #14640:
URL: https://github.com/apache/iceberg/pull/14640#discussion_r2576261345


##########
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:
   Thanks for taking a look @ajantha-bhat !
   
   To give you some background, one of the reason of this PR is based on [a 
review 
comment](https://docs.google.com/document/d/1H9uYt53Q1_CcOXOfLcr0hXRxvqflg_k_xeVorMLrWbM/edit?pli=1&disco=AAABoDRdYcw)
 I got on my [stats extension 
proposal](https://docs.google.com/document/d/1H9uYt53Q1_CcOXOfLcr0hXRxvqflg_k_xeVorMLrWbM/edit?usp=sharing).
 But other than that, I think it makes sense to have a Scan API for such files 
that is 'builder-like' so extending with later functionality is easy, and also 
in the API similarly to other scan APIs for other file types. This gives more 
compatibility guarantees too.
   What we have now is a utility function in a utility class, that's fine, but 
not that easily extendable (for new functionality, new utils functions with 
permutations on supported functionality in the params has to be introduced), 
while a Scan API is a more flexible design. If you check other file types, they 
also have a scan API for reading. I think it makes sense here.
   Later on we can add functionality for projections and filtering too. This 
particular PR covers the existing functionality as of now.



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