Skip to content

Conversation

@Vallishp
Copy link
Contributor

@Vallishp Vallishp commented Sep 5, 2024

Proposed changes

Issue Number: close #xxx

add row count in show partitions.

mysql> show partitions from test_range_table;
+-------------+---------------+----------------+---------------------+--------+--------------+---------------------------------------------------------------------+-----------------+---------+----------------+---------------+---------------------+---------------------+--------------------------+-----------+------------+-------------------------+-----------+--------------------+--------------+------------------+----------+
| PartitionId | PartitionName | VisibleVersion | VisibleVersionTime | State | PartitionKey | Range | DistributionKey | Buckets | ReplicationNum | StorageMedium | CooldownTime | RemoteStoragePolicy | LastConsistencyCheckTime | DataSize | IsInMemory | ReplicaAllocation | IsMutable | SyncWithBaseTables | UnsyncTables | CommittedVersion | RowCount |
+-------------+---------------+----------------+---------------------+--------+--------------+---------------------------------------------------------------------+-----------------+---------+----------------+---------------+---------------------+---------------------+--------------------------+-----------+------------+-------------------------+-----------+--------------------+--------------+------------------+----------+
| 27012 | p0 | 2 | 2024-09-03 11:56:13 | NORMAL | col_1 | [types: [INT]; keys: [-2147483648]; ..types: [INT]; keys: [4]; ) | pk | 10 | 1 | HDD | 9999-12-31 15:59:59 | | NULL | 5.594 KB | false | tag.location.default: 1 | true | true | NULL | 2 | 9 |
| 27013 | p1 | 2 | 2024-09-03 11:56:13 | NORMAL | col_1 | [types: [INT]; keys: [4]; ..types: [INT]; keys: [6]; ) | pk | 10 | 1 | HDD | 9999-12-31 15:59:59 | | NULL | 1.874 KB | false | tag.location.default: 1 | true | true | NULL | 2 | 2 |
| 27014 | p2 | 2 | 2024-09-03 11:56:13 | NORMAL | col_1 | [types: [INT]; keys: [6]; ..types: [INT]; keys: [7]; ) | pk | 10 | 1 | HDD | 9999-12-31 15:59:59 | | NULL | 975.000 B | false | tag.location.default: 1 | true | true | NULL | 2 | 1 |
| 27015 | p3 | 2 | 2024-09-03 11:56:13 | NORMAL | col_1 | [types: [INT]; keys: [7]; ..types: [INT]; keys: [8]; ) | pk | 10 | 1 | HDD | 9999-12-31 15:59:59 | | NULL | 959.000 B | false | tag.location.default: 1 | true | true | NULL | 2 | 1 |
| 27016 | p4 | 2 | 2024-09-03 11:56:13 | NORMAL | col_1 | [types: [INT]; keys: [8]; ..types: [INT]; keys: [10]; ) | pk | 10 | 1 | HDD | 9999-12-31 15:59:59 | | NULL | 2.779 KB | false | tag.location.default: 1 | true | true | NULL | 2 | 3 |
| 27017 | p5 | 1 | 2024-09-03 11:56:13 | NORMAL | col_1 | [types: [INT]; keys: [10]; ..types: [INT]; keys: [83647]; ) | pk | 10 | 1 | HDD | 9999-12-31 15:59:59 | | NULL | 0.000 | false | tag.location.default: 1 | true | true | NULL | 1 | 0 |
| 27018 | p100 | 2 | 2024-09-03 11:56:13 | NORMAL | col_1 | [types: [INT]; keys: [83647]; ..types: [INT]; keys: [2147483647]; ) | pk | 10 | 1 | HDD | 9999-12-31 15:59:59 | | NULL | 2.872 KB | false | tag.location.default: 1 | true | true | NULL | 2 | 4 |
+-------------+---------------+----------------+---------------------+--------+--------------+---------------------------------------------------------------------+-----------------+---------+----------------+---------------+---------------------+---------------------+--------------------------+-----------+------------+-------------------------+-----------+--------------------+--------------+------------------+----------+

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@Vallishp
Copy link
Contributor Author

Vallishp commented Sep 5, 2024

run buildall

Copy link
Contributor

@dataroaring dataroaring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Sep 5, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Sep 5, 2024

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 5, 2024

PR approved by anyone and no changes requested.

@doris-robot
Copy link

TPC-H: Total hot run time: 38119 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 4cec965c68f492bd871b433d8b3e4fe55a32f02a, data reload: false

------ Round 1 ----------------------------------
q1	17768	4728	4301	4301
q2	2027	192	184	184
q3	11762	945	1180	945
q4	10529	748	777	748
q5	7742	2880	2860	2860
q6	230	141	141	141
q7	974	622	601	601
q8	9363	2096	2114	2096
q9	7189	6547	6547	6547
q10	6988	2268	2220	2220
q11	455	251	246	246
q12	394	226	231	226
q13	18748	3110	3076	3076
q14	281	249	240	240
q15	537	491	477	477
q16	524	456	433	433
q17	989	719	674	674
q18	7301	6725	6997	6725
q19	1389	1142	1068	1068
q20	672	337	333	333
q21	3973	3087	2949	2949
q22	1090	1040	1029	1029
Total cold run time: 110925 ms
Total hot run time: 38119 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4338	4236	4263	4236
q2	383	258	270	258
q3	2898	2649	2663	2649
q4	1941	1663	1657	1657
q5	5707	5720	5850	5720
q6	226	144	136	136
q7	2231	1892	1788	1788
q8	3321	3441	3524	3441
q9	8899	8919	8769	8769
q10	3622	3400	3335	3335
q11	611	511	511	511
q12	832	665	654	654
q13	13801	3238	3272	3238
q14	317	292	292	292
q15	538	487	498	487
q16	541	492	503	492
q17	1853	1549	1566	1549
q18	8267	8032	7860	7860
q19	1792	1625	1586	1586
q20	2165	1965	1926	1926
q21	5611	5413	5438	5413
q22	1120	1033	1043	1033
Total cold run time: 71014 ms
Total hot run time: 57030 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 192427 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 4cec965c68f492bd871b433d8b3e4fe55a32f02a, data reload: false

query1	1247	877	886	877
query2	6357	1894	1842	1842
query3	10592	3920	3918	3918
query4	58850	26400	22981	22981
query5	5178	499	485	485
query6	398	163	156	156
query7	5764	306	305	305
query8	332	233	229	229
query9	8525	2504	2493	2493
query10	472	285	274	274
query11	16742	15072	15084	15072
query12	173	108	108	108
query13	1537	408	391	391
query14	10868	7359	7374	7359
query15	209	179	174	174
query16	7367	464	463	463
query17	1103	593	559	559
query18	1993	316	298	298
query19	288	148	148	148
query20	122	112	111	111
query21	210	106	106	106
query22	4640	4427	4600	4427
query23	34031	33830	33487	33487
query24	5911	2820	2876	2820
query25	512	372	400	372
query26	671	149	151	149
query27	1758	280	276	276
query28	3872	2059	2052	2052
query29	679	410	406	406
query30	233	153	166	153
query31	934	752	771	752
query32	75	54	54	54
query33	423	289	290	289
query34	871	482	490	482
query35	857	749	715	715
query36	1035	924	950	924
query37	149	88	86	86
query38	3942	3882	3885	3882
query39	1440	1408	1412	1408
query40	199	118	116	116
query41	50	49	48	48
query42	118	97	96	96
query43	497	460	471	460
query44	1118	764	747	747
query45	194	162	167	162
query46	1096	741	781	741
query47	1903	1784	1804	1784
query48	375	289	301	289
query49	765	447	447	447
query50	834	411	417	411
query51	7124	6914	6787	6787
query52	99	88	91	88
query53	248	184	174	174
query54	570	450	484	450
query55	78	74	75	74
query56	269	260	257	257
query57	1207	1108	1076	1076
query58	229	223	223	223
query59	2989	2787	2748	2748
query60	326	266	272	266
query61	100	97	100	97
query62	756	631	661	631
query63	216	184	188	184
query64	2397	677	683	677
query65	3251	3137	3185	3137
query66	681	343	346	343
query67	15367	15319	15197	15197
query68	2774	584	588	584
query69	391	291	274	274
query70	1196	1039	1133	1039
query71	353	281	280	280
query72	6171	4075	4048	4048
query73	752	331	329	329
query74	9101	8919	8773	8773
query75	3362	2635	2694	2635
query76	1559	1074	932	932
query77	553	350	343	343
query78	9633	9111	9244	9111
query79	1053	546	533	533
query80	727	501	522	501
query81	470	230	227	227
query82	235	145	143	143
query83	174	152	151	151
query84	256	76	76	76
query85	682	285	275	275
query86	314	292	280	280
query87	4324	4220	4316	4220
query88	2981	2339	2363	2339
query89	377	289	297	289
query90	1995	201	197	197
query91	142	111	112	111
query92	63	52	51	51
query93	1069	540	546	540
query94	752	287	279	279
query95	359	267	353	267
query96	584	266	269	266
query97	3168	3083	3063	3063
query98	222	201	214	201
query99	1503	1283	1277	1277
Total cold run time: 300711 ms
Total hot run time: 192427 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 31.64 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 4cec965c68f492bd871b433d8b3e4fe55a32f02a, data reload: false

query1	0.04	0.04	0.04
query2	0.07	0.04	0.04
query3	0.23	0.05	0.05
query4	1.67	0.09	0.08
query5	0.50	0.49	0.49
query6	1.14	0.74	0.73
query7	0.02	0.01	0.02
query8	0.05	0.04	0.04
query9	0.54	0.49	0.48
query10	0.54	0.54	0.54
query11	0.15	0.11	0.12
query12	0.15	0.13	0.12
query13	0.59	0.59	0.58
query14	1.40	1.45	1.42
query15	0.85	0.81	0.83
query16	0.38	0.36	0.37
query17	1.00	1.03	1.04
query18	0.20	0.20	0.19
query19	1.85	1.76	1.80
query20	0.01	0.01	0.02
query21	15.40	0.65	0.66
query22	4.27	6.88	2.17
query23	18.26	1.37	1.30
query24	2.09	0.22	0.22
query25	0.16	0.08	0.08
query26	0.28	0.18	0.18
query27	0.07	0.08	0.07
query28	13.27	1.02	1.01
query29	12.61	3.31	3.31
query30	0.26	0.06	0.06
query31	2.87	0.42	0.39
query32	3.24	0.49	0.48
query33	2.98	3.04	3.00
query34	17.20	4.35	4.44
query35	4.46	4.41	4.45
query36	0.66	0.48	0.47
query37	0.18	0.16	0.15
query38	0.15	0.16	0.15
query39	0.05	0.03	0.04
query40	0.16	0.13	0.13
query41	0.09	0.05	0.05
query42	0.06	0.05	0.05
query43	0.05	0.05	0.04
Total cold run time: 110.2 s
Total hot run time: 31.64 s

@yiguolei yiguolei merged commit 5f7a6c1 into apache:master Sep 6, 2024
@yiguolei yiguolei added usercase Important user case type label dev/2.1.x dev/3.0.x labels Sep 6, 2024
dataroaring pushed a commit that referenced this pull request Sep 11, 2024
…#40153) (#40636)

## Proposed changes

#40568
#40455
#40456
#40153


Test:
2024-09-10 14:46:14.206 INFO [suite-thread-1] (SuiteContext.groovy:299)
- Create new connection for user 'partitions_user'
2024-09-10 14:46:14.214 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-10 14:46:14.245 INFO [suite-thread-1] (SuiteContext.groovy:309)
- Recover original connection
2024-09-10 14:46:14.246 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-10 14:46:14.252 INFO [main] (RegressionTest.groovy:259) - Start
to run single scripts
2024-09-10 14:47:03.655 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-10 14:47:03.656 INFO [main] (RegressionTest.groovy:459) - All
suites success.
 ____   _    ____ ____  _____ ____
|  _ \ / \  / ___/ ___|| ____|  _ \
| |_) / _ \ \___ \___ \|  _| | | | |
|  __/ ___ \ ___) |__) | |___| |_| |
|_| /_/   \_\____/____/|_____|____/

2024-09-10 14:47:03.656 INFO [main] (RegressionTest.groovy:410) - Test 1
suites, failed 0 suites, fatal 0 scripts, skipped 0 scripts

2024-09-10 14:49:48.239 INFO [suite-thread-2] (Suite.groovy:1162) -
Execute tag: sql, sql: select * from triggers
2024-09-10 14:49:48.261 INFO [suite-thread-2] (Suite.groovy:1162) -
Execute tag: sql, sql: select * from parameters
2024-09-10 14:49:48.280 INFO [suite-thread-2] (Suite.groovy:1162) -
Execute tag: sql, sql: select * from profiling
2024-09-10 14:49:48.294 INFO [suite-thread-2] (ScriptContext.groovy:120)
- Run test_query_sys_tables in
/root/doris/workspace/doris/regression-test/suites/query_p0/system/test_query_sys_tables.groovy
succeed
2024-09-10 14:49:58.800 INFO [main] (RegressionTest.groovy:259) - Start
to run single scripts
2024-09-10 14:50:48.173 INFO [main] (RegressionTest.groovy:380) -
Success suites:

/root/doris/workspace/doris/regression-test/suites/nereids_p0/system/test_query_sys_tables.groovy:
group=query,p0, name=test_query_sys_tables

/root/doris/workspace/doris/regression-test/suites/query_p0/system/test_query_sys_tables.groovy:
group=query,p0, name=test_query_sys_tables
2024-09-10 14:50:48.174 INFO [main] (RegressionTest.groovy:459) - All
suites success.
 ____   _    ____ ____  _____ ____
|  _ \ / \  / ___/ ___|| ____|  _ \
| |_) / _ \ \___ \___ \|  _| | | | |
|  __/ ___ \ ___) |__) | |___| |_| |
|_| /_/   \_\____/____/|_____|____/

2024-09-10 14:50:48.175 INFO [main] (RegressionTest.groovy:410) - Test 2
suites, failed 0 suites, fatal 0 scripts, skipped 0 scripts
2024-09-10 14:50:48.175 INFO [main] (RegressionTest.groovy:119) - Test
finished

---------

Co-authored-by: Mingyu Chen <morningman.cmy@gmail.com>
yiguolei pushed a commit that referenced this pull request Sep 12, 2024
#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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. dev/2.1.7-merged dev/3.0.2-merged reviewed usercase Important user case type label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants