Skip to content

Conversation

@zddr
Copy link
Contributor

@zddr zddr commented Aug 14, 2025

pick: #54087

The LDAP user does not exist in Doris, so a "user does not exist" prompt
will appear when executing the "show grants" command.

It is a reasonable requirement for users to check their own permissions
after logging in. Therefore, this PR enables LDAP users to view their
own permissions when executing `show grants` themselves. However, others
are still unable to do so, whether by specifying a particular username
or checking all users.

# Conflicts:
#	fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowGrantsCommand.java
#	fe/fe-core/src/test/java/org/apache/doris/nereids/trees/plans/commands/ShowGrantsCommandTest.java
@zddr zddr requested a review from morrySnow as a code owner August 14, 2025 07:58
@zddr
Copy link
Contributor Author

zddr commented Aug 14, 2025

run buildall

@Thearas
Copy link
Contributor

Thearas commented Aug 14, 2025

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

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17584	5483	5413	5413
q2	2030	393	274	274
q3	11901	1245	747	747
q4	10259	891	461	461
q5	8561	2383	2126	2126
q6	186	171	132	132
q7	904	757	613	613
q8	9331	1451	1169	1169
q9	5231	4992	4972	4972
q10	6782	2274	1813	1813
q11	461	278	275	275
q12	348	356	214	214
q13	17766	3597	3006	3006
q14	219	223	208	208
q15	528	482	465	465
q16	411	428	373	373
q17	591	879	353	353
q18	6959	6381	6486	6381
q19	1209	983	538	538
q20	324	339	199	199
q21	2794	2234	1981	1981
q22	1072	1037	974	974
Total cold run time: 105451 ms
Total hot run time: 32687 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5996	5474	5544	5474
q2	243	331	251	251
q3	2277	2692	2348	2348
q4	1347	1833	1351	1351
q5	4402	4998	5006	4998
q6	168	164	126	126
q7	2054	1989	1850	1850
q8	2671	2817	2724	2724
q9	7283	7215	7228	7215
q10	3097	3269	2779	2779
q11	574	524	505	505
q12	687	757	638	638
q13	3406	3783	3152	3152
q14	299	302	287	287
q15	521	467	464	464
q16	455	506	440	440
q17	1239	1757	1263	1263
q18	7710	7455	7438	7438
q19	788	1157	1066	1066
q20	2019	2065	1940	1940
q21	5450	4917	4613	4613
q22	1153	1116	1031	1031
Total cold run time: 53839 ms
Total hot run time: 51953 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 192807 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 ca46474c2d3fb352105fb00d755a954b39966470, data reload: false

query1	960	408	425	408
query2	6086	2081	1983	1983
query3	8706	194	193	193
query4	33631	23877	23435	23435
query5	3612	581	460	460
query6	287	190	177	177
query7	4191	483	311	311
query8	307	248	254	248
query9	9417	2642	2630	2630
query10	499	363	259	259
query11	17971	15356	15684	15356
query12	153	111	106	106
query13	1552	544	413	413
query14	10156	7493	7242	7242
query15	255	196	182	182
query16	8029	659	507	507
query17	1587	798	599	599
query18	2133	411	335	335
query19	229	186	169	169
query20	133	119	117	117
query21	212	133	112	112
query22	4581	4646	4501	4501
query23	35086	34009	34273	34009
query24	7737	2773	2764	2764
query25	550	488	441	441
query26	806	288	178	178
query27	2090	486	350	350
query28	5445	2221	2178	2178
query29	727	623	476	476
query30	233	188	166	166
query31	988	922	869	869
query32	94	60	57	57
query33	490	370	317	317
query34	768	880	539	539
query35	812	826	747	747
query36	1024	1082	977	977
query37	106	99	70	70
query38	4007	4014	3946	3946
query39	1565	1478	1493	1478
query40	218	124	107	107
query41	59	50	52	50
query42	125	107	107	107
query43	540	534	513	513
query44	1339	843	847	843
query45	205	181	179	179
query46	897	1064	691	691
query47	1983	1987	1929	1929
query48	425	423	349	349
query49	734	496	398	398
query50	672	693	433	433
query51	7486	7371	7247	7247
query52	103	107	94	94
query53	229	259	200	200
query54	559	548	464	464
query55	79	77	82	77
query56	261	293	268	268
query57	1303	1246	1190	1190
query58	244	219	215	215
query59	3067	3242	3137	3137
query60	301	291	272	272
query61	121	116	115	115
query62	794	773	699	699
query63	247	209	202	202
query64	3750	1010	661	661
query65	3378	3344	3340	3340
query66	929	420	311	311
query67	16218	15618	15413	15413
query68	7600	824	538	538
query69	499	316	271	271
query70	1196	1139	1174	1139
query71	383	297	272	272
query72	5763	3756	3810	3756
query73	634	747	354	354
query74	10339	9175	8913	8913
query75	3285	3078	2715	2715
query76	3215	1160	770	770
query77	727	374	280	280
query78	10296	10344	9523	9523
query79	3333	893	597	597
query80	747	528	435	435
query81	479	252	218	218
query82	576	118	90	90
query83	180	167	149	149
query84	278	100	82	82
query85	792	384	315	315
query86	354	315	273	273
query87	4354	4333	4215	4215
query88	4667	2404	2385	2385
query89	402	337	299	299
query90	1769	191	194	191
query91	144	141	108	108
query92	71	55	51	51
query93	1580	893	544	544
query94	675	405	313	313
query95	338	281	263	263
query96	486	608	279	279
query97	3247	3299	3157	3157
query98	229	205	204	204
query99	1607	1430	1299	1299
Total cold run time: 293726 ms
Total hot run time: 192807 ms

@doris-robot
Copy link

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

query1	0.03	0.04	0.03
query2	0.06	0.04	0.03
query3	0.24	0.07	0.07
query4	1.63	0.11	0.11
query5	0.54	0.53	0.52
query6	1.15	0.72	0.73
query7	0.02	0.02	0.02
query8	0.04	0.03	0.03
query9	0.57	0.50	0.50
query10	0.56	0.56	0.56
query11	0.14	0.10	0.10
query12	0.14	0.11	0.11
query13	0.62	0.60	0.59
query14	0.78	0.79	0.81
query15	0.84	0.84	0.83
query16	0.40	0.40	0.41
query17	1.05	1.00	1.04
query18	0.25	0.22	0.24
query19	1.86	1.86	1.88
query20	0.01	0.01	0.02
query21	15.40	0.87	0.56
query22	0.74	0.97	0.68
query23	14.95	1.40	0.55
query24	3.55	0.47	0.64
query25	0.18	0.10	0.13
query26	0.39	0.15	0.13
query27	0.05	0.03	0.04
query28	12.84	1.01	0.43
query29	12.52	3.86	3.21
query30	0.25	0.09	0.06
query31	2.83	0.60	0.38
query32	3.23	0.54	0.45
query33	3.03	3.02	3.04
query34	16.60	5.16	4.55
query35	4.43	4.47	4.50
query36	0.65	0.49	0.48
query37	0.09	0.06	0.06
query38	0.04	0.04	0.03
query39	0.04	0.02	0.03
query40	0.17	0.13	0.12
query41	0.08	0.03	0.03
query42	0.03	0.03	0.02
query43	0.04	0.03	0.04
Total cold run time: 103.06 s
Total hot run time: 28.38 s

@morrySnow morrySnow changed the title branch-3.1:[enhance](auth)support ldap user show grants (#54087) branch-3.1: [enhance](auth)support ldap user show grants #54087 Aug 15, 2025
@morrySnow morrySnow merged commit b84e6ca into apache:branch-3.1 Aug 15, 2025
23 checks passed
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.

4 participants