Skip to content
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

[WIP][core] Add new system table SummaryTable to show table summary information. #4671

Conversation

LinMingQiang
Copy link
Contributor

@LinMingQiang LinMingQiang commented Dec 10, 2024

Purpose

Add new system table SummaryTable to support displaying table summary information. These summaries are what users care more about. This information can also provide convenience to maintainers

+---------------------------+--------------+-------+
|                      name |         type |  null |
+---------------------------+--------------+-------+
|                table_name |       STRING | FALSE |
|                table_path |       STRING | FALSE |
|                table_type |       STRING | FALSE |
|              primary_keys |       STRING |  TRUE |
|            partition_keys |       STRING |  TRUE |
|                   comment |       STRING |  TRUE |
|                 schema_id |       BIGINT | FALSE |
|               bucket_mode |       STRING | FALSE |
|                bucket_num |          INT | FALSE |
|            snapshot_range |       STRING |  TRUE |
|        latest_commit_kind |       STRING |  TRUE |
|                  tag_nums |          INT | FALSE |
|                   options |       STRING |  TRUE |
|            partition_nums |          INT | FALSE |
| max_recordcount_partition |       STRING |  TRUE |
|    max_filenums_partition |       STRING |  TRUE |
|    max_filesize_partition |       STRING |  TRUE |
|                 file_nums |       BIGINT | FALSE |
|                 file_size |       BIGINT | FALSE |
|     estimate_record_count |       BIGINT | FALSE |
|          last_commit_time | TIMESTAMP(3) |  TRUE |
+---------------------------+--------------+-------+
comment : 
max_recordcount_partition : The partition with the most record count.
max_filenums_partition : The partition with the most file nums.
max_filesize_partition : The partition with the most file size.
estimate_record_count:  If the latest snapshot type is COMPACT, this will be exact, otherwise it is slightly larger than the actual value, because these data are not merged.

Show :

+--------------------------------+--------------------------------+--------------------------------+--------------------------------+--------------------------------+--------------------------------+----------------------+--------------------------------+-------------+--------------------------------+--------------------------------+-------------+--------------------------------+----------------+--------------------------------+--------------------------------+--------------------------------+----------------------+----------------------+-----------------------+-------------------------+
|                     table_name |                     table_path |                     table_type |                   primary_keys |                 partition_keys |                        comment |            schema_id |                    bucket_mode |  bucket_num |                 snapshot_range |             latest_commit_kind |    tag_nums |                        options | partition_nums |      max_recordcount_partition |         max_filenums_partition |         max_filesize_partition |            file_nums |            file_size | estimate_record_count |        last_commit_time |
+--------------------------------+--------------------------------+--------------------------------+--------------------------------+--------------------------------+--------------------------------+----------------------+--------------------------------+-------------+--------------------------------+--------------------------------+-------------+--------------------------------+----------------+--------------------------------+--------------------------------+--------------------------------+----------------------+----------------------+-----------------------+-------------------------+
|                      default.T | /var/folders/n8/t55hm8l56wl... |              Primary key table |                ["a","dt","hm"] |                    ["dt","hm"] |                                |                    0 |                     HASH_FIXED |           2 |                          [1,4] |                        COMPACT |           0 | {"bucket":"2","path":"/var/... |              1 | {"partition":"[20240101, 11... | {"partition":"[20240101, 11... | {"partition":"[20240101, 11... |                    1 |                 1379 |                     1 | 2024-12-10 10:55:58.395 |
+--------------------------------+--------------------------------+--------------------------------+--------------------------------+--------------------------------+--------------------------------+----------------------+--------------------------------+-------------+--------------------------------+--------------------------------+-------------+--------------------------------+----------------+--------------------------------+--------------------------------+--------------------------------+----------------------+----------------------+-----------------------+-------------------------+

Tests

API and Format

Documentation

@LinMingQiang
Copy link
Contributor Author

@JingsongLi WDYT

@leaves12138
Copy link
Contributor

leaves12138 commented Dec 10, 2024

Thanks @LinMingQiang , please document it in doc https://paimon.apache.org/docs/master/concepts/system-tables/.

@LinMingQiang
Copy link
Contributor Author

Thanks @LinMingQiang , please document it in doc https://paimon.apache.org/docs/master/concepts/system-tables/.

Thanks for review. Currently completing..

@JingsongLi
Copy link
Contributor

Hi @LinMingQiang , It looks a bit customized, and it would be even better if we could find similar tables in other systems

@LinMingQiang LinMingQiang marked this pull request as draft December 10, 2024 07:38
@LinMingQiang LinMingQiang force-pushed the master-feat-sup-systbl-tableinfo branch from 3001978 to ffc0597 Compare December 11, 2024 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants