-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[Enhancement] add information_schema.table_options(#32572) #34384
Conversation
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
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.
clang-tidy made some suggestions
run buildall |
TPC-DS: Total hot run time: 185670 ms
|
TeamCity be ut coverage result: |
e5ff1de
to
87d155e
Compare
run buildall |
TeamCity be ut coverage result: |
TPC-DS: Total hot run time: 188033 ms
|
run buildall |
TeamCity be ut coverage result: |
TPC-DS: Total hot run time: 187819 ms
|
run buildall |
TeamCity be ut coverage result: |
TPC-H: Total hot run time: 41778 ms
|
TPC-DS: Total hot run time: 185086 ms
|
What is the meaning of TABLE_SCHEMA? |
great job. BTW, should we put properties in json format? |
DISTRIBUTE_KEY, TABLE_MODEL(agg unique, dup) should also in the table. |
Actually, we should show all messages in create table. |
Please add the document in doris-website and link 2 prs. |
databases to which table belongs. |
DISTRIBUTE_KEY already have added. Actually, we should show all messages in create table. // currently table_options working for OlapTable. should i consider for broker and mysql type also? |
Ok. can you please give me example for any column we print in json format as reference? thanks |
properties. `PROPERTIES: min_load_replica_num = -1, data_sort.col_num = 6, group_commit_interval_ms = 10000, data_sort.sort_type = LEXICAL, is_being_synced = false, binlog.enable = false, binlog.ttl_seconds = 86400, inverted_index_storage_format = V1, time_series_compaction_empty_rowsets_threshold = 5, default.replication_allocation = tag.location.default: 1, time_series_compaction_level_threshold = 1, time_series_compaction_time_threshold_seconds = 3600, storage_format = V2, store_row_column = false, light_schema_change = true, enable_unique_key_merge_on_write = false, in_memory = false, file_cache_ttl_seconds = 0, group_commit_data_bytes = 134217728, compaction_policy = size_based, _auto_bucket = false, binlog.max_history_nums = 9223372036854775807, time_series_compaction_file_count_threshold = 2000, skip_write_index_on_load = false, disable_auto_compaction = false, time_series_compaction_goal_size_mbytes = 1024, storage_medium = HDD, enable_single_replica_compaction = false, compression = LZ4F, binlog.max_bytes = 9223372036854775807
|
PR approved by anyone and no changes requested. |
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.
LGTM
run buildall |
run buildall |
run buildall |
TPC-H: Total hot run time: 40198 ms
|
TPC-DS: Total hot run time: 172383 ms
|
TeamCity be ut coverage result: |
ClickBench: Total hot run time: 30.32 s
|
PR approved by at least one committer and no changes requested. |
## Proposed changes Issue Number: close #32572 Support table_options in information_schema. UT result: mysql> select * from information_schema.table_options where table_schema="test_table_options_db"\G *************************** 1. row *************************** TABLE_NAME: rangetable TABLE_CATALOG: internal TABLE_SCHEMA: test_table_options_db DISTRIBUTE_KEY: user_id DISTRIBUTE_TYPE: HASH BUCKETS_NUM: 8 PARTITION_NUM: 3 PROPERTIES: min_load_replica_num = -1, data_sort.col_num = 6, group_commit_interval_ms = 10000, data_sort.sort_type = LEXICAL, is_being_synced = false, binlog.enable = false, binlog.ttl_seconds = 86400, inverted_index_storage_format = V1, time_series_compaction_empty_rowsets_threshold = 5, default.replication_allocation = tag.location.default: 1, time_series_compaction_level_threshold = 1, time_series_compaction_time_threshold_seconds = 3600, storage_format = V2, store_row_column = false, light_schema_change = true, enable_unique_key_merge_on_write = false, in_memory = false, file_cache_ttl_seconds = 0, group_commit_data_bytes = 134217728, compaction_policy = size_based, _auto_bucket = false, binlog.max_history_nums = 9223372036854775807, time_series_compaction_file_count_threshold = 2000, skip_write_index_on_load = false, disable_auto_compaction = false, time_series_compaction_goal_size_mbytes = 1024, storage_medium = HDD, enable_single_replica_compaction = false, compression = LZ4F, binlog.max_bytes = 9223372036854775807 *************************** 2. row *************************** TABLE_NAME: listtable TABLE_CATALOG: internal TABLE_SCHEMA: test_table_options_db DISTRIBUTE_KEY: user_id DISTRIBUTE_TYPE: HASH BUCKETS_NUM: 16 PARTITION_NUM: 3 PROPERTIES: min_load_replica_num = -1, data_sort.col_num = 6, group_commit_interval_ms = 10000, data_sort.sort_type = LEXICAL, is_being_synced = false, binlog.enable = false, binlog.ttl_seconds = 86400, inverted_index_storage_format = V1, time_series_compaction_empty_rowsets_threshold = 5, default.replication_allocation = tag.location.default: 1, time_series_compaction_level_threshold = 1, time_series_compaction_time_threshold_seconds = 3600, storage_format = V2, store_row_column = false, light_schema_change = true, enable_unique_key_merge_on_write = false, in_memory = false, file_cache_ttl_seconds = 0, group_commit_data_bytes = 134217728, compaction_policy = size_based, _auto_bucket = false, binlog.max_history_nums = 9223372036854775807, time_series_compaction_file_count_threshold = 2000, skip_write_index_on_load = false, disable_auto_compaction = false, time_series_compaction_goal_size_mbytes = 1024, storage_medium = HDD, enable_single_replica_compaction = false, compression = LZ4F, binlog.max_bytes = 9223372036854775807 *************************** 3. row *************************** TABLE_NAME: randomtable TABLE_CATALOG: internal TABLE_SCHEMA: test_table_options_db DISTRIBUTE_KEY: RANDOM DISTRIBUTE_TYPE: RANDOM BUCKETS_NUM: 16 PARTITION_NUM: 1 PROPERTIES: min_load_replica_num = -1, data_sort.col_num = 3, group_commit_interval_ms = 10000, data_sort.sort_type = LEXICAL, is_being_synced = false, binlog.enable = false, binlog.ttl_seconds = 86400, inverted_index_storage_format = V1, time_series_compaction_empty_rowsets_threshold = 5, default.replication_allocation = tag.location.default: 1, time_series_compaction_level_threshold = 1, time_series_compaction_time_threshold_seconds = 3600, storage_format = V2, store_row_column = false, light_schema_change = true, enable_unique_key_merge_on_write = false, in_memory = false, file_cache_ttl_seconds = 0, group_commit_data_bytes = 134217728, compaction_policy = size_based, _auto_bucket = false, binlog.max_history_nums = 9223372036854775807, time_series_compaction_file_count_threshold = 2000, skip_write_index_on_load = false, disable_auto_compaction = false, time_series_compaction_goal_size_mbytes = 1024, storage_medium = HDD, enable_single_replica_compaction = false, compression = LZ4F, binlog.max_bytes = 9223372036854775807 3 rows in set (0.03 sec) ## Further comments If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc... --------- Co-authored-by: Gavin Chou <gavineaglechou@gmail.com> Co-authored-by: Xinyi Zou <zouxinyi02@gmail.com>
#40687) backport #40568 #40455 #40456 #40153 #34384 Test result: 2024-09-11 11:00:45.618 INFO [suite-thread-1] (SuiteContext.groovy:309) - Recover original connection 2024-09-11 11:00:45.619 INFO [suite-thread-1] (Suite.groovy:359) - Execute sql: REVOKE SELECT_PRIV ON test_partitions_schema_db.duplicate_table FROM partitions_user 2024-09-11 11:00:45.625 INFO [suite-thread-1] (SuiteContext.groovy:299) - Create new connection for user 'partitions_user' 2024-09-11 11:00:45.632 INFO [suite-thread-1] (Suite.groovy:1162) - Execute tag: select_check_5, sql: select TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,PARTITION_NAME,SUBPARTITION_NAME,PARTITION_ORDINAL_POSITION,SUBPARTITION_ORDINAL_POSITION,PARTITION_METHOD,SUBPARTITION_METHOD,PARTITION_EXPRESSION,SUBPARTITION_EXPRESSION,PARTITION_DESCRIPTION,TABLE_ROWS,AVG_ROW_LENGTH,DATA_LENGTH,MAX_DATA_LENGTH,INDEX_LENGTH,DATA_FREE,CHECKSUM,PARTITION_COMMENT,NODEGROUP,TABLESPACE_NAME from information_schema.partitions where table_schema="test_partitions_schema_db" order by TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,PARTITION_NAME,SUBPARTITION_NAME,PARTITION_ORDINAL_POSITION,SUBPARTITION_ORDINAL_POSITION,PARTITION_METHOD,SUBPARTITION_METHOD,PARTITION_EXPRESSION,SUBPARTITION_EXPRESSION,PARTITION_DESCRIPTION,TABLE_ROWS,AVG_ROW_LENGTH,DATA_LENGTH,MAX_DATA_LENGTH,INDEX_LENGTH,DATA_FREE,CHECKSUM,PARTITION_COMMENT,NODEGROUP,TABLESPACE_NAME 2024-09-11 11:00:45.644 INFO [suite-thread-1] (SuiteContext.groovy:309) - Recover original connection 2024-09-11 11:00:45.645 INFO [suite-thread-1] (ScriptContext.groovy:120) - Run test_partitions_schema in /root/doris/workspace/doris/regression-test/suites/query_p0/system/test_partitions_schema.groovy succeed 2024-09-11 11:00:45.652 INFO [main] (RegressionTest.groovy:259) - Start to run single scripts 2024-09-11 11:01:10.321 INFO [main] (RegressionTest.groovy:380) - Success suites: /root/doris/workspace/doris/regression-test/suites/query_p0/system/test_partitions_schema.groovy: group=default,p0, name=test_partitions_schema 2024-09-11 11:01:10.322 INFO [main] (RegressionTest.groovy:459) - All suites success. ____ _ ____ ____ _____ ____ | _ \ / \ / ___/ ___|| ____| _ \ | |_) / _ \ \___ \___ \| _| | | | | | __/ ___ \ ___) |__) | |___| |_| | |_| /_/ \_\____/____/|_____|____/ 2024-09-11 11:01:10.322 INFO [main] (RegressionTest.groovy:410) - Test 1 suites, failed 0 suites, fatal 0 scripts, skipped 0 scripts 2024-09-11 11:01:10.322 INFO [main] (RegressionTest.groovy:119) - Test finished 2024-09-11 11:03:00.712 INFO [suite-thread-1] (Suite.groovy:1162) - Execute tag: select_check_5, sql: select * from information_schema.table_options ORDER BY TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,TABLE_MODEL,TABLE_MODEL_KEY,DISTRIBUTE_KEY,DISTRIBUTE_TYPE,BUCKETS_NUM,PARTITION_NUM; 2024-09-11 11:03:00.729 INFO [suite-thread-1] (SuiteContext.groovy:309) - Recover original connection 2024-09-11 11:03:00.731 INFO [suite-thread-1] (ScriptContext.groovy:120) - Run test_table_options in /root/doris/workspace/doris/regression-test/suites/query_p0/system/test_table_options.groovy succeed 2024-09-11 11:03:04.817 INFO [main] (RegressionTest.groovy:259) - Start to run single scripts 2024-09-11 11:03:28.741 INFO [main] (RegressionTest.groovy:380) - Success suites: /root/doris/workspace/doris/regression-test/suites/query_p0/system/test_table_options.groovy: group=default,p0, name=test_table_options 2024-09-11 11:03:28.742 INFO [main] (RegressionTest.groovy:459) - All suites success. ____ _ ____ ____ _____ ____ | _ \ / \ / ___/ ___|| ____| _ \ | |_) / _ \ \___ \___ \| _| | | | | | __/ ___ \ ___) |__) | |___| |_| | |_| /_/ \_\____/____/|_____|____/ 2024-09-11 11:03:28.742 INFO [main] (RegressionTest.groovy:410) - Test 1 suites, failed 0 suites, fatal 0 scripts, skipped 0 scripts 2024-09-11 11:03:28.742 INFO [main] (RegressionTest.groovy:119) - Test finished *************************** 7. row *************************** PartitionId: 18035 PartitionName: p100 VisibleVersion: 2 VisibleVersionTime: 2024-09-11 10:59:28 State: NORMAL PartitionKey: col_1 Range: [types: [INT]; keys: [83647]; ..types: [INT]; keys: [2147483647]; ) DistributionKey: pk Buckets: 10 ReplicationNum: 1 StorageMedium: HDD CooldownTime: 9999-12-31 15:59:59 RemoteStoragePolicy: LastConsistencyCheckTime: NULL DataSize: 2.872 KB IsInMemory: false ReplicaAllocation: tag.location.default: 1 IsMutable: true SyncWithBaseTables: true UnsyncTables: NULL CommittedVersion: 2 RowCount: 4 7 rows in set (0.01 sec) --------- Co-authored-by: Mingyu Chen <morningman.cmy@gmail.com>
Proposed changes
Issue Number: close #32572
Support table_options in information_schema.
UT result:
mysql> select * from information_schema.table_options where table_schema="test_table_options_db"\G
*************************** 1. row ***************************
TABLE_NAME: rangetable
TABLE_CATALOG: internal
TABLE_SCHEMA: test_table_options_db
DISTRIBUTE_KEY: user_id
DISTRIBUTE_TYPE: HASH
BUCKETS_NUM: 8
PARTITION_NUM: 3
PROPERTIES: min_load_replica_num = -1, data_sort.col_num = 6, group_commit_interval_ms = 10000, data_sort.sort_type = LEXICAL, is_being_synced = false, binlog.enable = false, binlog.ttl_seconds = 86400, inverted_index_storage_format = V1, time_series_compaction_empty_rowsets_threshold = 5, default.replication_allocation = tag.location.default: 1, time_series_compaction_level_threshold = 1, time_series_compaction_time_threshold_seconds = 3600, storage_format = V2, store_row_column = false, light_schema_change = true, enable_unique_key_merge_on_write = false, in_memory = false, file_cache_ttl_seconds = 0, group_commit_data_bytes = 134217728, compaction_policy = size_based, _auto_bucket = false, binlog.max_history_nums = 9223372036854775807, time_series_compaction_file_count_threshold = 2000, skip_write_index_on_load = false, disable_auto_compaction = false, time_series_compaction_goal_size_mbytes = 1024, storage_medium = HDD, enable_single_replica_compaction = false, compression = LZ4F, binlog.max_bytes = 9223372036854775807
*************************** 2. row ***************************
TABLE_NAME: listtable
TABLE_CATALOG: internal
TABLE_SCHEMA: test_table_options_db
DISTRIBUTE_KEY: user_id
DISTRIBUTE_TYPE: HASH
BUCKETS_NUM: 16
PARTITION_NUM: 3
PROPERTIES: min_load_replica_num = -1, data_sort.col_num = 6, group_commit_interval_ms = 10000, data_sort.sort_type = LEXICAL, is_being_synced = false, binlog.enable = false, binlog.ttl_seconds = 86400, inverted_index_storage_format = V1, time_series_compaction_empty_rowsets_threshold = 5, default.replication_allocation = tag.location.default: 1, time_series_compaction_level_threshold = 1, time_series_compaction_time_threshold_seconds = 3600, storage_format = V2, store_row_column = false, light_schema_change = true, enable_unique_key_merge_on_write = false, in_memory = false, file_cache_ttl_seconds = 0, group_commit_data_bytes = 134217728, compaction_policy = size_based, _auto_bucket = false, binlog.max_history_nums = 9223372036854775807, time_series_compaction_file_count_threshold = 2000, skip_write_index_on_load = false, disable_auto_compaction = false, time_series_compaction_goal_size_mbytes = 1024, storage_medium = HDD, enable_single_replica_compaction = false, compression = LZ4F, binlog.max_bytes = 9223372036854775807
*************************** 3. row ***************************
TABLE_NAME: randomtable
TABLE_CATALOG: internal
TABLE_SCHEMA: test_table_options_db
DISTRIBUTE_KEY: RANDOM
DISTRIBUTE_TYPE: RANDOM
BUCKETS_NUM: 16
PARTITION_NUM: 1
PROPERTIES: min_load_replica_num = -1, data_sort.col_num = 3, group_commit_interval_ms = 10000, data_sort.sort_type = LEXICAL, is_being_synced = false, binlog.enable = false, binlog.ttl_seconds = 86400, inverted_index_storage_format = V1, time_series_compaction_empty_rowsets_threshold = 5, default.replication_allocation = tag.location.default: 1, time_series_compaction_level_threshold = 1, time_series_compaction_time_threshold_seconds = 3600, storage_format = V2, store_row_column = false, light_schema_change = true, enable_unique_key_merge_on_write = false, in_memory = false, file_cache_ttl_seconds = 0, group_commit_data_bytes = 134217728, compaction_policy = size_based, _auto_bucket = false, binlog.max_history_nums = 9223372036854775807, time_series_compaction_file_count_threshold = 2000, skip_write_index_on_load = false, disable_auto_compaction = false, time_series_compaction_goal_size_mbytes = 1024, storage_medium = HDD, enable_single_replica_compaction = false, compression = LZ4F, binlog.max_bytes = 9223372036854775807
3 rows in set (0.03 sec)
Further comments
If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...