Skip to content

Conversation

@github-actions
Copy link
Contributor

Cherry-picked from #50951

)

### What problem does this PR solve?
 fix wrong result of intersect with null literal


![图片](https://github.com/user-attachments/assets/fc54b110-4d3d-43fc-a36a-014379b1d485)

InferPredicates will generate equal predicate on intersect/except
operator's child, intersect/except operator require null safe equal to
make 'null intersect null' return null instead of empty set

![图片](https://github.com/user-attachments/assets/78be5ed1-65a0-4f0e-b138-0ef7b6a461d0)
@github-actions github-actions bot requested a review from dataroaring as a code owner May 23, 2025 03:24
@hello-stephen
Copy link
Contributor

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?

@dataroaring dataroaring reopened this May 23, 2025
@hello-stephen
Copy link
Contributor

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17573	6694	6559	6559
q2	2044	169	184	169
q3	10779	1070	1110	1070
q4	10559	699	704	699
q5	7768	2848	2747	2747
q6	212	133	130	130
q7	958	604	589	589
q8	9346	1950	2029	1950
q9	6557	6376	6348	6348
q10	7048	2285	2255	2255
q11	471	267	261	261
q12	407	219	210	210
q13	17779	3009	2966	2966
q14	246	210	202	202
q15	503	465	457	457
q16	508	395	378	378
q17	965	565	559	559
q18	7296	6680	6516	6516
q19	1411	1031	1030	1030
q20	469	199	195	195
q21	3995	3161	3209	3161
q22	1106	979	977	977
Total cold run time: 108000 ms
Total hot run time: 39428 ms

----- Round 2, with runtime_filter_mode=off -----
q1	6528	6536	6564	6536
q2	331	229	226	226
q3	2866	2697	2767	2697
q4	2050	1795	1785	1785
q5	5743	5745	5682	5682
q6	207	135	131	131
q7	2217	1797	1773	1773
q8	3366	3492	3511	3492
q9	8900	8688	8852	8688
q10	3561	3485	3493	3485
q11	586	498	485	485
q12	782	611	594	594
q13	9741	3131	3108	3108
q14	298	279	260	260
q15	520	465	456	456
q16	489	467	417	417
q17	1840	1597	1588	1588
q18	8313	7844	7629	7629
q19	1706	1582	1580	1580
q20	2135	1860	1922	1860
q21	5288	5222	5255	5222
q22	1082	1012	1005	1005
Total cold run time: 68549 ms
Total hot run time: 58699 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 195818 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 29cf54ec7cc9284ad2574513256b7ee488bef107, data reload: false

query1	1302	907	922	907
query2	6362	1969	1899	1899
query3	10825	4282	4244	4244
query4	61326	29172	23304	23304
query5	5312	454	445	445
query6	408	190	181	181
query7	5488	314	310	310
query8	313	215	220	215
query9	8541	2582	2578	2578
query10	474	268	266	266
query11	17736	15166	16166	15166
query12	171	102	104	102
query13	1462	450	438	438
query14	9988	7425	7151	7151
query15	197	186	185	185
query16	7230	484	489	484
query17	1210	569	601	569
query18	1835	317	306	306
query19	213	166	164	164
query20	118	112	110	110
query21	206	101	102	101
query22	4811	4526	4550	4526
query23	34393	33880	33756	33756
query24	6229	2947	2909	2909
query25	537	399	391	391
query26	651	162	164	162
query27	1713	359	362	359
query28	4013	2145	2122	2122
query29	699	455	447	447
query30	236	154	154	154
query31	993	827	810	810
query32	64	52	58	52
query33	444	276	286	276
query34	914	500	514	500
query35	834	742	732	732
query36	1066	951	951	951
query37	115	68	65	65
query38	4028	3909	3997	3909
query39	1537	1473	1621	1473
query40	207	104	101	101
query41	48	51	50	50
query42	116	100	102	100
query43	540	484	485	484
query44	1160	805	818	805
query45	190	166	169	166
query46	1128	713	718	713
query47	2016	1901	1921	1901
query48	475	387	409	387
query49	716	395	385	385
query50	842	433	434	433
query51	7436	7239	7123	7123
query52	97	87	91	87
query53	275	178	179	178
query54	574	482	467	467
query55	77	79	79	79
query56	269	234	234	234
query57	1270	1127	1144	1127
query58	229	215	214	214
query59	3221	3083	2998	2998
query60	296	263	253	253
query61	110	133	114	114
query62	802	720	692	692
query63	226	196	186	186
query64	1425	659	629	629
query65	3287	3201	3172	3172
query66	703	298	288	288
query67	15820	15418	15528	15418
query68	4349	576	569	569
query69	441	290	264	264
query70	1130	1119	1110	1110
query71	353	264	259	259
query72	6369	4045	4096	4045
query73	749	340	359	340
query74	10501	8914	9243	8914
query75	3350	2660	2662	2660
query76	2043	1072	1067	1067
query77	464	278	267	267
query78	10630	9669	9509	9509
query79	2107	587	580	580
query80	1404	414	428	414
query81	529	229	219	219
query82	1253	82	87	82
query83	172	148	136	136
query84	279	82	71	71
query85	1031	302	295	295
query86	363	303	303	303
query87	4348	4285	4218	4218
query88	3907	2417	2389	2389
query89	413	285	290	285
query90	2011	184	183	183
query91	182	148	150	148
query92	58	49	47	47
query93	3029	548	530	530
query94	784	287	249	249
query95	357	255	250	250
query96	619	285	278	278
query97	3333	3150	3137	3137
query98	208	203	207	203
query99	1575	1301	1294	1294
Total cold run time: 315890 ms
Total hot run time: 195818 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.02
query2	0.07	0.03	0.03
query3	0.24	0.07	0.06
query4	1.63	0.10	0.10
query5	0.50	0.51	0.53
query6	1.13	0.73	0.73
query7	0.02	0.02	0.02
query8	0.05	0.04	0.04
query9	0.56	0.49	0.49
query10	0.55	0.54	0.54
query11	0.14	0.10	0.10
query12	0.14	0.11	0.14
query13	0.60	0.61	0.59
query14	0.77	0.77	0.79
query15	0.84	0.81	0.82
query16	0.38	0.38	0.39
query17	1.06	1.04	1.01
query18	0.24	0.22	0.22
query19	1.96	1.84	1.83
query20	0.01	0.01	0.01
query21	15.40	0.58	0.61
query22	2.32	1.88	1.89
query23	16.82	1.06	0.87
query24	3.64	1.01	0.91
query25	0.28	0.13	0.05
query26	0.46	0.13	0.15
query27	0.03	0.04	0.04
query28	10.17	0.44	0.49
query29	12.57	3.27	3.21
query30	0.24	0.06	0.05
query31	2.87	0.38	0.36
query32	3.26	0.46	0.46
query33	2.92	3.00	3.04
query34	17.06	4.52	4.42
query35	4.53	4.47	4.48
query36	0.67	0.46	0.48
query37	0.09	0.06	0.06
query38	0.05	0.03	0.03
query39	0.04	0.02	0.02
query40	0.15	0.12	0.13
query41	0.08	0.02	0.02
query42	0.03	0.02	0.02
query43	0.03	0.03	0.03
Total cold run time: 104.63 s
Total hot run time: 30 s

Copy link
Contributor

@dataroaring dataroaring left a comment

Choose a reason for hiding this comment

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

LGTM

@dataroaring dataroaring merged commit 2576d6b into branch-3.0 May 23, 2025
23 of 24 checks passed
@github-actions github-actions bot deleted the auto-pick-50951-branch-3.0 branch May 23, 2025 12:19
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.

4 participants