-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Docs: Document compute_partition_stats procedure #13532
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 1 commit
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 |
|---|---|---|
|
|
@@ -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 stats incrementally from the last snapshot that has partition stats file until the given | ||
| snapshot (uses current snapshot if not specified) and writes the combined result into a `PartitionStatisticsFile` | ||
| after merging the partition stats. Does a full compute if previous statistics file does not exist. Also registers the | ||
|
Member
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. Nit: |
||
| `PartitionStatisticsFile` to table metadata. | ||
|
Member
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. nit: |
||
|
|
||
| | Argument Name | Required? | Type | Description | | ||
| |---------------|-----------|---------------|-------------------------------------| | ||
| | `table` | ✔️ | string | Name of the table | | ||
| | `snapshot_id` | | string | Id of the snapshot to collect stats | | ||
|
Member
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. describe optional behavior |
||
|
|
||
| #### Output | ||
|
|
||
| | Output Name | Type | Description | | ||
| |-------------------|--------|-------------------------------------------------| | ||
| | `partition_statistics_file` | string | Path to stats file created from by this command | | ||
|
|
||
| #### Examples | ||
|
|
||
| Collect statistics of the latest snapshot of table `my_table` | ||
|
Member
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. should it be 'partition stats' to clarify |
||
| ```sql | ||
| CALL catalog_name.system.compute_partition_stats('my_table'); | ||
| ``` | ||
|
|
||
| Collect 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' ); | ||
|
Member
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. small nit: extra space at end.
Member
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. done. |
||
| ``` | ||
|
|
||
| ## Table Replication | ||
|
|
||
| The `rewrite_table_path` procedure prepares an Iceberg table for copying to another location. | ||
|
|
||
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.
why do we have 'partitionStatisticsFile' in some place and not in the first place?