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


##########
docs/docs/spark-procedures.md:
##########
@@ -974,6 +974,38 @@ Collect statistics of the snapshot with id `snap1` of 
table `my_table` for colum
 CALL catalog_name.system.compute_table_stats(table => 'my_table', snapshot_id 
=> 'snap1', columns => array('col1', 'col2'));
 ```
 
+## Partition Statistics
+
+### `compute_partition_stats`
+
+This procedure computes the [partition 
stats](../../spec.md#partition-statistics) incrementally from the last snapshot 
that has a `PartitionStatisticsFile` 
+until the given snapshot (uses current snapshot if not specified) and writes 
the combined result into a `PartitionStatisticsFile`. 
+It performs a full compute if the previous partition statistics file does not 
exist. It also registers the 
+`PartitionStatisticsFile` to the table metadata.
+
+| Argument Name | Required? | Type          | Description                      
                                              |
+|---------------|-----------|---------------|--------------------------------------------------------------------------------|
+| `table`       | ✔️        | string        | Name of the table                
                                              |
+| `snapshot_id` |           | string        | Id of the snapshot to compute 
partition stats. Defaults to current snapshot id |
+
+#### Output
+
+| Output Name       | Type   | Description                                     
         |
+|-------------------|--------|----------------------------------------------------------|
+| `partition_statistics_file` | string | Path to the partition stats file 
created from by command |
+
+#### Examples
+
+Collect partition statistics of the latest snapshot of table `my_table`
+```sql
+CALL catalog_name.system.compute_partition_stats('my_table');
+```
+
+Collect partition statistics of the snapshot with id `snap1` of table 
`my_table`
+```sql
+CALL catalog_name.system.compute_partition_stats(table => 'my_table', 
snapshot_id => 'snap1' );

Review Comment:
   done. 



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