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](Nereids) adjust nullable for set operation may cause IndexOutOfBound #35589

Merged
merged 1 commit into from
May 29, 2024

Conversation

morrySnow
Copy link
Contributor

pick from master #35588

after we refactor set oepration, let it has projection ability, its output size may diff with its child's output size. so we should use it output size as nullable flag list size to ensure it has same size with set operation's output.

Proposed changes

Issue Number: close #xxx

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

@morrySnow
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	18223	4345	4290	4290
q2	2073	160	153	153
q3	10396	1885	1909	1885
q4	10357	1245	1286	1245
q5	8737	3815	3919	3815
q6	228	126	126	126
q7	2038	1627	1598	1598
q8	9291	2735	2693	2693
q9	10592	10330	10315	10315
q10	8653	3531	3517	3517
q11	420	253	257	253
q12	464	296	297	296
q13	18346	3994	4068	3994
q14	361	319	330	319
q15	522	459	454	454
q16	690	569	573	569
q17	1124	946	996	946
q18	7377	6845	7007	6845
q19	1679	1526	1540	1526
q20	544	308	318	308
q21	4428	4092	4050	4050
q22	503	398	392	392
Total cold run time: 117046 ms
Total hot run time: 49589 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4295	4293	4290	4290
q2	319	226	224	224
q3	4184	4133	4162	4133
q4	2753	2732	2735	2732
q5	7204	7127	7090	7090
q6	236	123	121	121
q7	3235	2803	2840	2803
q8	4403	4531	4553	4531
q9	16994	16714	16768	16714
q10	4219	4293	4271	4271
q11	778	706	690	690
q12	1040	862	872	862
q13	6961	3734	3738	3734
q14	446	443	428	428
q15	513	477	453	453
q16	732	669	675	669
q17	3821	3911	3879	3879
q18	8744	8731	8715	8715
q19	1721	1697	1659	1659
q20	2441	2151	2110	2110
q21	8446	8598	8461	8461
q22	1056	954	960	954
Total cold run time: 84541 ms
Total hot run time: 79523 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 203353 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 6165b200a9dc63124e70396d089a64b73598554b, data reload: false

query1	933	391	374	374
query2	6584	2879	2734	2734
query3	6923	212	206	206
query4	21095	18049	18067	18049
query5	19732	6504	6561	6504
query6	287	219	242	219
query7	4170	293	296	293
query8	263	260	227	227
query9	3104	2664	2600	2600
query10	417	302	300	300
query11	11446	10727	10690	10690
query12	118	81	75	75
query13	5592	709	689	689
query14	17454	13695	13392	13392
query15	359	221	229	221
query16	6485	288	263	263
query17	1729	1453	870	870
query18	2330	404	419	404
query19	211	153	152	152
query20	78	78	80	78
query21	197	103	97	97
query22	5263	5050	5005	5005
query23	32382	31825	32179	31825
query24	7016	6532	6529	6529
query25	536	418	421	418
query26	530	164	162	162
query27	1869	295	293	293
query28	6185	2377	2312	2312
query29	2840	2693	2716	2693
query30	244	165	170	165
query31	916	722	745	722
query32	70	66	63	63
query33	410	272	270	270
query34	849	474	473	473
query35	1131	929	905	905
query36	1408	1383	1158	1158
query37	87	61	62	61
query38	3086	2925	2959	2925
query39	1376	1344	1327	1327
query40	206	98	96	96
query41	44	38	37	37
query42	90	94	88	88
query43	711	758	708	708
query44	1173	716	701	701
query45	242	238	225	225
query46	1226	968	955	955
query47	1836	1853	1565	1565
query48	1002	702	700	700
query49	605	375	366	366
query50	851	588	642	588
query51	4761	4645	4641	4641
query52	97	82	92	82
query53	442	315	315	315
query54	2644	2397	2438	2397
query55	88	86	80	80
query56	244	225	209	209
query57	1240	1043	1136	1043
query58	218	216	209	209
query59	3968	4031	4146	4031
query60	236	195	223	195
query61	99	98	95	95
query62	713	480	583	480
query63	482	334	339	334
query64	2463	1554	1520	1520
query65	3630	3541	3548	3541
query66	750	382	375	375
query67	15761	15376	15112	15112
query68	12455	684	644	644
query69	585	361	350	350
query70	2208	1442	1447	1442
query71	421	306	311	306
query72	6550	3534	3481	3481
query73	2348	328	328	328
query74	6304	5867	5886	5867
query75	5564	3602	3731	3602
query76	7029	1194	1195	1194
query77	1189	260	265	260
query78	12696	11952	11630	11630
query79	9254	638	652	638
query80	1028	415	426	415
query81	456	233	237	233
query82	805	102	100	100
query83	164	131	134	131
query84	264	70	73	70
query85	870	327	327	327
query86	344	325	337	325
query87	3281	2984	3036	2984
query88	4000	2362	2358	2358
query89	482	288	278	278
query90	2008	212	210	210
query91	190	141	140	140
query92	63	53	53	53
query93	6871	572	606	572
query94	730	215	210	210
query95	1129	1058	1064	1058
query96	668	343	335	335
query97	6511	6372	6342	6342
query98	193	175	173	173
query99	3039	866	929	866
Total cold run time: 321226 ms
Total hot run time: 203353 ms

@doris-robot
Copy link

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

query1	0.02	0.02	0.01
query2	0.07	0.03	0.02
query3	0.25	0.05	0.04
query4	1.79	0.07	0.08
query5	0.53	0.52	0.52
query6	1.23	0.60	0.59
query7	0.01	0.01	0.01
query8	0.04	0.02	0.03
query9	0.51	0.50	0.48
query10	0.55	0.53	0.53
query11	0.11	0.08	0.08
query12	0.12	0.09	0.10
query13	0.63	0.62	0.60
query14	0.77	0.79	0.78
query15	0.78	0.76	0.78
query16	0.38	0.40	0.37
query17	0.99	1.01	0.97
query18	0.24	0.24	0.24
query19	1.94	1.88	1.89
query20	0.02	0.01	0.00
query21	15.49	0.55	0.56
query22	1.98	1.86	1.31
query23	16.39	0.93	1.04
query24	4.02	0.86	5.18
query25	0.36	0.13	0.06
query26	0.81	0.14	0.15
query27	0.03	0.04	0.04
query28	5.14	0.75	0.76
query29	12.79	2.09	2.29
query30	0.53	0.50	0.52
query31	2.81	0.39	0.37
query32	3.37	0.50	0.50
query33	3.12	3.10	3.06
query34	15.26	4.78	4.77
query35	4.86	4.83	4.84
query36	1.08	1.02	1.01
query37	0.06	0.04	0.04
query38	0.04	0.02	0.02
query39	0.02	0.01	0.01
query40	0.17	0.14	0.14
query41	0.06	0.02	0.02
query42	0.02	0.01	0.01
query43	0.02	0.02	0.01
Total cold run time: 99.41 s
Total hot run time: 30.08 s

@doris-robot
Copy link

Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'

Load test result on commit 6165b200a9dc63124e70396d089a64b73598554b with default session variables
Stream load json:         19 seconds loaded 2358488459 Bytes, about 118 MB/s
Stream load orc:          58 seconds loaded 1101869774 Bytes, about 18 MB/s
Stream load parquet:      31 seconds loaded 861443392 Bytes, about 26 MB/s
Insert into select:       21.1 seconds inserted 10000000 Rows, about 473K ops/s

…Bound

pick from master apache#35588

after we refactor set oepration, let it has projection ability, its
output size may diff with its child's output size. so we should use it
output size as nullable flag list size to ensure it has same size with
set operation's output.
@morrySnow
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17550	4355	4357	4355
q2	2037	188	147	147
q3	10240	1920	1930	1920
q4	10367	1237	1339	1237
q5	8419	3855	3914	3855
q6	226	126	124	124
q7	2053	1596	1568	1568
q8	9491	2675	2696	2675
q9	13590	11166	10201	10201
q10	8618	3523	3508	3508
q11	422	257	246	246
q12	462	298	302	298
q13	18349	3960	3991	3960
q14	353	333	324	324
q15	520	461	460	460
q16	674	575	570	570
q17	1126	906	884	884
q18	7343	6748	7025	6748
q19	1702	1534	1482	1482
q20	545	308	321	308
q21	4408	4100	4043	4043
q22	510	390	403	390
Total cold run time: 119005 ms
Total hot run time: 49303 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4333	4297	4266	4266
q2	323	222	211	211
q3	4163	4127	4106	4106
q4	2737	2744	2742	2742
q5	7127	7135	7085	7085
q6	241	119	120	119
q7	3221	2751	2829	2751
q8	4355	4419	4462	4419
q9	16782	16650	16759	16650
q10	4232	4282	4276	4276
q11	777	697	703	697
q12	1024	854	872	854
q13	4342	3752	3740	3740
q14	458	440	421	421
q15	522	453	456	453
q16	745	689	683	683
q17	3843	3846	3865	3846
q18	8757	8754	8747	8747
q19	1697	1670	1663	1663
q20	2375	2145	2151	2145
q21	8469	8492	8481	8481
q22	1040	945	934	934
Total cold run time: 81563 ms
Total hot run time: 79289 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 203373 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 698c4002faeba365c22bfc5ac16b8cf5e11fe05a, data reload: false

query1	941	386	415	386
query2	6529	2888	2839	2839
query3	6922	218	212	212
query4	19978	18072	17916	17916
query5	19741	6535	6595	6535
query6	302	215	229	215
query7	4162	309	318	309
query8	263	262	240	240
query9	3064	2655	2600	2600
query10	415	294	300	294
query11	11311	10852	10749	10749
query12	127	79	80	79
query13	5586	693	690	690
query14	17624	13598	13288	13288
query15	386	232	234	232
query16	6472	288	267	267
query17	1705	1460	892	892
query18	2294	421	415	415
query19	209	159	151	151
query20	75	78	84	78
query21	188	99	95	95
query22	5295	5034	5086	5034
query23	32584	32003	32114	32003
query24	6964	6605	6493	6493
query25	524	415	422	415
query26	529	167	162	162
query27	1875	298	301	298
query28	6182	2364	2325	2325
query29	2917	2678	2776	2678
query30	242	171	174	171
query31	895	755	735	735
query32	72	65	59	59
query33	399	262	275	262
query34	828	503	472	472
query35	1130	924	897	897
query36	1401	1117	1140	1117
query37	91	66	63	63
query38	3110	2943	2950	2943
query39	1372	1344	1323	1323
query40	204	96	95	95
query41	39	37	37	37
query42	87	84	85	84
query43	840	710	806	710
query44	1137	717	721	717
query45	248	239	230	230
query46	1212	949	965	949
query47	1756	1930	1661	1661
query48	1013	738	738	738
query49	615	371	371	371
query50	864	605	610	605
query51	4743	4646	4691	4646
query52	95	90	79	79
query53	454	317	320	317
query54	2620	2436	2406	2406
query55	93	79	81	79
query56	251	222	206	206
query57	1359	1116	1082	1082
query58	216	202	201	201
query59	4312	4157	3876	3876
query60	217	207	209	207
query61	96	95	95	95
query62	849	478	435	435
query63	488	340	347	340
query64	2459	1563	1379	1379
query65	3624	3589	3566	3566
query66	810	373	368	368
query67	17194	17853	15035	15035
query68	8473	668	656	656
query69	590	380	348	348
query70	1607	1411	1627	1411
query71	396	330	308	308
query72	6511	3499	3467	3467
query73	733	328	326	326
query74	6334	5865	5902	5865
query75	4701	3769	3645	3645
query76	4798	1137	1216	1137
query77	693	253	254	253
query78	12620	11695	11823	11695
query79	8252	646	651	646
query80	2129	398	397	397
query81	515	241	232	232
query82	1543	107	95	95
query83	182	134	130	130
query84	258	72	71	71
query85	1294	330	343	330
query86	365	299	287	287
query87	3192	3040	3041	3040
query88	5206	2359	2373	2359
query89	386	287	289	287
query90	1803	221	214	214
query91	202	142	155	142
query92	56	56	54	54
query93	5005	542	594	542
query94	858	214	216	214
query95	1110	1057	1045	1045
query96	657	335	333	333
query97	6538	6428	6386	6386
query98	194	178	174	174
query99	2962	917	838	838
Total cold run time: 312762 ms
Total hot run time: 203373 ms

@doris-robot
Copy link

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

query1	0.03	0.02	0.02
query2	0.07	0.02	0.02
query3	0.25	0.05	0.04
query4	1.78	0.08	0.08
query5	0.54	0.53	0.52
query6	1.24	0.60	0.60
query7	0.02	0.01	0.01
query8	0.04	0.03	0.02
query9	0.53	0.48	0.48
query10	0.55	0.53	0.54
query11	0.12	0.08	0.09
query12	0.11	0.09	0.10
query13	0.62	0.62	0.61
query14	0.79	0.78	0.80
query15	0.76	0.76	0.76
query16	0.38	0.36	0.38
query17	0.98	1.02	1.00
query18	0.20	0.25	0.26
query19	1.97	1.84	1.87
query20	0.02	0.01	0.01
query21	15.48	0.57	0.56
query22	2.23	1.98	1.92
query23	17.10	1.18	0.86
query24	5.66	1.91	1.57
query25	0.37	0.10	0.08
query26	0.64	0.16	0.15
query27	0.04	0.04	0.04
query28	6.27	0.77	0.74
query29	12.62	2.33	2.29
query30	0.62	0.51	0.54
query31	2.83	0.38	0.37
query32	3.37	0.49	0.50
query33	3.06	3.06	3.10
query34	15.30	4.79	4.79
query35	4.85	4.85	4.85
query36	1.07	1.02	1.02
query37	0.06	0.05	0.04
query38	0.03	0.02	0.02
query39	0.03	0.01	0.01
query40	0.16	0.14	0.13
query41	0.07	0.02	0.01
query42	0.02	0.01	0.01
query43	0.02	0.01	0.02
Total cold run time: 102.9 s
Total hot run time: 31.63 s

@doris-robot
Copy link

Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'

Load test result on commit 698c4002faeba365c22bfc5ac16b8cf5e11fe05a with default session variables
Stream load json:         19 seconds loaded 2358488459 Bytes, about 118 MB/s
Stream load orc:          58 seconds loaded 1101869774 Bytes, about 18 MB/s
Stream load parquet:      31 seconds loaded 861443392 Bytes, about 26 MB/s
Insert into select:       21.2 seconds inserted 10000000 Rows, about 471K ops/s

@morrySnow morrySnow merged commit 0fb6263 into apache:branch-2.0 May 29, 2024
22 of 24 checks passed
@morrySnow morrySnow deleted the 2.0_35588 branch May 29, 2024 10:44
mongo360 pushed a commit to mongo360/doris that referenced this pull request Aug 16, 2024
…Bound (apache#35589)

pick from master apache#35588

after we refactor set oepration, let it has projection ability, its
output size may diff with its child's output size. so we should use it
output size as nullable flag list size to ensure it has same size with
set operation's output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants