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

[Fix]Fix show role stmt missing grouo info #36032

Merged
merged 2 commits into from
Jun 11, 2024

Conversation

wangbo
Copy link
Contributor

@wangbo wangbo commented Jun 7, 2024

Proposed changes

show roles stmt missing WorkloadGroupPrivs title.

before:

mysql [(none)]>show roles;
+----------+---------+-------------+----------------------+--------------+---------------+------------+---------------+-------------------+-----------------+-------------------+
| Name     | Comment | Users       | GlobalPrivs          | CatalogPrivs | DatabasePrivs | TablePrivs | ResourcePrivs | CloudClusterPrivs | CloudStagePrivs | StorageVaultPrivs |
+----------+---------+-------------+----------------------+--------------+---------------+------------+---------------+-------------------+-----------------+-------------------+
| admin    | NULL    | 'admin'@'%' | Admin_priv           | NULL         | NULL          | NULL       | NULL          | NULL              | NULL            | NULL              |
| operator | NULL    | 'root'@'%'  | Node_priv,Admin_priv | NULL         | NULL          | NULL       | NULL          | NULL              | NULL            | NULL              |
+----------+---------+-------------+----------------------+--------------+---------------+------------+---------------+-------------------+-----------------+-------------------+
2 rows in set (0.00 sec)

after


create role test_wg_role;

GRANT USAGE_PRIV ON WORKLOAD GROUP 'queue_wg' TO role 'test_wg_role';

mysql [(none)]>show roles;
+--------------+---------+-------------+----------------------+--------------+---------------+------------+---------------+-------------------+-----------------+-------------------+----------------------+
| Name         | Comment | Users       | GlobalPrivs          | CatalogPrivs | DatabasePrivs | TablePrivs | ResourcePrivs | CloudClusterPrivs | CloudStagePrivs | StorageVaultPrivs | WorkloadGroupPrivs   |
+--------------+---------+-------------+----------------------+--------------+---------------+------------+---------------+-------------------+-----------------+-------------------+----------------------+
| admin        | NULL    | 'admin'@'%' | Admin_priv           | NULL         | NULL          | NULL       | NULL          | NULL              | NULL            | NULL              | NULL                 |
| test_wg_role |         |             | NULL                 | NULL         | NULL          | NULL       | NULL          | NULL              | NULL            | NULL              | queue_wg: Usage_priv |
| operator     | NULL    | 'root'@'%'  | Node_priv,Admin_priv | NULL         | NULL          | NULL       | NULL          | NULL              | NULL            | NULL              | NULL                 |
+--------------+---------+-------------+----------------------+--------------+---------------+------------+---------------+-------------------+-----------------+-------------------+----------------------+
3 rows in set (0.01 sec)

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

@wangbo
Copy link
Contributor Author

wangbo commented Jun 7, 2024

run buildall

Copy link
Contributor

github-actions bot commented Jun 7, 2024

PR approved by anyone and no changes requested.

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17639	4365	4282	4282
q2	2017	195	201	195
q3	10433	1263	1127	1127
q4	10190	834	759	759
q5	7513	2655	2764	2655
q6	227	135	141	135
q7	982	618	626	618
q8	9223	2153	2091	2091
q9	9280	6641	6667	6641
q10	9602	3939	3891	3891
q11	436	247	251	247
q12	512	234	244	234
q13	17311	3197	3256	3197
q14	275	228	233	228
q15	496	471	469	469
q16	500	382	378	378
q17	985	608	638	608
q18	8412	7791	7774	7774
q19	7275	1348	1407	1348
q20	656	333	345	333
q21	5173	3287	4080	3287
q22	408	348	332	332
Total cold run time: 119545 ms
Total hot run time: 40829 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4606	4466	4466	4466
q2	380	273	277	273
q3	3130	2898	2966	2898
q4	2041	1661	1630	1630
q5	5403	5535	5474	5474
q6	221	129	126	126
q7	2205	1795	1819	1795
q8	3269	3378	3383	3378
q9	8700	8635	8649	8635
q10	4100	3861	3805	3805
q11	600	497	513	497
q12	770	628	612	612
q13	16930	3128	3211	3128
q14	315	282	263	263
q15	543	485	475	475
q16	507	438	434	434
q17	1839	1549	1492	1492
q18	8116	7862	7377	7377
q19	1782	1545	1525	1525
q20	3267	1785	1767	1767
q21	10321	4741	4636	4636
q22	677	549	541	541
Total cold run time: 79722 ms
Total hot run time: 55227 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 172905 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 2fb0e96aee567507daacdb8e3db1658a3e5f92ee, data reload: false

query1	914	381	368	368
query2	6434	2456	2389	2389
query3	6646	205	209	205
query4	18892	17436	17329	17329
query5	4108	465	487	465
query6	252	181	162	162
query7	4592	299	292	292
query8	334	302	290	290
query9	8633	2407	2413	2407
query10	455	295	282	282
query11	10518	9996	10032	9996
query12	137	83	83	83
query13	1632	355	363	355
query14	10219	7604	6943	6943
query15	235	190	185	185
query16	7732	263	270	263
query17	1705	527	529	527
query18	1861	278	273	273
query19	198	152	151	151
query20	93	88	83	83
query21	212	137	128	128
query22	4200	4055	4016	4016
query23	33608	33100	32957	32957
query24	11052	2830	2878	2830
query25	611	355	357	355
query26	1142	157	156	156
query27	2296	319	313	313
query28	6252	2016	2040	2016
query29	881	620	608	608
query30	274	151	149	149
query31	932	742	728	728
query32	92	54	56	54
query33	774	294	268	268
query34	970	482	470	470
query35	729	623	620	620
query36	1093	981	940	940
query37	145	71	77	71
query38	2857	2762	2721	2721
query39	843	827	795	795
query40	203	131	128	128
query41	53	52	57	52
query42	116	101	97	97
query43	556	569	543	543
query44	1223	726	740	726
query45	201	169	169	169
query46	1081	716	722	716
query47	1845	1766	1774	1766
query48	371	296	296	296
query49	985	411	422	411
query50	787	403	392	392
query51	6785	6655	6641	6641
query52	107	99	90	90
query53	368	290	290	290
query54	953	451	449	449
query55	73	74	77	74
query56	282	256	268	256
query57	1123	1076	1060	1060
query58	280	291	246	246
query59	3638	3360	3319	3319
query60	298	277	300	277
query61	92	85	92	85
query62	624	448	452	448
query63	323	295	289	289
query64	8852	2267	1819	1819
query65	3188	3098	3154	3098
query66	810	362	346	346
query67	15414	14986	15057	14986
query68	4898	561	551	551
query69	645	457	394	394
query70	1190	1163	1158	1158
query71	410	285	292	285
query72	7138	5668	5223	5223
query73	761	324	318	318
query74	5850	5504	5458	5458
query75	3469	2720	2683	2683
query76	2966	942	955	942
query77	661	311	296	296
query78	10271	9917	9775	9775
query79	2197	515	518	515
query80	1005	475	467	467
query81	586	223	221	221
query82	1010	112	103	103
query83	237	172	174	172
query84	249	87	83	83
query85	1523	321	264	264
query86	488	314	337	314
query87	3223	3060	3100	3060
query88	3839	2318	2320	2318
query89	481	403	399	399
query90	1811	197	191	191
query91	128	100	97	97
query92	60	51	51	51
query93	2241	516	509	509
query94	1245	192	184	184
query95	414	312	308	308
query96	590	263	261	261
query97	3192	2966	3020	2966
query98	210	208	198	198
query99	1137	829	834	829
Total cold run time: 269309 ms
Total hot run time: 172905 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.03
query2	0.08	0.03	0.04
query3	0.24	0.06	0.06
query4	1.65	0.08	0.10
query5	0.51	0.49	0.51
query6	1.12	0.72	0.72
query7	0.02	0.01	0.02
query8	0.05	0.04	0.04
query9	0.53	0.48	0.48
query10	0.54	0.56	0.55
query11	0.16	0.11	0.11
query12	0.15	0.12	0.12
query13	0.59	0.59	0.60
query14	0.78	0.76	0.80
query15	0.84	0.81	0.80
query16	0.37	0.35	0.37
query17	0.98	1.05	0.98
query18	0.23	0.24	0.24
query19	1.82	1.79	1.83
query20	0.01	0.01	0.02
query21	15.73	0.65	0.65
query22	4.76	6.57	2.20
query23	18.34	1.44	1.33
query24	2.16	0.22	0.22
query25	0.16	0.09	0.08
query26	0.26	0.18	0.18
query27	0.08	0.08	0.07
query28	13.21	1.01	1.02
query29	13.79	3.26	3.21
query30	0.24	0.05	0.06
query31	2.95	0.39	0.41
query32	3.38	0.47	0.47
query33	2.87	2.98	2.91
query34	16.97	4.38	4.47
query35	4.47	4.45	4.60
query36	0.65	0.46	0.47
query37	0.17	0.15	0.16
query38	0.14	0.14	0.14
query39	0.04	0.04	0.03
query40	0.17	0.15	0.14
query41	0.08	0.04	0.04
query42	0.05	0.04	0.04
query43	0.04	0.04	0.04
Total cold run time: 111.41 s
Total hot run time: 30.88 s

@wangbo wangbo force-pushed the 0607_show_role_wg branch from 2f741a1 to 54cd0e3 Compare June 7, 2024 06:58
@wangbo
Copy link
Contributor Author

wangbo commented Jun 7, 2024

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17636	4276	4237	4237
q2	2028	185	195	185
q3	10432	1213	1289	1213
q4	10202	837	797	797
q5	7511	2728	2823	2728
q6	222	137	135	135
q7	948	616	617	616
q8	9224	2114	2086	2086
q9	9436	6679	6673	6673
q10	9225	3880	3885	3880
q11	434	240	230	230
q12	473	240	230	230
q13	17455	3116	3171	3116
q14	284	239	233	233
q15	505	476	464	464
q16	494	376	378	376
q17	982	628	685	628
q18	8271	7735	7765	7735
q19	9370	1449	1373	1373
q20	654	325	311	311
q21	5060	4053	3357	3357
q22	409	331	337	331
Total cold run time: 121255 ms
Total hot run time: 40934 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4576	4521	4449	4449
q2	374	270	252	252
q3	3184	2917	2907	2907
q4	2045	1628	1655	1628
q5	5430	5508	5515	5508
q6	221	128	127	127
q7	2179	1830	1838	1830
q8	3229	3372	3387	3372
q9	8718	8706	8713	8706
q10	4130	3841	3860	3841
q11	615	506	500	500
q12	838	660	676	660
q13	17139	3272	3320	3272
q14	317	290	296	290
q15	508	477	477	477
q16	496	480	445	445
q17	1831	1564	1513	1513
q18	8351	8086	7572	7572
q19	1750	1574	1637	1574
q20	3022	1808	1794	1794
q21	4813	4818	4788	4788
q22	635	548	558	548
Total cold run time: 74401 ms
Total hot run time: 56053 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 168732 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 54cd0e3d30abb82e664081a07abd90993c48468b, data reload: false

query1	911	375	371	371
query2	6448	2330	2244	2244
query3	6654	202	207	202
query4	19769	17373	17223	17223
query5	4127	439	436	436
query6	237	154	152	152
query7	4593	293	290	290
query8	317	274	267	267
query9	8604	2383	2359	2359
query10	432	281	279	279
query11	10791	10204	9874	9874
query12	126	85	87	85
query13	1632	351	375	351
query14	9387	7581	6683	6683
query15	231	184	181	181
query16	7798	261	254	254
query17	1368	513	507	507
query18	1947	279	281	279
query19	201	156	172	156
query20	90	88	82	82
query21	204	126	125	125
query22	4563	4230	4187	4187
query23	33677	33063	32986	32986
query24	11202	2849	2808	2808
query25	604	367	348	348
query26	838	148	149	148
query27	2320	325	315	315
query28	6391	2048	2023	2023
query29	852	630	606	606
query30	282	152	151	151
query31	971	751	719	719
query32	89	50	57	50
query33	755	275	269	269
query34	992	481	458	458
query35	738	597	598	597
query36	1082	921	919	919
query37	132	71	75	71
query38	2903	2763	2705	2705
query39	849	776	774	774
query40	206	121	119	119
query41	57	51	49	49
query42	118	94	99	94
query43	573	532	537	532
query44	1279	720	743	720
query45	204	165	159	159
query46	1073	719	700	700
query47	1877	1818	1801	1801
query48	362	303	280	280
query49	1066	414	398	398
query50	783	384	388	384
query51	6782	6610	6652	6610
query52	97	96	92	92
query53	353	281	285	281
query54	866	444	429	429
query55	75	72	73	72
query56	269	248	242	242
query57	1150	1046	1050	1046
query58	247	255	232	232
query59	3468	3264	3119	3119
query60	283	259	290	259
query61	90	86	86	86
query62	665	460	456	456
query63	342	287	287	287
query64	8950	2296	1784	1784
query65	3156	3095	3114	3095
query66	812	343	339	339
query67	15419	14925	14830	14830
query68	4862	552	539	539
query69	607	464	380	380
query70	1176	1129	1133	1129
query71	408	270	269	269
query72	7208	2741	2521	2521
query73	765	320	310	310
query74	5903	5491	5484	5484
query75	3414	2677	2614	2614
query76	2928	948	877	877
query77	665	288	293	288
query78	10390	9956	9860	9860
query79	2522	507	507	507
query80	2157	502	450	450
query81	590	217	216	216
query82	1140	102	103	102
query83	301	165	168	165
query84	266	84	83	83
query85	1456	271	257	257
query86	507	329	317	317
query87	3297	3143	3069	3069
query88	4151	2313	2316	2313
query89	482	379	376	376
query90	1768	189	187	187
query91	125	97	101	97
query92	63	48	48	48
query93	2731	509	501	501
query94	1208	187	177	177
query95	387	297	346	297
query96	595	266	258	258
query97	3228	2995	3013	2995
query98	210	201	193	193
query99	1168	831	824	824
Total cold run time: 272407 ms
Total hot run time: 168732 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.03
query2	0.08	0.03	0.04
query3	0.23	0.04	0.05
query4	1.68	0.06	0.06
query5	0.50	0.52	0.48
query6	1.13	0.73	0.73
query7	0.02	0.02	0.02
query8	0.06	0.04	0.04
query9	0.54	0.48	0.48
query10	0.55	0.55	0.55
query11	0.15	0.11	0.12
query12	0.14	0.12	0.11
query13	0.60	0.58	0.60
query14	0.77	0.78	0.78
query15	0.82	0.81	0.82
query16	0.36	0.37	0.37
query17	1.03	1.00	0.98
query18	0.21	0.24	0.24
query19	1.88	1.75	1.73
query20	0.02	0.01	0.01
query21	15.73	0.66	0.65
query22	3.90	7.17	1.95
query23	18.26	1.34	1.37
query24	2.12	0.22	0.20
query25	0.16	0.08	0.08
query26	0.26	0.18	0.18
query27	0.09	0.08	0.07
query28	13.29	1.02	1.00
query29	12.96	3.27	3.24
query30	0.24	0.08	0.07
query31	2.83	0.38	0.38
query32	3.29	0.48	0.47
query33	2.84	2.92	2.86
query34	17.22	4.45	4.45
query35	4.47	4.50	4.52
query36	0.69	0.50	0.49
query37	0.20	0.17	0.16
query38	0.16	0.15	0.14
query39	0.04	0.03	0.03
query40	0.16	0.14	0.14
query41	0.09	0.04	0.04
query42	0.05	0.05	0.04
query43	0.03	0.03	0.03
Total cold run time: 109.89 s
Total hot run time: 30.69 s

Copy link
Contributor

@HappenLee HappenLee 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 Jun 11, 2024
Copy link
Contributor

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

@HappenLee HappenLee merged commit 89e8a62 into apache:master Jun 11, 2024
26 of 27 checks passed
wangbo added a commit that referenced this pull request Jul 16, 2024
@yiguolei yiguolei mentioned this pull request Jul 19, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants