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](auth)Fix the need for low-level table permissions when querying views in certain situations (#44621) #44841

Merged
merged 2 commits into from
Dec 8, 2024

Conversation

zddr
Copy link
Contributor

@zddr zddr commented Dec 2, 2024

pick: #44621

… views in certain situations (apache#44621)

fix when `create view v1 as select * from table1 union select * from
table2` and user has select_priv of v1,but he can not `select * from v1`

Fix the need for low-level table permissions when querying views in
certain situations
@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.

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?

@zddr
Copy link
Contributor Author

zddr commented Dec 2, 2024

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17655	7797	7291	7291
q2	2044	156	153	153
q3	10578	1100	1155	1100
q4	10217	753	678	678
q5	7739	2885	2840	2840
q6	235	152	153	152
q7	975	603	608	603
q8	9367	1983	2034	1983
q9	8098	6414	6463	6414
q10	7080	2275	2303	2275
q11	448	264	260	260
q12	525	221	214	214
q13	17784	2972	3043	2972
q14	239	214	208	208
q15	555	523	512	512
q16	697	599	607	599
q17	982	541	545	541
q18	7256	6625	6562	6562
q19	1374	996	960	960
q20	486	197	190	190
q21	4040	3300	3081	3081
q22	1063	1010	955	955
Total cold run time: 109437 ms
Total hot run time: 40543 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7262	7269	7255	7255
q2	327	235	228	228
q3	2932	2686	2727	2686
q4	1926	1661	1647	1647
q5	5435	5450	5435	5435
q6	220	140	141	140
q7	2108	1668	1659	1659
q8	3201	3385	3409	3385
q9	8618	8524	8537	8524
q10	3470	3394	3431	3394
q11	599	500	495	495
q12	744	584	543	543
q13	16663	2981	2967	2967
q14	291	255	259	255
q15	557	507	505	505
q16	695	666	661	661
q17	1840	1566	1549	1549
q18	7772	7428	7348	7348
q19	1661	1560	1623	1560
q20	2036	1791	1764	1764
q21	5168	5208	4926	4926
q22	1064	998	1002	998
Total cold run time: 74589 ms
Total hot run time: 57924 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 190077 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 40ef90eeb946d1ac50351870294aa72f69da61f8, data reload: false

query1	968	372	384	372
query2	6408	2091	2055	2055
query3	6533	218	212	212
query4	33692	23451	23333	23333
query5	4148	462	447	447
query6	269	171	167	167
query7	4517	320	313	313
query8	269	211	224	211
query9	9527	2665	2650	2650
query10	464	288	277	277
query11	17954	15087	15140	15087
query12	148	100	101	100
query13	1602	405	408	405
query14	9434	7052	7248	7052
query15	216	178	174	174
query16	7649	460	468	460
query17	1558	587	569	569
query18	1962	313	300	300
query19	219	158	155	155
query20	116	110	110	110
query21	208	108	100	100
query22	4619	4226	4196	4196
query23	34504	33606	34076	33606
query24	12318	2923	2923	2923
query25	723	413	404	404
query26	1785	172	170	170
query27	2951	307	302	302
query28	8181	2486	2463	2463
query29	1067	467	441	441
query30	323	151	154	151
query31	994	806	811	806
query32	92	59	60	59
query33	772	279	281	279
query34	976	502	524	502
query35	841	722	734	722
query36	1103	965	938	938
query37	251	73	74	73
query38	3933	3836	3808	3808
query39	1479	1416	1421	1416
query40	290	102	100	100
query41	54	50	49	49
query42	110	97	101	97
query43	513	495	489	489
query44	1213	788	796	788
query45	186	175	163	163
query46	1170	733	730	730
query47	1872	1786	1815	1786
query48	456	378	389	378
query49	1240	390	386	386
query50	809	409	413	409
query51	7267	7132	7054	7054
query52	101	90	89	89
query53	264	192	187	187
query54	1221	455	455	455
query55	77	75	78	75
query56	272	244	255	244
query57	1192	1138	1115	1115
query58	241	210	215	210
query59	3266	2854	2856	2854
query60	290	262	262	262
query61	128	125	99	99
query62	864	653	654	653
query63	214	192	185	185
query64	5141	652	607	607
query65	3254	3174	3197	3174
query66	1361	321	310	310
query67	16050	15563	15226	15226
query68	5071	549	548	548
query69	422	262	266	262
query70	1172	1146	1132	1132
query71	426	258	262	258
query72	6632	3986	3966	3966
query73	780	356	353	353
query74	10441	8988	8946	8946
query75	3352	2556	2623	2556
query76	3025	1038	1002	1002
query77	434	263	263	263
query78	10605	9561	9400	9400
query79	8997	614	605	605
query80	2360	440	416	416
query81	584	233	237	233
query82	1440	122	113	113
query83	250	138	137	137
query84	292	79	78	78
query85	2290	307	285	285
query86	485	305	294	294
query87	4506	4235	4404	4235
query88	6031	2421	2412	2412
query89	557	293	290	290
query90	2236	180	181	180
query91	181	141	138	138
query92	66	48	45	45
query93	7307	554	541	541
query94	1003	296	295	295
query95	351	252	245	245
query96	628	283	284	283
query97	3302	3128	3131	3128
query98	222	195	198	195
query99	1731	1289	1261	1261
Total cold run time: 321068 ms
Total hot run time: 190077 ms

@zddr
Copy link
Contributor Author

zddr commented Dec 4, 2024

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	18081	7541	7375	7375
q2	2363	163	160	160
q3	11836	1157	1174	1157
q4	10599	783	770	770
q5	8070	2840	2875	2840
q6	243	155	151	151
q7	999	612	617	612
q8	9846	1916	2012	1916
q9	6729	6442	6391	6391
q10	7032	2284	2275	2275
q11	456	258	261	258
q12	408	222	213	213
q13	17792	2947	2943	2943
q14	240	207	218	207
q15	566	528	506	506
q16	688	592	596	592
q17	975	568	535	535
q18	7435	6539	6470	6470
q19	1370	1056	978	978
q20	488	202	193	193
q21	3872	3128	3138	3128
q22	1055	955	978	955
Total cold run time: 111143 ms
Total hot run time: 40625 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7296	7211	7203	7203
q2	322	235	226	226
q3	3131	2989	2865	2865
q4	1964	1742	1762	1742
q5	5695	5739	5670	5670
q6	220	147	144	144
q7	2182	1774	1734	1734
q8	3299	3446	3447	3446
q9	8946	8915	8813	8813
q10	3583	3504	3477	3477
q11	593	504	499	499
q12	777	566	597	566
q13	16872	2989	2980	2980
q14	278	277	257	257
q15	550	503	512	503
q16	677	643	631	631
q17	1781	1552	1553	1552
q18	7813	7408	7388	7388
q19	5288	1580	1495	1495
q20	2005	1778	1779	1778
q21	5098	5125	4851	4851
q22	1090	952	956	952
Total cold run time: 79460 ms
Total hot run time: 58772 ms

@doris-robot
Copy link

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

query1	983	368	361	361
query2	6502	2099	1910	1910
query3	6701	211	219	211
query4	34010	23438	23648	23438
query5	4240	466	438	438
query6	260	168	169	168
query7	4619	313	306	306
query8	286	229	226	226
query9	9432	2710	2677	2677
query10	452	253	265	253
query11	18014	15224	15379	15224
query12	158	108	103	103
query13	1635	408	416	408
query14	9479	6754	7175	6754
query15	247	170	170	170
query16	8102	518	486	486
query17	1639	586	549	549
query18	2118	336	318	318
query19	213	150	147	147
query20	113	110	106	106
query21	204	103	100	100
query22	4591	4288	4009	4009
query23	34582	33940	34101	33940
query24	12351	2857	2820	2820
query25	717	402	398	398
query26	1823	172	170	170
query27	2937	297	310	297
query28	8155	2491	2481	2481
query29	1065	448	439	439
query30	337	172	162	162
query31	1032	782	790	782
query32	97	62	59	59
query33	776	282	282	282
query34	1004	477	508	477
query35	896	721	717	717
query36	1136	950	960	950
query37	267	74	74	74
query38	3919	3900	3828	3828
query39	1481	1419	1455	1419
query40	287	103	99	99
query41	54	50	49	49
query42	118	98	97	97
query43	531	476	504	476
query44	1270	774	792	774
query45	196	176	172	172
query46	1136	715	714	714
query47	1906	1831	1833	1831
query48	459	386	394	386
query49	1290	392	388	388
query50	786	414	416	414
query51	7262	7005	7111	7005
query52	99	92	88	88
query53	268	186	181	181
query54	1215	466	453	453
query55	75	78	75	75
query56	267	241	249	241
query57	1203	1124	1102	1102
query58	236	212	213	212
query59	3179	2889	2872	2872
query60	304	249	243	243
query61	111	111	107	107
query62	873	685	683	683
query63	216	189	186	186
query64	5173	634	625	625
query65	3276	3184	3179	3179
query66	1415	309	310	309
query67	15959	15676	15373	15373
query68	4560	550	551	550
query69	432	258	280	258
query70	1161	1108	1097	1097
query71	416	254	260	254
query72	6304	3861	3944	3861
query73	764	350	350	350
query74	10188	8976	8938	8938
query75	3389	2604	2618	2604
query76	2932	913	1098	913
query77	432	260	264	260
query78	10665	9702	9577	9577
query79	9585	596	587	587
query80	2253	442	414	414
query81	559	237	235	235
query82	1398	119	117	117
query83	308	143	141	141
query84	299	81	87	81
query85	2328	298	294	294
query86	488	310	301	301
query87	4565	4367	4240	4240
query88	5692	2398	2395	2395
query89	558	287	292	287
query90	2115	185	192	185
query91	183	150	145	145
query92	63	53	49	49
query93	7683	542	535	535
query94	898	292	280	280
query95	353	253	256	253
query96	653	290	280	280
query97	3361	3090	3157	3090
query98	220	223	194	194
query99	1958	1301	1301	1301
Total cold run time: 322500 ms
Total hot run time: 190057 ms

@morningman morningman changed the title [fix](auth)Fix the need for low-level table permissions when querying… [fix](auth)Fix the need for low-level table permissions when querying views in certain situations (#44621) Dec 8, 2024
@morningman morningman merged commit e9a60c4 into apache:branch-3.0 Dec 8, 2024
20 of 22 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.

3 participants