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](mtmv) Fix mv is deleted in nested mv causing query err and fix some test #45744

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

seawinde
Copy link
Contributor

What problem does this PR solve?

if mv2 sql contains mv1 as following, if drop mv_level_1, query mv2 directly would cause err, this fix this

        CREATE MATERIALIZED VIEW mv2
        BUILD IMMEDIATE REFRESH COMPLETE ON MANUAL
        DISTRIBUTED BY RANDOM BUCKETS 2
        PROPERTIES ('replication_num' = '1') 
        AS
select * from mv_level_1;

Issue Number: close #xxx

Related PR: #45045

Problem Summary:

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@Thearas
Copy link
Contributor

Thearas commented Dec 20, 2024

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?

@seawinde seawinde changed the title [fix](mtmv) Fix mv is deleted in nested mv, query err and fix some test [fix](mtmv) Fix mv is deleted in nested mv causing query err and fix some test Dec 20, 2024
@seawinde
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17571	7409	7229	7229
q2	2049	177	172	172
q3	10556	1098	1221	1098
q4	10569	707	743	707
q5	7614	2691	2708	2691
q6	234	148	144	144
q7	973	635	615	615
q8	9244	1843	1891	1843
q9	6520	6437	6481	6437
q10	7394	2317	2343	2317
q11	472	279	260	260
q12	434	231	229	229
q13	17767	2928	2953	2928
q14	267	225	210	210
q15	563	498	495	495
q16	662	594	579	579
q17	978	531	563	531
q18	7293	6793	6782	6782
q19	1360	981	935	935
q20	447	188	184	184
q21	4101	3287	3305	3287
q22	382	323	320	320
Total cold run time: 107450 ms
Total hot run time: 39993 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7229	7268	7205	7205
q2	330	231	232	231
q3	2901	2784	2922	2784
q4	2044	1800	1858	1800
q5	5667	5603	5614	5603
q6	228	146	146	146
q7	2253	1901	1819	1819
q8	3354	3547	3478	3478
q9	8962	8940	9001	8940
q10	3582	3548	3537	3537
q11	610	502	526	502
q12	832	594	601	594
q13	11530	3213	3215	3213
q14	306	272	289	272
q15	572	509	506	506
q16	682	662	637	637
q17	1847	1630	1619	1619
q18	8261	7895	7843	7843
q19	1708	1568	1507	1507
q20	2070	1856	1844	1844
q21	5606	5529	5556	5529
q22	647	610	574	574
Total cold run time: 71221 ms
Total hot run time: 60183 ms

@doris-robot
Copy link

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

query1	1301	954	902	902
query2	6230	2317	2359	2317
query3	10965	4523	4663	4523
query4	33321	23442	23363	23363
query5	4393	456	434	434
query6	290	187	190	187
query7	4008	320	313	313
query8	322	243	251	243
query9	9362	2727	2715	2715
query10	477	233	240	233
query11	18086	15070	15168	15070
query12	149	98	101	98
query13	1567	437	423	423
query14	9060	7108	6797	6797
query15	252	205	206	205
query16	8124	434	467	434
query17	1525	620	593	593
query18	2201	335	328	328
query19	253	171	171	171
query20	123	118	121	118
query21	211	109	108	108
query22	4730	4509	4448	4448
query23	34925	33940	33453	33453
query24	10407	2547	2610	2547
query25	653	420	444	420
query26	1046	162	214	162
query27	2260	344	349	344
query28	6858	2487	2475	2475
query29	858	405	411	405
query30	230	150	158	150
query31	1018	839	815	815
query32	94	62	57	57
query33	760	292	350	292
query34	1144	545	512	512
query35	893	760	749	749
query36	1137	959	1002	959
query37	121	71	72	71
query38	4378	4136	4040	4040
query39	1521	1462	1443	1443
query40	224	110	100	100
query41	46	49	44	44
query42	123	104	102	102
query43	539	505	500	500
query44	1325	827	834	827
query45	193	170	181	170
query46	1190	743	745	743
query47	2007	1932	1928	1928
query48	453	327	338	327
query49	890	398	412	398
query50	832	411	414	411
query51	7404	7211	7094	7094
query52	109	88	93	88
query53	264	183	182	182
query54	1109	403	421	403
query55	98	82	83	82
query56	275	247	246	246
query57	1287	1193	1167	1167
query58	237	234	239	234
query59	3285	3140	3062	3062
query60	277	252	241	241
query61	109	102	109	102
query62	882	701	692	692
query63	234	192	201	192
query64	3820	687	660	660
query65	3337	3237	3259	3237
query66	772	308	303	303
query67	16660	15542	15584	15542
query68	5885	551	541	541
query69	513	249	250	249
query70	1214	1103	1169	1103
query71	521	264	250	250
query72	7225	4049	4201	4049
query73	802	370	363	363
query74	10208	8807	8847	8807
query75	4176	2686	2667	2667
query76	4365	1088	1067	1067
query77	688	267	268	267
query78	10166	9337	9431	9337
query79	1146	612	601	601
query80	979	442	433	433
query81	513	244	235	235
query82	213	111	113	111
query83	197	155	147	147
query84	322	68	67	67
query85	993	301	296	296
query86	362	314	288	288
query87	4545	4388	4472	4388
query88	4174	2206	2181	2181
query89	426	298	287	287
query90	2076	186	181	181
query91	152	105	111	105
query92	68	50	52	50
query93	3166	538	536	536
query94	836	280	266	266
query95	356	253	247	247
query96	627	273	282	273
query97	2820	2710	2703	2703
query98	216	204	195	195
query99	1570	1342	1315	1315
Total cold run time: 304754 ms
Total hot run time: 195599 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.03
query2	0.07	0.05	0.03
query3	0.23	0.07	0.07
query4	1.61	0.10	0.11
query5	0.40	0.41	0.43
query6	1.12	0.66	0.64
query7	0.03	0.02	0.01
query8	0.04	0.04	0.03
query9	0.58	0.50	0.49
query10	0.55	0.61	0.56
query11	0.14	0.10	0.10
query12	0.15	0.11	0.10
query13	0.61	0.59	0.60
query14	2.71	2.76	2.92
query15	0.87	0.83	0.82
query16	0.40	0.37	0.39
query17	1.06	1.06	0.98
query18	0.23	0.21	0.22
query19	1.92	1.89	2.00
query20	0.01	0.01	0.01
query21	15.38	0.59	0.60
query22	2.28	2.57	2.45
query23	16.96	0.94	0.82
query24	3.01	0.56	1.86
query25	0.23	0.15	0.05
query26	0.50	0.15	0.15
query27	0.05	0.04	0.03
query28	10.19	1.11	1.07
query29	12.57	3.21	3.18
query30	0.26	0.06	0.07
query31	2.84	0.39	0.37
query32	3.25	0.46	0.46
query33	3.06	3.11	3.18
query34	17.09	4.41	4.50
query35	4.47	4.39	4.52
query36	0.65	0.47	0.49
query37	0.09	0.06	0.06
query38	0.05	0.03	0.03
query39	0.04	0.03	0.03
query40	0.18	0.13	0.12
query41	0.08	0.02	0.02
query42	0.04	0.02	0.02
query43	0.03	0.03	0.03
Total cold run time: 106.06 s
Total hot run time: 32.68 s

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