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) Disable sql_limit variable when query rewrite by materialize view #40106

Merged
merged 11 commits into from
Oct 11, 2024

Conversation

seawinde
Copy link
Contributor

Proposed changes

In BI or some other SQL client,it will set sql_select_limit or default_order_by_limit session variables automatically.
This will make mistake when query rewrite by materialized view, Because after query rewrite by materialized view, the rewritten plan would be optimized by rules again which should add limit on SQL.
This pr fix this.

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

@seawinde
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	18225	4541	4440	4440
q2	2756	183	179	179
q3	11178	1123	1131	1123
q4	10198	713	698	698
q5	7788	2879	2818	2818
q6	236	141	141	141
q7	951	640	626	626
q8	9637	2043	2071	2043
q9	7283	6533	6509	6509
q10	7023	2202	2167	2167
q11	469	244	252	244
q12	399	226	224	224
q13	17781	3027	3000	3000
q14	275	238	241	238
q15	536	470	497	470
q16	591	499	509	499
q17	991	592	699	592
q18	7449	7011	6844	6844
q19	1397	1027	1023	1023
q20	684	333	327	327
q21	4347	3075	3036	3036
q22	1137	1043	1033	1033
Total cold run time: 111331 ms
Total hot run time: 38274 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4378	4253	4274	4253
q2	375	283	277	277
q3	2896	2693	2705	2693
q4	1931	1643	1656	1643
q5	5396	5430	5427	5427
q6	222	129	135	129
q7	2103	1725	1742	1725
q8	3196	3354	3352	3352
q9	8411	8448	8368	8368
q10	3474	3183	3168	3168
q11	597	504	502	502
q12	783	609	591	591
q13	11649	3038	3092	3038
q14	305	270	261	261
q15	525	503	477	477
q16	604	568	547	547
q17	1792	1518	1474	1474
q18	7760	7454	7385	7385
q19	1684	1564	1421	1421
q20	2085	1837	1844	1837
q21	5509	5202	5278	5202
q22	1135	1078	1077	1077
Total cold run time: 66810 ms
Total hot run time: 54847 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 188309 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 1194638c2d543a7cbcc808ae9f11c42de2fed52c, data reload: false

query1	906	370	360	360
query2	6448	1902	1854	1854
query3	6648	212	225	212
query4	34205	23143	23187	23143
query5	4149	512	491	491
query6	259	162	171	162
query7	4582	300	294	294
query8	250	201	201	201
query9	8480	2503	2484	2484
query10	434	276	279	276
query11	17768	15199	15028	15028
query12	151	96	95	95
query13	1638	386	371	371
query14	9492	7169	7225	7169
query15	288	191	168	168
query16	8078	453	467	453
query17	1583	549	535	535
query18	2145	308	282	282
query19	278	140	140	140
query20	114	108	108	108
query21	210	107	102	102
query22	4336	4199	4108	4108
query23	34091	33238	33421	33238
query24	11353	2906	2834	2834
query25	622	378	380	378
query26	1131	156	158	156
query27	2850	286	282	282
query28	7786	2124	2111	2111
query29	816	409	401	401
query30	312	160	158	158
query31	995	754	784	754
query32	98	55	60	55
query33	759	315	288	288
query34	933	481	488	481
query35	887	739	721	721
query36	1128	927	940	927
query37	164	95	96	95
query38	3968	3861	3838	3838
query39	1439	1406	1450	1406
query40	207	117	116	116
query41	50	46	47	46
query42	114	95	95	95
query43	507	485	467	467
query44	1225	768	764	764
query45	193	164	172	164
query46	1090	747	765	747
query47	1909	1805	1818	1805
query48	369	304	302	302
query49	1090	416	430	416
query50	814	433	415	415
query51	7201	7140	7000	7000
query52	97	89	90	89
query53	266	189	181	181
query54	1033	454	460	454
query55	79	75	78	75
query56	275	257	257	257
query57	1212	1069	1054	1054
query58	250	232	240	232
query59	3026	2716	2681	2681
query60	297	278	268	268
query61	102	98	102	98
query62	870	655	658	655
query63	216	184	183	183
query64	5387	673	663	663
query65	3253	3177	3113	3113
query66	1413	345	344	344
query67	15604	15387	15607	15387
query68	3394	594	598	594
query69	390	280	281	280
query70	1167	1138	1136	1136
query71	335	282	275	275
query72	6489	4223	4171	4171
query73	748	335	345	335
query74	9179	8708	8836	8708
query75	3425	2697	2728	2697
query76	1905	1021	985	985
query77	509	334	321	321
query78	9646	9155	9070	9070
query79	1084	544	549	544
query80	884	525	545	525
query81	564	237	241	237
query82	1269	143	149	143
query83	246	169	171	169
query84	230	79	89	79
query85	1103	348	339	339
query86	306	295	300	295
query87	4386	4318	4244	4244
query88	3210	2387	2370	2370
query89	398	289	300	289
query90	1952	208	212	208
query91	142	115	116	115
query92	65	54	55	54
query93	1038	553	548	548
query94	876	311	322	311
query95	373	280	282	280
query96	601	276	275	275
query97	3232	3046	3074	3046
query98	222	211	206	206
query99	1504	1230	1285	1230
Total cold run time: 290795 ms
Total hot run time: 188309 ms

@doris-robot
Copy link

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

query1	0.05	0.04	0.04
query2	0.07	0.04	0.03
query3	0.23	0.05	0.05
query4	1.69	0.07	0.07
query5	0.52	0.51	0.48
query6	1.12	0.74	0.72
query7	0.02	0.02	0.02
query8	0.06	0.04	0.04
query9	0.55	0.49	0.48
query10	0.54	0.53	0.54
query11	0.16	0.12	0.12
query12	0.14	0.12	0.12
query13	0.61	0.59	0.59
query14	2.10	2.10	2.06
query15	0.89	0.81	0.81
query16	0.35	0.38	0.38
query17	1.01	0.96	0.97
query18	0.20	0.20	0.20
query19	1.92	1.77	1.87
query20	0.02	0.01	0.01
query21	15.39	0.69	0.67
query22	4.20	6.50	2.43
query23	18.28	1.34	1.27
query24	2.16	0.24	0.22
query25	0.15	0.09	0.08
query26	0.26	0.17	0.18
query27	0.07	0.08	0.08
query28	13.22	1.02	1.00
query29	12.64	3.37	3.35
query30	0.24	0.06	0.05
query31	3.26	0.40	0.40
query32	3.23	0.48	0.47
query33	2.94	3.02	3.01
query34	17.01	4.41	4.43
query35	4.50	4.50	4.48
query36	0.66	0.50	0.47
query37	0.19	0.16	0.16
query38	0.16	0.16	0.15
query39	0.05	0.04	0.03
query40	0.16	0.13	0.13
query41	0.09	0.05	0.05
query42	0.06	0.06	0.05
query43	0.04	0.04	0.04
Total cold run time: 111.21 s
Total hot run time: 32.65 s

@seawinde
Copy link
Contributor Author

seawinde commented Sep 2, 2024

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17700	4625	4313	4313
q2	2023	187	181	181
q3	11895	990	1065	990
q4	10515	740	797	740
q5	7792	2851	2788	2788
q6	228	139	139	139
q7	961	626	598	598
q8	9347	2108	2086	2086
q9	7241	6584	6533	6533
q10	6989	2213	2225	2213
q11	492	238	236	236
q12	398	221	221	221
q13	18756	3052	3079	3052
q14	281	229	235	229
q15	518	490	498	490
q16	585	519	535	519
q17	980	730	720	720
q18	7407	6810	6903	6810
q19	1374	1029	1077	1029
q20	683	325	328	325
q21	3975	3107	3265	3107
q22	1145	1087	1014	1014
Total cold run time: 111285 ms
Total hot run time: 38333 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4325	4292	4274	4274
q2	371	259	276	259
q3	2865	2698	2724	2698
q4	1963	1703	1724	1703
q5	5698	5654	5699	5654
q6	237	138	135	135
q7	2239	1824	1806	1806
q8	3296	3423	3480	3423
q9	8833	8869	9028	8869
q10	3649	3353	3367	3353
q11	593	515	518	515
q12	839	654	650	650
q13	13530	3215	3298	3215
q14	319	295	284	284
q15	539	514	496	496
q16	606	567	594	567
q17	1877	1571	1552	1552
q18	8067	7845	7810	7810
q19	1732	1567	1553	1553
q20	2182	1890	1900	1890
q21	5814	5416	5394	5394
q22	1166	1038	1063	1038
Total cold run time: 70740 ms
Total hot run time: 57138 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 194014 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 8d5d500a435029869eec072712a6a64301feff5e, data reload: false

query1	1267	884	882	882
query2	6297	1972	1810	1810
query3	10708	4257	4206	4206
query4	59486	26839	23361	23361
query5	5397	513	502	502
query6	412	162	159	159
query7	5778	299	296	296
query8	301	211	207	207
query9	8839	2541	2523	2523
query10	467	306	268	268
query11	18234	15002	15469	15002
query12	160	101	111	101
query13	1514	406	391	391
query14	11245	7387	6956	6956
query15	226	187	177	177
query16	7499	450	476	450
query17	1102	574	562	562
query18	1349	292	298	292
query19	327	154	151	151
query20	131	111	115	111
query21	220	107	105	105
query22	4671	4594	4380	4380
query23	34446	33846	33800	33800
query24	5956	2969	2905	2905
query25	553	398	406	398
query26	690	161	158	158
query27	1780	278	280	278
query28	3879	2090	2090	2090
query29	672	429	438	429
query30	276	157	163	157
query31	952	767	800	767
query32	78	53	56	53
query33	474	292	288	288
query34	858	501	482	482
query35	871	720	713	713
query36	1045	927	925	925
query37	150	102	89	89
query38	4024	3887	3899	3887
query39	1470	1381	1401	1381
query40	200	119	117	117
query41	45	53	46	46
query42	115	98	96	96
query43	502	477	472	472
query44	1122	758	756	756
query45	201	174	168	168
query46	1076	749	743	743
query47	1880	1781	1815	1781
query48	378	300	305	300
query49	782	441	448	441
query50	813	428	428	428
query51	7134	7028	7031	7028
query52	98	90	92	90
query53	255	182	185	182
query54	584	459	464	459
query55	77	78	77	77
query56	286	267	268	267
query57	1211	1061	1079	1061
query58	230	243	303	243
query59	3011	2840	2790	2790
query60	285	273	256	256
query61	100	95	99	95
query62	764	644	651	644
query63	221	182	189	182
query64	2815	701	671	671
query65	3181	3147	3163	3147
query66	662	341	333	333
query67	15579	15424	15254	15254
query68	3449	583	566	566
query69	394	290	291	290
query70	1122	1167	1142	1142
query71	357	275	302	275
query72	6319	3967	4068	3967
query73	748	331	336	331
query74	9112	8820	8880	8820
query75	3331	2594	2688	2594
query76	1480	966	974	966
query77	558	337	316	316
query78	10803	10478	9582	9582
query79	1107	553	532	532
query80	813	519	497	497
query81	562	237	234	234
query82	278	148	143	143
query83	242	154	147	147
query84	261	75	74	74
query85	745	291	337	291
query86	304	284	292	284
query87	4438	4287	4250	4250
query88	3253	2374	2357	2357
query89	385	288	286	286
query90	1755	190	186	186
query91	123	101	106	101
query92	60	52	54	52
query93	1074	526	539	526
query94	670	307	292	292
query95	348	263	259	259
query96	582	274	272	272
query97	3241	3108	3088	3088
query98	212	200	203	200
query99	1515	1275	1295	1275
Total cold run time: 307052 ms
Total hot run time: 194014 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.04
query2	0.07	0.04	0.04
query3	0.22	0.05	0.05
query4	1.68	0.07	0.07
query5	0.51	0.50	0.48
query6	1.13	0.74	0.73
query7	0.02	0.02	0.01
query8	0.05	0.04	0.05
query9	0.53	0.50	0.49
query10	0.54	0.54	0.54
query11	0.16	0.12	0.12
query12	0.16	0.12	0.12
query13	0.60	0.58	0.59
query14	2.11	2.07	2.04
query15	0.90	0.83	0.83
query16	0.37	0.38	0.37
query17	0.99	1.01	0.99
query18	0.20	0.19	0.20
query19	1.79	1.70	1.74
query20	0.01	0.00	0.01
query21	15.40	0.68	0.67
query22	4.24	7.54	1.61
query23	18.25	1.34	1.30
query24	2.19	0.23	0.22
query25	0.15	0.09	0.09
query26	0.27	0.18	0.19
query27	0.08	0.08	0.08
query28	13.15	1.03	1.02
query29	12.65	3.33	3.34
query30	0.25	0.05	0.04
query31	2.89	0.40	0.40
query32	3.25	0.49	0.47
query33	2.99	2.96	2.99
query34	17.00	4.39	4.41
query35	4.51	4.47	4.47
query36	0.65	0.46	0.48
query37	0.19	0.17	0.17
query38	0.16	0.16	0.16
query39	0.05	0.04	0.05
query40	0.15	0.13	0.14
query41	0.10	0.05	0.05
query42	0.06	0.05	0.05
query43	0.05	0.04	0.04
Total cold run time: 110.76 s
Total hot run time: 31.76 s

@seawinde
Copy link
Contributor Author

seawinde commented Sep 2, 2024

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17658	4428	4297	4297
q2	2027	184	179	179
q3	11669	914	1124	914
q4	10524	781	731	731
q5	7761	2837	2785	2785
q6	223	136	135	135
q7	964	625	599	599
q8	9316	2066	2103	2066
q9	7150	6557	6542	6542
q10	6984	2112	2227	2112
q11	452	239	236	236
q12	389	228	232	228
q13	18168	3083	3066	3066
q14	278	251	233	233
q15	536	495	492	492
q16	589	537	513	513
q17	977	683	722	683
q18	7265	6776	6927	6776
q19	1390	1039	1034	1034
q20	679	329	339	329
q21	3898	2755	2751	2751
q22	1116	1030	1020	1020
Total cold run time: 110013 ms
Total hot run time: 37721 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4406	4270	4313	4270
q2	368	279	261	261
q3	2850	2643	2608	2608
q4	1912	1668	1677	1668
q5	5567	5696	5657	5657
q6	225	137	135	135
q7	2235	1826	1800	1800
q8	3270	3400	3441	3400
q9	8856	8796	8785	8785
q10	3559	3361	3369	3361
q11	593	497	509	497
q12	816	641	655	641
q13	15183	3208	3210	3208
q14	313	291	302	291
q15	532	487	495	487
q16	620	572	561	561
q17	1856	1539	1539	1539
q18	8091	7864	7795	7795
q19	1710	1666	1535	1535
q20	2158	1931	1920	1920
q21	5781	5501	5525	5501
q22	1139	1073	1017	1017
Total cold run time: 72040 ms
Total hot run time: 56937 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 193727 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 6e7ffe070081e4e83471d2e92edc03a2eb7f2a6a, data reload: false

query1	1275	884	857	857
query2	6270	1991	1904	1904
query3	10637	3986	3850	3850
query4	60696	25301	23201	23201
query5	5430	495	490	490
query6	419	172	169	169
query7	5772	295	293	293
query8	283	206	203	203
query9	9043	2490	2494	2490
query10	502	272	258	258
query11	18327	15112	15584	15112
query12	161	103	102	102
query13	1574	387	382	382
query14	10180	7233	7473	7233
query15	247	174	176	174
query16	7621	462	492	462
query17	1108	558	548	548
query18	2110	284	290	284
query19	295	146	148	146
query20	124	108	113	108
query21	220	106	115	106
query22	4895	4632	4817	4632
query23	34018	33452	33468	33452
query24	5935	2890	2868	2868
query25	563	392	390	390
query26	690	155	154	154
query27	1812	277	281	277
query28	3677	2073	2050	2050
query29	693	407	410	407
query30	249	152	154	152
query31	941	750	785	750
query32	89	53	59	53
query33	426	287	275	275
query34	846	486	477	477
query35	852	723	714	714
query36	1052	949	920	920
query37	149	91	99	91
query38	4069	3968	3907	3907
query39	1452	1398	1382	1382
query40	203	121	120	120
query41	48	48	46	46
query42	119	95	99	95
query43	515	464	462	462
query44	1102	765	768	765
query45	196	168	168	168
query46	1092	728	772	728
query47	1886	1832	1842	1832
query48	371	297	308	297
query49	775	438	448	438
query50	822	413	421	413
query51	7247	7121	7023	7023
query52	99	86	88	86
query53	249	186	178	178
query54	572	460	461	460
query55	78	81	76	76
query56	294	253	275	253
query57	1210	1075	1087	1075
query58	238	238	237	237
query59	2977	2862	2748	2748
query60	303	285	285	285
query61	127	120	118	118
query62	748	649	687	649
query63	222	185	186	185
query64	2956	771	743	743
query65	3202	3159	3179	3159
query66	699	347	346	346
query67	15351	15320	15278	15278
query68	3043	594	604	594
query69	432	291	287	287
query70	1180	1134	1163	1134
query71	378	277	279	277
query72	6334	4237	4268	4237
query73	762	329	331	329
query74	9171	8880	8891	8880
query75	3323	2690	2639	2639
query76	1454	964	965	964
query77	535	363	313	313
query78	9914	9124	9272	9124
query79	1793	532	519	519
query80	858	524	503	503
query81	577	241	236	236
query82	241	153	140	140
query83	253	155	147	147
query84	268	74	76	74
query85	854	308	280	280
query86	387	308	301	301
query87	4553	4311	4312	4311
query88	3264	2349	2357	2349
query89	390	286	281	281
query90	2005	187	193	187
query91	124	98	98	98
query92	61	51	53	51
query93	1729	541	545	541
query94	886	294	298	294
query95	355	260	258	258
query96	591	272	270	270
query97	3233	3077	3059	3059
query98	221	202	196	196
query99	1526	1299	1268	1268
Total cold run time: 309098 ms
Total hot run time: 193727 ms

@doris-robot
Copy link

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

query1	0.05	0.04	0.04
query2	0.08	0.04	0.04
query3	0.22	0.06	0.06
query4	1.66	0.08	0.10
query5	0.50	0.49	0.48
query6	1.12	0.73	0.74
query7	0.02	0.01	0.01
query8	0.05	0.04	0.05
query9	0.55	0.49	0.49
query10	0.54	0.55	0.53
query11	0.16	0.12	0.12
query12	0.15	0.12	0.12
query13	0.60	0.60	0.59
query14	2.13	2.05	2.08
query15	0.85	0.82	0.81
query16	0.37	0.38	0.39
query17	1.00	1.01	0.98
query18	0.20	0.20	0.20
query19	1.81	1.76	1.71
query20	0.01	0.01	0.02
query21	15.38	0.67	0.67
query22	4.37	7.29	2.02
query23	18.31	1.41	1.29
query24	2.03	0.23	0.23
query25	0.17	0.08	0.07
query26	0.27	0.18	0.17
query27	0.08	0.07	0.08
query28	13.25	1.01	0.99
query29	12.65	3.33	3.36
query30	0.24	0.06	0.05
query31	2.87	0.39	0.38
query32	3.27	0.48	0.48
query33	3.04	3.02	3.00
query34	17.06	4.40	4.36
query35	4.44	4.47	4.44
query36	0.67	0.49	0.47
query37	0.19	0.16	0.15
query38	0.15	0.15	0.15
query39	0.04	0.04	0.04
query40	0.16	0.12	0.14
query41	0.09	0.05	0.05
query42	0.05	0.05	0.06
query43	0.05	0.04	0.04
Total cold run time: 110.9 s
Total hot run time: 32.09 s

@seawinde seawinde force-pushed the fix_add_limit_wrongly_when_mv branch from 6e7ffe0 to 6703ada Compare September 3, 2024 07:49
@seawinde
Copy link
Contributor Author

seawinde commented Sep 3, 2024

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17966	4554	4425	4425
q2	2175	183	176	176
q3	10484	1113	1037	1037
q4	10147	740	712	712
q5	7728	2823	2811	2811
q6	226	138	140	138
q7	957	609	606	606
q8	9358	2053	2033	2033
q9	6982	6524	6506	6506
q10	6998	2178	2195	2178
q11	470	247	256	247
q12	395	228	222	222
q13	18895	3100	3105	3100
q14	281	232	244	232
q15	534	484	487	484
q16	589	496	521	496
q17	982	641	743	641
q18	7385	6811	6884	6811
q19	1392	1036	1025	1025
q20	706	338	341	338
q21	3905	3099	3065	3065
q22	1084	996	1049	996
Total cold run time: 109639 ms
Total hot run time: 38279 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4419	4305	4312	4305
q2	384	274	265	265
q3	2879	2736	2666	2666
q4	1953	1643	1652	1643
q5	5389	5380	5438	5380
q6	222	130	131	130
q7	2119	1724	1748	1724
q8	3208	3365	3345	3345
q9	8472	8448	8449	8448
q10	3454	3227	3193	3193
q11	620	485	488	485
q12	815	607	586	586
q13	12358	3117	3086	3086
q14	310	266	278	266
q15	523	477	486	477
q16	598	566	551	551
q17	1806	1515	1486	1486
q18	7712	7369	7370	7369
q19	1685	1422	1516	1422
q20	2053	1801	1841	1801
q21	5449	5318	5223	5223
q22	1115	1053	1005	1005
Total cold run time: 67543 ms
Total hot run time: 54856 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 187877 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 6703ada1d9f15879d5f6a2c1de148e29a3e414c6, data reload: false

query1	912	379	372	372
query2	6488	2019	1905	1905
query3	6650	207	216	207
query4	34139	23307	23216	23216
query5	4197	500	513	500
query6	275	170	170	170
query7	4591	292	285	285
query8	253	207	200	200
query9	8670	2451	2407	2407
query10	450	273	262	262
query11	17931	15048	15060	15048
query12	161	101	99	99
query13	1626	371	360	360
query14	10004	7221	7469	7221
query15	287	178	178	178
query16	7681	456	403	403
query17	1579	575	544	544
query18	1427	288	282	282
query19	254	142	141	141
query20	120	113	109	109
query21	212	108	101	101
query22	4453	4148	4230	4148
query23	34360	33296	33399	33296
query24	11163	2839	2883	2839
query25	622	373	383	373
query26	1027	161	157	157
query27	2648	280	279	279
query28	7395	2040	2019	2019
query29	751	417	433	417
query30	312	155	160	155
query31	977	786	754	754
query32	99	54	53	53
query33	754	285	282	282
query34	988	492	481	481
query35	879	729	726	726
query36	1072	969	954	954
query37	158	95	89	89
query38	3955	3867	3935	3867
query39	1442	1376	1375	1375
query40	191	118	115	115
query41	48	49	46	46
query42	116	94	96	94
query43	526	500	500	500
query44	1272	736	730	730
query45	194	168	166	166
query46	1110	724	750	724
query47	1915	1798	1824	1798
query48	383	305	288	288
query49	1093	442	439	439
query50	808	407	423	407
query51	7012	6836	6913	6836
query52	99	93	89	89
query53	256	189	184	184
query54	960	471	459	459
query55	76	75	77	75
query56	278	272	263	263
query57	1187	1061	1065	1061
query58	261	250	239	239
query59	3002	2896	2877	2877
query60	314	282	284	282
query61	127	123	122	122
query62	830	659	700	659
query63	224	202	180	180
query64	5207	684	643	643
query65	3266	3134	3149	3134
query66	1334	341	336	336
query67	15763	15458	15167	15167
query68	3322	568	578	568
query69	402	292	267	267
query70	1173	1078	1067	1067
query71	335	280	275	275
query72	6263	4097	3915	3915
query73	753	327	324	324
query74	9015	8887	8966	8887
query75	3395	2724	2693	2693
query76	1885	999	994	994
query77	481	327	324	324
query78	9618	9118	9099	9099
query79	1029	544	532	532
query80	682	510	501	501
query81	503	241	239	239
query82	236	146	142	142
query83	225	153	149	149
query84	228	78	76	76
query85	702	294	277	277
query86	300	306	291	291
query87	4345	4235	4502	4235
query88	2901	2350	2341	2341
query89	380	283	284	283
query90	1857	191	189	189
query91	126	102	100	100
query92	59	49	49	49
query93	1033	536	537	536
query94	791	282	297	282
query95	357	254	255	254
query96	589	265	272	265
query97	3209	3068	3127	3068
query98	215	203	242	203
query99	1462	1294	1265	1265
Total cold run time: 286685 ms
Total hot run time: 187877 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.04
query2	0.09	0.04	0.04
query3	0.23	0.06	0.06
query4	1.66	0.09	0.10
query5	0.49	0.50	0.49
query6	1.14	0.74	0.73
query7	0.02	0.01	0.01
query8	0.05	0.05	0.05
query9	0.53	0.50	0.48
query10	0.55	0.53	0.54
query11	0.15	0.11	0.12
query12	0.16	0.12	0.12
query13	0.62	0.59	0.60
query14	2.12	2.13	2.13
query15	0.91	0.82	0.83
query16	0.37	0.35	0.38
query17	1.02	0.97	0.99
query18	0.21	0.21	0.21
query19	1.86	1.91	1.80
query20	0.01	0.01	0.01
query21	15.79	0.66	0.66
query22	4.47	7.52	1.69
query23	18.29	1.40	1.23
query24	2.16	0.22	0.22
query25	0.16	0.09	0.08
query26	0.27	0.20	0.18
query27	0.08	0.09	0.08
query28	13.24	1.02	0.99
query29	12.60	3.34	3.36
query30	0.24	0.07	0.06
query31	2.85	0.41	0.42
query32	3.23	0.49	0.48
query33	3.00	2.98	3.02
query34	17.25	4.35	4.44
query35	4.41	4.41	4.43
query36	0.66	0.47	0.47
query37	0.19	0.16	0.18
query38	0.16	0.15	0.15
query39	0.05	0.04	0.04
query40	0.17	0.13	0.14
query41	0.10	0.05	0.04
query42	0.06	0.04	0.04
query43	0.06	0.04	0.04
Total cold run time: 111.72 s
Total hot run time: 31.86 s

@seawinde seawinde force-pushed the fix_add_limit_wrongly_when_mv branch from 6703ada to e4abc5f Compare September 4, 2024 02:06
@seawinde
Copy link
Contributor Author

seawinde commented Sep 4, 2024

run buildall

@@ -267,7 +269,26 @@ public static Plan rewriteByRules(
CascadesContext rewrittenPlanContext = CascadesContext.initContext(
cascadesContext.getStatementContext(), rewrittenPlan,
cascadesContext.getCurrentJobContext().getRequiredProperties());
rewrittenPlan = planRewriter.apply(rewrittenPlanContext);
// Tmp old disable rule variable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set disable rules here, not everywhere

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17622	4477	4278	4278
q2	2026	179	181	179
q3	11843	957	1113	957
q4	10515	715	609	609
q5	7738	2793	2781	2781
q6	225	134	132	132
q7	946	603	597	597
q8	9311	2035	2049	2035
q9	7072	6505	6532	6505
q10	6997	2219	2143	2143
q11	446	237	235	235
q12	384	214	221	214
q13	18705	3073	3085	3073
q14	281	235	230	230
q15	521	491	488	488
q16	572	521	507	507
q17	976	699	727	699
q18	7284	6855	6908	6855
q19	1399	1088	1069	1069
q20	669	327	329	327
q21	4430	3007	2814	2814
q22	1138	1019	1031	1019
Total cold run time: 111100 ms
Total hot run time: 37746 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4414	4309	4287	4287
q2	381	278	278	278
q3	2890	2651	2648	2648
q4	1943	1597	1645	1597
q5	5611	5669	5711	5669
q6	230	136	131	131
q7	2236	1850	1811	1811
q8	3306	3371	3426	3371
q9	8800	8736	8751	8736
q10	3570	3348	3410	3348
q11	617	510	501	501
q12	821	647	660	647
q13	14172	3222	3282	3222
q14	318	288	277	277
q15	520	484	484	484
q16	611	560	567	560
q17	1832	1545	1530	1530
q18	8090	7777	7755	7755
q19	1702	1575	1636	1575
q20	2179	1910	1956	1910
q21	5687	5494	5505	5494
q22	1147	1060	1076	1060
Total cold run time: 71077 ms
Total hot run time: 56891 ms

@doris-robot
Copy link

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

query1	1257	902	860	860
query2	6285	1921	1917	1917
query3	10715	4247	4152	4152
query4	60355	24110	23232	23232
query5	5392	488	477	477
query6	415	159	158	158
query7	5895	293	290	290
query8	292	209	210	209
query9	9089	2504	2497	2497
query10	515	273	252	252
query11	18262	15101	15472	15101
query12	160	102	100	100
query13	1557	393	382	382
query14	10226	7178	7083	7083
query15	225	190	178	178
query16	7552	494	491	491
query17	1148	582	596	582
query18	1782	289	291	289
query19	294	144	137	137
query20	124	109	108	108
query21	202	104	104	104
query22	5004	4625	5054	4625
query23	34305	33499	33411	33411
query24	5928	2931	2839	2839
query25	544	386	382	382
query26	693	154	151	151
query27	1793	273	274	273
query28	3591	2060	2051	2051
query29	715	430	420	420
query30	242	183	154	154
query31	954	755	779	755
query32	81	48	54	48
query33	464	279	271	271
query34	915	459	467	459
query35	843	713	700	700
query36	1068	926	926	926
query37	153	96	86	86
query38	3982	3883	3914	3883
query39	1435	1379	1420	1379
query40	199	115	111	111
query41	46	45	42	42
query42	116	97	95	95
query43	501	467	467	467
query44	1104	733	726	726
query45	207	168	166	166
query46	1166	761	751	751
query47	1959	1804	1815	1804
query48	380	295	303	295
query49	780	437	431	431
query50	881	408	414	408
query51	7053	6844	6808	6808
query52	95	84	88	84
query53	260	176	175	175
query54	567	459	447	447
query55	74	73	77	73
query56	280	255	256	255
query57	1229	1077	1065	1065
query58	230	254	232	232
query59	3129	2912	2718	2718
query60	302	272	275	272
query61	124	119	120	119
query62	796	657	650	650
query63	219	183	186	183
query64	2960	759	753	753
query65	3198	3098	3170	3098
query66	697	341	347	341
query67	15546	15380	15183	15183
query68	3066	580	606	580
query69	416	290	299	290
query70	1230	1139	1048	1048
query71	374	272	278	272
query72	6356	4354	4330	4330
query73	799	322	322	322
query74	9280	8822	8910	8822
query75	3495	2685	2690	2685
query76	1570	1099	1039	1039
query77	698	319	330	319
query78	9885	9308	11170	9308
query79	1144	545	523	523
query80	924	521	498	498
query81	590	230	225	225
query82	302	143	141	141
query83	289	146	148	146
query84	268	74	71	71
query85	888	279	272	272
query86	410	290	281	281
query87	4446	4248	4240	4240
query88	2922	2342	2330	2330
query89	391	284	284	284
query90	1844	187	188	187
query91	124	96	99	96
query92	61	50	77	50
query93	1073	522	535	522
query94	834	299	290	290
query95	343	252	250	250
query96	643	262	265	262
query97	3253	3065	3146	3065
query98	221	202	200	200
query99	1582	1296	1287	1287
Total cold run time: 308271 ms
Total hot run time: 193399 ms

@doris-robot
Copy link

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

query1	0.05	0.04	0.04
query2	0.08	0.04	0.04
query3	0.23	0.05	0.05
query4	1.67	0.07	0.08
query5	0.49	0.50	0.51
query6	1.13	0.73	0.73
query7	0.01	0.01	0.01
query8	0.05	0.04	0.04
query9	0.55	0.48	0.49
query10	0.53	0.53	0.54
query11	0.16	0.11	0.12
query12	0.15	0.12	0.12
query13	0.61	0.59	0.58
query14	2.07	2.03	2.05
query15	0.89	0.82	0.80
query16	0.38	0.37	0.37
query17	0.95	0.97	1.02
query18	0.24	0.21	0.21
query19	1.89	1.78	1.79
query20	0.01	0.01	0.01
query21	15.39	0.70	0.67
query22	4.24	6.41	2.77
query23	18.29	1.37	1.44
query24	2.06	0.24	0.22
query25	0.13	0.08	0.09
query26	0.28	0.18	0.18
query27	0.07	0.07	0.08
query28	13.26	1.01	1.01
query29	12.62	3.44	3.44
query30	0.25	0.06	0.05
query31	2.94	0.40	0.39
query32	3.24	0.48	0.47
query33	2.97	3.03	2.99
query34	17.20	4.39	4.46
query35	4.51	4.43	4.50
query36	0.65	0.48	0.48
query37	0.18	0.15	0.16
query38	0.15	0.15	0.15
query39	0.05	0.03	0.04
query40	0.15	0.12	0.13
query41	0.09	0.05	0.05
query42	0.05	0.05	0.05
query43	0.05	0.04	0.04
Total cold run time: 110.96 s
Total hot run time: 33.07 s

@seawinde
Copy link
Contributor Author

seawinde commented Sep 4, 2024

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	18074	4615	4422	4422
q2	2895	184	180	180
q3	11298	1130	1159	1130
q4	10616	709	817	709
q5	7892	2958	2836	2836
q6	231	140	152	140
q7	980	649	607	607
q8	9393	2051	2066	2051
q9	7191	6564	6561	6561
q10	7003	2196	2185	2185
q11	485	243	248	243
q12	416	222	222	222
q13	18231	3070	3107	3070
q14	280	222	233	222
q15	538	489	474	474
q16	570	499	500	499
q17	982	732	716	716
q18	7479	6824	6884	6824
q19	1460	1017	1031	1017
q20	712	329	327	327
q21	3965	3124	2963	2963
q22	1133	1046	1022	1022
Total cold run time: 111824 ms
Total hot run time: 38420 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4539	4517	4297	4297
q2	389	277	278	277
q3	2885	2692	2692	2692
q4	1966	1672	1688	1672
q5	5425	5407	5408	5407
q6	227	133	129	129
q7	2124	1718	1728	1718
q8	3212	3400	3392	3392
q9	8428	8450	8440	8440
q10	3461	3215	3173	3173
q11	613	507	497	497
q12	786	606	601	601
q13	10986	3136	3091	3091
q14	316	277	273	273
q15	530	474	503	474
q16	597	566	554	554
q17	1797	1509	1503	1503
q18	7809	7528	7471	7471
q19	1697	1479	1570	1479
q20	2075	1828	1829	1828
q21	5425	5107	5334	5107
q22	1159	1043	1040	1040
Total cold run time: 66446 ms
Total hot run time: 55115 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 186529 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 17238e654faff8ea606944968ff7c95d5bd5e00f, data reload: false

query1	912	367	364	364
query2	6483	1957	1862	1862
query3	6642	218	212	212
query4	29457	23167	23046	23046
query5	4155	494	466	466
query6	246	162	165	162
query7	4585	297	288	288
query8	248	195	209	195
query9	8477	2486	2501	2486
query10	435	269	271	269
query11	17775	14871	15062	14871
query12	145	100	97	97
query13	1622	370	365	365
query14	9845	6476	7107	6476
query15	248	169	179	169
query16	8050	473	428	428
query17	1567	567	536	536
query18	2058	282	289	282
query19	259	155	141	141
query20	114	106	105	105
query21	209	103	104	103
query22	4396	4227	4229	4227
query23	33988	33304	33486	33304
query24	11005	2903	2857	2857
query25	637	375	374	374
query26	1160	153	152	152
query27	2369	278	275	275
query28	7434	2040	2036	2036
query29	805	431	433	431
query30	310	154	152	152
query31	983	760	788	760
query32	92	52	59	52
query33	753	295	282	282
query34	999	471	487	471
query35	850	731	715	715
query36	1096	943	927	927
query37	164	89	95	89
query38	4020	3902	3851	3851
query39	1435	1398	1391	1391
query40	199	112	112	112
query41	48	44	46	44
query42	112	94	98	94
query43	516	457	473	457
query44	1200	744	725	725
query45	202	168	168	168
query46	1096	748	730	730
query47	1890	1793	1787	1787
query48	375	300	300	300
query49	1136	421	417	417
query50	810	411	413	411
query51	6962	6872	6922	6872
query52	96	86	89	86
query53	255	181	180	180
query54	994	459	451	451
query55	77	74	74	74
query56	280	266	262	262
query57	1194	1063	1066	1063
query58	226	220	256	220
query59	3015	2763	2718	2718
query60	290	274	270	270
query61	102	97	103	97
query62	831	678	651	651
query63	219	190	179	179
query64	4301	677	657	657
query65	3220	3152	3140	3140
query66	1412	335	341	335
query67	15662	15250	15396	15250
query68	3542	566	574	566
query69	400	293	271	271
query70	1294	1119	1125	1119
query71	342	273	279	273
query72	6600	4140	3989	3989
query73	739	319	326	319
query74	9234	8867	8795	8795
query75	3354	2682	2704	2682
query76	1840	1066	932	932
query77	470	312	336	312
query78	9639	9017	9053	9017
query79	1026	515	519	515
query80	678	494	505	494
query81	500	239	234	234
query82	233	138	146	138
query83	171	151	150	150
query84	228	76	76	76
query85	749	281	279	279
query86	315	305	301	301
query87	4421	4326	4184	4184
query88	2982	2341	2353	2341
query89	378	287	284	284
query90	1882	189	185	185
query91	124	98	98	98
query92	63	47	50	47
query93	1031	547	554	547
query94	895	266	355	266
query95	347	244	248	244
query96	585	267	265	265
query97	3198	3142	3117	3117
query98	221	199	202	199
query99	1459	1306	1271	1271
Total cold run time: 281688 ms
Total hot run time: 186529 ms

@doris-robot
Copy link

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

query1	0.05	0.05	0.04
query2	0.08	0.04	0.04
query3	0.23	0.05	0.05
query4	1.68	0.07	0.07
query5	0.50	0.50	0.50
query6	1.13	0.74	0.73
query7	0.01	0.02	0.01
query8	0.05	0.05	0.05
query9	0.55	0.51	0.50
query10	0.55	0.56	0.54
query11	0.15	0.12	0.11
query12	0.16	0.12	0.12
query13	0.60	0.59	0.59
query14	2.12	2.06	2.06
query15	0.92	0.82	0.82
query16	0.38	0.38	0.37
query17	1.04	1.05	0.96
query18	0.21	0.22	0.20
query19	1.88	1.72	1.82
query20	0.02	0.01	0.01
query21	15.40	0.67	0.66
query22	4.55	6.54	2.11
query23	18.22	1.29	1.23
query24	2.07	0.22	0.22
query25	0.15	0.08	0.08
query26	0.27	0.18	0.18
query27	0.07	0.08	0.07
query28	13.26	1.02	1.00
query29	12.65	3.27	3.30
query30	0.25	0.05	0.05
query31	2.89	0.38	0.39
query32	3.27	0.48	0.48
query33	2.97	2.94	3.01
query34	17.19	4.39	4.39
query35	4.42	4.43	4.43
query36	0.66	0.49	0.47
query37	0.19	0.17	0.16
query38	0.15	0.14	0.15
query39	0.04	0.03	0.03
query40	0.15	0.13	0.13
query41	0.11	0.05	0.05
query42	0.06	0.04	0.04
query43	0.04	0.04	0.04
Total cold run time: 111.34 s
Total hot run time: 32.04 s

@seawinde
Copy link
Contributor Author

seawinde commented Sep 5, 2024

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17668	4407	4301	4301
q2	2024	183	183	183
q3	10471	1142	1145	1142
q4	10138	732	781	732
q5	7718	2836	2807	2807
q6	226	141	139	139
q7	974	624	600	600
q8	9322	2031	2075	2031
q9	7066	6502	6533	6502
q10	7009	2179	2204	2179
q11	455	245	252	245
q12	411	235	233	233
q13	17761	3083	3074	3074
q14	292	243	245	243
q15	523	501	481	481
q16	574	529	509	509
q17	976	739	680	680
q18	7543	6821	6906	6821
q19	1391	1147	995	995
q20	686	340	328	328
q21	3912	3094	3026	3026
q22	1128	1015	1011	1011
Total cold run time: 108268 ms
Total hot run time: 38262 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4331	4280	4305	4280
q2	381	276	276	276
q3	2877	2654	2634	2634
q4	1923	1657	1657	1657
q5	5437	5374	5385	5374
q6	220	132	134	132
q7	2128	1756	1772	1756
q8	3174	3345	3335	3335
q9	8472	8397	8410	8397
q10	3445	3203	3141	3141
q11	609	478	523	478
q12	802	629	620	620
q13	14165	3174	3116	3116
q14	292	262	282	262
q15	530	482	470	470
q16	598	565	552	552
q17	1783	1494	1487	1487
q18	7834	7593	7446	7446
q19	1664	1468	1606	1468
q20	2038	1833	1826	1826
q21	5576	5315	5212	5212
q22	1107	1028	1009	1009
Total cold run time: 69386 ms
Total hot run time: 54928 ms

@seawinde seawinde force-pushed the fix_add_limit_wrongly_when_mv branch from 099376f to c0eb449 Compare October 8, 2024 08:06
@seawinde
Copy link
Contributor Author

seawinde commented Oct 8, 2024

run buildall

@seawinde
Copy link
Contributor Author

seawinde commented Oct 8, 2024

run buildall

@seawinde
Copy link
Contributor Author

seawinde commented Oct 8, 2024

run buildall

@seawinde
Copy link
Contributor Author

seawinde commented Oct 8, 2024

run buildall

@@ -55,6 +57,9 @@ public static ConnectContext createMTMVContext(MTMV mtmv) {
ctx.getState().reset();
ctx.setThreadLocalInfo();
ctx.getSessionVariable().allowModifyMaterializedViewData = true;
// Disable add default limit rule to avoid refresh data wrong
ctx.getSessionVariable().setDisableNereidsRules(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the default values are changed in the future, there may be issues here. Can we use an additional method

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the default value of disableNereidsRules session should always be empty ''

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Oct 11, 2024
Copy link
Contributor

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

@morrySnow morrySnow merged commit 0fdb1ee into apache:master Oct 11, 2024
27 of 32 checks passed
@morrySnow morrySnow added the p0_w label Oct 17, 2024
seawinde added a commit to seawinde/doris that referenced this pull request Oct 21, 2024
…ize view (apache#40106)

In BI or some other SQL client,it will set `sql_select_limit` or
`default_order_by_limit` session variables automatically.
This will make mistake when query rewrite by materialized view, Because
after query rewrite by materialized view, the rewritten plan would be
optimized by rules again which should add limit on SQL.
This pr fix this.
seawinde added a commit to seawinde/doris that referenced this pull request Oct 23, 2024
…ize view (apache#40106)

In BI or some other SQL client,it will set `sql_select_limit` or
`default_order_by_limit` session variables automatically.
This will make mistake when query rewrite by materialized view, Because
after query rewrite by materialized view, the rewritten plan would be
optimized by rules again which should add limit on SQL.
This pr fix this.
seawinde added a commit to seawinde/doris that referenced this pull request Oct 23, 2024
…ize view (apache#40106)

In BI or some other SQL client,it will set `sql_select_limit` or
`default_order_by_limit` session variables automatically.
This will make mistake when query rewrite by materialized view, Because
after query rewrite by materialized view, the rewritten plan would be
optimized by rules again which should add limit on SQL.
This pr fix this.
yiguolei pushed a commit that referenced this pull request Oct 24, 2024
morrySnow pushed a commit that referenced this pull request Oct 24, 2024
pick from master

pr: #41472
commitId: 2745e04

pr: #40106
commitId: 0fdb1ee

pr: #40173
commitId: 0d07e3d

pr: #42206
commitId: 2bcaa5b
@yiguolei yiguolei mentioned this pull request Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. dev/2.1.7-merged dev/3.0.3-merged p0_w reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants