doris icon indicating copy to clipboard operation
doris copied to clipboard

[fix](mtmv)use isManagedTable instead of check table type

Open zddr opened this issue 1 year ago • 11 comments

Proposed changes

Issue Number: close #xxx

The TableType of olap table is OLAP, and the TableType of materialized view is MATERIALIZED_VIEW. Many functions of olap are required for materialized views, but many previous functions filtered out materialized views by determining whether the TableType is OLAP and need to be changed to using TableIf.isManagedTable() to determine

not allow recycle mv not allow recycle partition in mv will ignore mv when recycle db

Further comments

If this is a relatively large or complex change, kick off the discussion at [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...

zddr avatar Apr 29 '24 08:04 zddr

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.

doris-robot avatar Apr 29 '24 08:04 doris-robot

run buildall

zddr avatar Apr 29 '24 08:04 zddr

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

------ Round 1 ----------------------------------
q1	17878	4335	4200	4200
q2	2021	185	185	185
q3	10468	1218	1161	1161
q4	10205	738	796	738
q5	7497	2701	2720	2701
q6	214	132	138	132
q7	973	552	535	535
q8	9208	2152	2106	2106
q9	9110	6779	6712	6712
q10	8927	3832	3841	3832
q11	452	247	247	247
q12	478	227	222	222
q13	18308	3209	3171	3171
q14	284	241	245	241
q15	523	484	473	473
q16	514	391	399	391
q17	965	675	752	675
q18	8278	7846	7730	7730
q19	3526	1524	1494	1494
q20	639	329	320	320
q21	5248	4043	4209	4043
q22	337	287	282	282
Total cold run time: 116053 ms
Total hot run time: 41591 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4491	4388	4316	4316
q2	376	269	280	269
q3	3152	2920	2864	2864
q4	2036	1611	1609	1609
q5	5368	5522	5564	5522
q6	206	121	126	121
q7	1814	1439	1469	1439
q8	3216	3380	3414	3380
q9	8794	8782	8879	8782
q10	4065	3863	3739	3739
q11	580	469	470	469
q12	793	594	603	594
q13	15934	3075	3111	3075
q14	322	286	274	274
q15	522	486	467	467
q16	488	452	437	437
q17	1764	1546	1502	1502
q18	8020	7563	7371	7371
q19	1637	1514	1549	1514
q20	1987	1791	1740	1740
q21	4807	4857	4776	4776
q22	572	485	468	468
Total cold run time: 70944 ms
Total hot run time: 54728 ms

doris-robot avatar Apr 29 '24 08:04 doris-robot

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

github-actions[bot] avatar Apr 29 '24 08:04 github-actions[bot]

PR approved by anyone and no changes requested.

github-actions[bot] avatar Apr 29 '24 08:04 github-actions[bot]

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

query1	913	361	345	345
query2	6442	2407	2347	2347
query3	6655	211	214	211
query4	22804	21142	21082	21082
query5	4139	413	416	413
query6	261	184	184	184
query7	4587	291	285	285
query8	251	194	207	194
query9	8596	2368	2324	2324
query10	433	252	243	243
query11	14533	14118	14267	14118
query12	139	90	89	89
query13	1643	360	363	360
query14	9740	6642	7408	6642
query15	201	174	179	174
query16	7735	251	264	251
query17	1301	551	539	539
query18	1953	273	269	269
query19	204	145	147	145
query20	91	85	85	85
query21	199	122	124	122
query22	5088	4917	4884	4884
query23	33502	33061	33110	33061
query24	5318	3069	2884	2884
query25	464	377	363	363
query26	693	149	144	144
query27	1858	321	312	312
query28	3649	2026	1999	1999
query29	834	601	602	601
query30	209	160	152	152
query31	916	744	704	704
query32	57	52	50	50
query33	481	244	243	243
query34	853	490	485	485
query35	767	691	689	689
query36	1009	895	864	864
query37	99	65	64	64
query38	3115	3009	2982	2982
query39	1583	1520	1551	1520
query40	199	124	121	121
query41	41	40	41	40
query42	103	97	96	96
query43	564	526	530	526
query44	1056	727	735	727
query45	273	269	274	269
query46	1058	716	697	697
query47	1951	1863	1923	1863
query48	352	283	283	283
query49	763	407	420	407
query50	780	388	390	388
query51	6752	6874	6665	6665
query52	103	93	93	93
query53	353	280	277	277
query54	275	244	240	240
query55	78	76	74	74
query56	251	232	232	232
query57	1221	1144	1109	1109
query58	218	204	202	202
query59	3539	3160	3121	3121
query60	263	237	245	237
query61	110	107	108	107
query62	538	448	455	448
query63	299	282	281	281
query64	7523	7257	7152	7152
query65	3056	3012	3034	3012
query66	812	345	340	340
query67	15420	14935	14930	14930
query68	5363	536	540	536
query69	496	311	311	311
query70	1197	1145	1133	1133
query71	424	274	275	274
query72	8165	2627	2410	2410
query73	713	320	320	320
query74	6493	6059	6040	6040
query75	3525	2654	2638	2638
query76	2835	962	949	949
query77	405	302	263	263
query78	11046	10264	10205	10205
query79	13083	524	527	524
query80	2491	434	426	426
query81	505	216	224	216
query82	1383	90	93	90
query83	288	164	163	163
query84	268	82	85	82
query85	1752	278	248	248
query86	531	290	287	287
query87	3329	3122	3108	3108
query88	5985	2351	2333	2333
query89	566	368	385	368
query90	2048	179	175	175
query91	151	94	106	94
query92	57	47	45	45
query93	7264	521	496	496
query94	1292	186	180	180
query95	1094	1090	1087	1087
query96	613	269	256	256
query97	3168	2922	2952	2922
query98	242	218	209	209
query99	1219	871	878	871
Total cold run time: 289257 ms
Total hot run time: 185619 ms

doris-robot avatar Apr 29 '24 08:04 doris-robot

run buildall

zddr avatar Apr 30 '24 09:04 zddr

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

github-actions[bot] avatar Apr 30 '24 09:04 github-actions[bot]

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

------ Round 1 ----------------------------------
q1	17797	4679	4382	4382
q2	2606	201	197	197
q3	11158	1173	1283	1173
q4	10533	768	860	768
q5	8180	2762	2675	2675
q6	213	131	129	129
q7	1022	599	572	572
q8	9241	2154	2106	2106
q9	9157	6613	6560	6560
q10	9013	3730	3721	3721
q11	465	255	247	247
q12	427	217	223	217
q13	18267	2912	2954	2912
q14	257	215	224	215
q15	505	488	471	471
q16	501	382	373	373
q17	973	701	706	701
q18	8053	7443	7511	7443
q19	1673	1525	1518	1518
q20	646	305	297	297
q21	5055	3342	4151	3342
q22	360	293	290	290
Total cold run time: 116102 ms
Total hot run time: 40309 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4295	4217	4204	4204
q2	368	273	277	273
q3	3002	2814	2763	2763
q4	1862	1581	1607	1581
q5	5244	5280	5299	5280
q6	213	122	125	122
q7	2260	1858	1902	1858
q8	3211	3390	3403	3390
q9	8445	8436	8402	8402
q10	3938	3692	3666	3666
q11	592	509	489	489
q12	766	602	597	597
q13	17355	2943	2943	2943
q14	290	263	248	248
q15	531	494	477	477
q16	461	405	414	405
q17	1746	1474	1458	1458
q18	7578	7682	7395	7395
q19	1677	1550	1577	1550
q20	1981	1749	1786	1749
q21	4899	4828	4969	4828
q22	610	519	506	506
Total cold run time: 71324 ms
Total hot run time: 54184 ms

doris-robot avatar Apr 30 '24 09:04 doris-robot

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

query1	924	367	344	344
query2	6478	2469	2405	2405
query3	6654	218	216	216
query4	23043	21496	21172	21172
query5	4204	422	424	422
query6	284	178	174	174
query7	4597	295	294	294
query8	247	189	210	189
query9	8712	2433	2425	2425
query10	440	255	270	255
query11	14986	14184	14177	14177
query12	133	90	86	86
query13	1636	367	371	367
query14	9543	7448	8080	7448
query15	265	179	181	179
query16	8177	260	267	260
query17	1871	575	555	555
query18	2101	288	266	266
query19	332	147	148	147
query20	92	88	84	84
query21	195	124	125	124
query22	5015	4762	4803	4762
query23	33984	33210	33278	33210
query24	11944	2909	2895	2895
query25	664	360	362	360
query26	1774	151	148	148
query27	3023	322	333	322
query28	7857	2069	2056	2056
query29	1030	624	598	598
query30	314	151	151	151
query31	962	726	708	708
query32	99	53	53	53
query33	758	246	249	246
query34	1080	479	491	479
query35	830	647	677	647
query36	1103	933	946	933
query37	272	68	65	65
query38	3140	3014	3023	3014
query39	1579	1534	1551	1534
query40	277	125	125	125
query41	43	43	38	38
query42	107	96	100	96
query43	574	570	535	535
query44	1160	737	740	737
query45	262	238	248	238
query46	1080	714	743	714
query47	1938	1857	1867	1857
query48	360	300	304	300
query49	1172	396	406	396
query50	793	387	398	387
query51	6874	6732	6775	6732
query52	100	94	89	89
query53	349	279	279	279
query54	311	236	241	236
query55	79	72	72	72
query56	245	220	223	220
query57	1217	1125	1165	1125
query58	233	199	196	196
query59	3545	3321	3296	3296
query60	255	235	245	235
query61	91	110	88	88
query62	671	488	444	444
query63	309	281	285	281
query64	9702	7209	7108	7108
query65	3132	3057	3047	3047
query66	1364	340	327	327
query67	15598	15191	15137	15137
query68	5100	540	539	539
query69	472	308	317	308
query70	1157	1121	1125	1121
query71	413	270	267	267
query72	7240	2697	2493	2493
query73	700	325	330	325
query74	6544	6216	6012	6012
query75	3452	2665	2630	2630
query76	3386	1056	969	969
query77	407	278	270	270
query78	10858	10396	10177	10177
query79	8582	525	526	525
query80	1980	460	452	452
query81	553	225	221	221
query82	1460	95	99	95
query83	326	172	173	172
query84	268	90	90	90
query85	1998	327	318	318
query86	486	283	302	283
query87	3313	3036	3116	3036
query88	5153	2423	2494	2423
query89	507	382	375	375
query90	2004	179	179	179
query91	124	99	96	96
query92	62	47	47	47
query93	6178	524	505	505
query94	1263	181	181	181
query95	400	297	297	297
query96	604	264	260	260
query97	3135	2895	2933	2895
query98	233	222	216	216
query99	1277	900	861	861
Total cold run time: 301818 ms
Total hot run time: 186743 ms

doris-robot avatar Apr 30 '24 09:04 doris-robot

run feut

zddr avatar Apr 30 '24 10:04 zddr

run cloud_p1

zddr avatar May 06 '24 03:05 zddr

run buildall

zddr avatar May 06 '24 03:05 zddr

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

------ Round 1 ----------------------------------
q1	17609	4256	4235	4235
q2	2025	188	192	188
q3	10455	1229	1229	1229
q4	10188	839	697	697
q5	7475	2736	2689	2689
q6	225	141	132	132
q7	1036	611	606	606
q8	9224	2139	2092	2092
q9	10664	6757	6824	6757
q10	9383	3861	3857	3857
q11	445	239	245	239
q12	493	219	224	219
q13	17563	3179	3219	3179
q14	249	223	218	218
q15	514	454	477	454
q16	505	411	389	389
q17	979	780	675	675
q18	8255	7699	7746	7699
q19	2798	1531	1568	1531
q20	632	340	315	315
q21	5254	4195	4154	4154
q22	350	276	286	276
Total cold run time: 116321 ms
Total hot run time: 41830 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4522	4385	4393	4385
q2	384	263	291	263
q3	3117	2906	2836	2836
q4	1864	1634	1607	1607
q5	5474	5487	5467	5467
q6	215	127	125	125
q7	2297	1949	1994	1949
q8	3220	3386	3371	3371
q9	8707	8763	8786	8763
q10	3936	3762	3791	3762
q11	580	494	504	494
q12	817	615	649	615
q13	15852	3111	3084	3084
q14	308	294	278	278
q15	529	481	478	478
q16	483	441	428	428
q17	1793	1514	1499	1499
q18	7652	7619	7539	7539
q19	1639	1557	1536	1536
q20	1931	1762	1744	1744
q21	8311	4861	4789	4789
q22	575	487	487	487
Total cold run time: 74206 ms
Total hot run time: 55499 ms

doris-robot avatar May 06 '24 03:05 doris-robot

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

query1	894	358	352	352
query2	6423	2454	2402	2402
query3	6671	209	214	209
query4	23258	21234	21217	21217
query5	4157	426	452	426
query6	269	192	177	177
query7	4591	291	288	288
query8	245	197	183	183
query9	8581	2374	2355	2355
query10	420	260	244	244
query11	14916	14146	14207	14146
query12	134	91	87	87
query13	1632	376	371	371
query14	10238	8383	7620	7620
query15	259	162	176	162
query16	8019	261	264	261
query17	1716	599	559	559
query18	2016	294	278	278
query19	258	154	158	154
query20	94	89	89	89
query21	199	133	129	129
query22	5037	4824	4804	4804
query23	33737	33216	33279	33216
query24	6453	2917	2903	2903
query25	540	393	379	379
query26	698	156	149	149
query27	1880	317	332	317
query28	3656	2073	2071	2071
query29	865	628	627	627
query30	236	159	156	156
query31	956	741	728	728
query32	89	55	56	55
query33	516	269	256	256
query34	891	482	497	482
query35	778	694	669	669
query36	1050	915	899	899
query37	109	69	70	69
query38	3152	3006	2977	2977
query39	1611	1532	1533	1532
query40	203	132	132	132
query41	44	42	43	42
query42	108	99	98	98
query43	583	560	552	552
query44	1090	730	750	730
query45	273	254	255	254
query46	1053	713	716	713
query47	1947	1862	1884	1862
query48	366	299	298	298
query49	788	406	415	406
query50	853	384	389	384
query51	6684	6642	6532	6532
query52	102	88	90	88
query53	349	282	273	273
query54	264	234	250	234
query55	81	73	75	73
query56	244	222	220	220
query57	1200	1126	1144	1126
query58	215	193	195	193
query59	3521	3273	3184	3184
query60	244	242	246	242
query61	90	87	87	87
query62	574	438	459	438
query63	311	284	280	280
query64	8298	7182	7153	7153
query65	3068	3037	3036	3036
query66	770	335	338	335
query67	15670	15027	15049	15027
query68	9751	537	569	537
query69	611	305	310	305
query70	1311	1057	1143	1057
query71	489	269	269	269
query72	8560	2530	2306	2306
query73	1600	319	320	319
query74	6723	6011	6011	6011
query75	4718	2582	2633	2582
query76	5435	1024	1004	1004
query77	696	266	265	265
query78	11031	10273	10161	10161
query79	10980	510	510	510
query80	1910	425	432	425
query81	501	223	220	220
query82	177	94	95	94
query83	208	169	167	167
query84	269	88	83	83
query85	984	261	273	261
query86	347	274	307	274
query87	3265	3049	3027	3027
query88	5241	2300	2306	2300
query89	514	382	377	377
query90	2396	180	183	180
query91	124	102	94	94
query92	61	46	48	46
query93	6297	498	493	493
query94	1552	183	177	177
query95	395	292	302	292
query96	620	267	262	262
query97	3142	2925	2955	2925
query98	258	222	217	217
query99	1106	837	853	837
Total cold run time: 297509 ms
Total hot run time: 186067 ms

doris-robot avatar May 06 '24 04:05 doris-robot