Skip to content

branch-3.1: [fix](nereids) fix execute err which throw eq function not exist exception when join reorder #54953#55667

Merged
morrySnow merged 1 commit intobranch-3.1from
auto-pick-54953-branch-3.1
Sep 5, 2025
Merged

branch-3.1: [fix](nereids) fix execute err which throw eq function not exist exception when join reorder #54953#55667
morrySnow merged 1 commit intobranch-3.1from
auto-pick-54953-branch-3.1

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Sep 4, 2025

Cherry-picked from #54953

…ption when join reorder (#54953)

### What problem does this PR solve?

if query as following:

select xx
from a 
left join b on a.id = b.id
left join c on b.id = c.id

the column in table a, b, c are all non nullable.
after join reorder the query is as following:

select xx
from 
b 
left join c on b.id = c.id
right join a on on a.id = b.id

the the nullable condition  in join conjuncts maybe nullable wrongly.
this would cause be exec fail with err msg `[INTERNAL_ERROR]Could not
find function eq, arg String return Nullable(BOOL) `
the pr fix this
@github-actions github-actions bot requested a review from morrySnow as a code owner September 4, 2025 07:13
@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 closed this Sep 4, 2025
@dataroaring dataroaring reopened this Sep 4, 2025
@hello-stephen
Copy link
Contributor

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17579	5507	5422	5422
q2	2017	387	289	289
q3	11804	1245	788	788
q4	10482	862	442	442
q5	9461	2383	2096	2096
q6	182	164	132	132
q7	880	768	607	607
q8	9359	1440	1101	1101
q9	5187	4938	4897	4897
q10	6758	2268	1819	1819
q11	480	279	267	267
q12	334	352	208	208
q13	17781	3624	3000	3000
q14	224	234	218	218
q15	528	472	459	459
q16	426	427	378	378
q17	592	854	357	357
q18	6769	6477	6317	6317
q19	1216	933	545	545
q20	329	341	205	205
q21	2796	2145	1954	1954
q22	1070	1026	995	995
Total cold run time: 106254 ms
Total hot run time: 32496 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5534	5500	5480	5480
q2	248	326	242	242
q3	2234	2594	2297	2297
q4	1362	1753	1343	1343
q5	4462	4926	4993	4926
q6	169	160	130	130
q7	2068	1961	1842	1842
q8	2593	2826	2706	2706
q9	7429	7291	7246	7246
q10	3037	3329	2719	2719
q11	578	500	503	500
q12	668	749	603	603
q13	3389	3810	3146	3146
q14	282	304	265	265
q15	531	474	494	474
q16	436	485	445	445
q17	1240	1746	1256	1256
q18	7486	7466	7226	7226
q19	787	1156	1098	1098
q20	2025	2030	1895	1895
q21	5325	4902	4532	4532
q22	1084	1084	1003	1003
Total cold run time: 52967 ms
Total hot run time: 51374 ms

@doris-robot
Copy link

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

query1	928	405	432	405
query2	6201	1913	1841	1841
query3	8704	204	195	195
query4	33518	23854	23546	23546
query5	3684	584	447	447
query6	294	198	175	175
query7	4205	494	317	317
query8	315	264	246	246
query9	9520	2583	2590	2583
query10	466	328	262	262
query11	18389	15511	15209	15209
query12	163	107	105	105
query13	1564	534	425	425
query14	9281	7404	7703	7404
query15	238	185	187	185
query16	8148	669	517	517
query17	1588	774	582	582
query18	2174	422	310	310
query19	232	195	175	175
query20	130	126	127	126
query21	212	130	108	108
query22	4558	4717	4330	4330
query23	35001	34191	34336	34191
query24	7201	2728	2730	2728
query25	526	491	446	446
query26	792	288	173	173
query27	2193	493	378	378
query28	4921	2240	2215	2215
query29	703	607	462	462
query30	241	194	166	166
query31	1024	923	855	855
query32	89	57	54	54
query33	515	368	318	318
query34	752	871	536	536
query35	790	823	734	734
query36	1010	1034	978	978
query37	113	94	77	77
query38	4010	3958	3978	3958
query39	1532	1505	1473	1473
query40	201	123	107	107
query41	49	46	46	46
query42	127	115	109	109
query43	512	495	484	484
query44	1310	837	832	832
query45	193	183	178	178
query46	881	1058	701	701
query47	2000	1978	1916	1916
query48	415	431	349	349
query49	745	491	408	408
query50	712	687	451	451
query51	7404	7274	7170	7170
query52	104	99	97	97
query53	245	263	194	194
query54	591	555	487	487
query55	86	79	83	79
query56	279	258	263	258
query57	1267	1254	1214	1214
query58	240	218	217	217
query59	3013	3087	3002	3002
query60	288	280	261	261
query61	126	130	112	112
query62	814	740	713	713
query63	248	213	204	204
query64	3802	998	644	644
query65	3351	3295	3290	3290
query66	880	449	321	321
query67	16552	15669	15577	15577
query68	7710	833	547	547
query69	504	311	256	256
query70	1142	1101	1136	1101
query71	369	293	265	265
query72	5744	3721	3833	3721
query73	639	735	348	348
query74	10267	9112	9365	9112
query75	3205	3123	2683	2683
query76	2990	1143	765	765
query77	530	356	289	289
query78	10466	10440	9668	9668
query79	4491	811	586	586
query80	990	522	447	447
query81	517	266	219	219
query82	970	116	89	89
query83	175	163	149	149
query84	284	98	91	91
query85	760	355	309	309
query86	409	316	291	291
query87	4327	4326	4206	4206
query88	5187	2434	2427	2427
query89	420	334	299	299
query90	1729	188	191	188
query91	148	153	109	109
query92	69	56	51	51
query93	3083	877	548	548
query94	703	396	288	288
query95	332	277	270	270
query96	496	611	287	287
query97	3188	3290	3162	3162
query98	226	205	195	195
query99	1575	1415	1305	1305
Total cold run time: 296005 ms
Total hot run time: 192927 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.03
query2	0.06	0.03	0.03
query3	0.24	0.07	0.07
query4	1.63	0.11	0.11
query5	0.52	0.50	0.50
query6	1.12	0.73	0.72
query7	0.02	0.01	0.01
query8	0.04	0.02	0.03
query9	0.56	0.49	0.50
query10	0.56	0.55	0.55
query11	0.14	0.10	0.09
query12	0.13	0.11	0.13
query13	0.61	0.60	0.59
query14	0.78	0.82	0.78
query15	0.84	0.82	0.83
query16	0.38	0.41	0.38
query17	1.05	1.02	1.03
query18	0.24	0.23	0.22
query19	1.94	1.80	1.78
query20	0.01	0.01	0.01
query21	15.40	0.98	0.57
query22	0.75	0.72	0.65
query23	15.20	1.44	0.55
query24	3.33	1.51	0.46
query25	0.20	0.11	0.05
query26	0.33	0.15	0.15
query27	0.06	0.08	0.04
query28	13.49	0.98	0.43
query29	12.57	3.92	3.22
query30	0.25	0.10	0.07
query31	2.82	0.60	0.39
query32	3.22	0.54	0.47
query33	3.04	3.02	3.04
query34	16.56	5.13	4.57
query35	4.61	4.51	4.58
query36	0.66	0.50	0.48
query37	0.10	0.06	0.06
query38	0.05	0.03	0.03
query39	0.04	0.03	0.02
query40	0.18	0.14	0.12
query41	0.07	0.02	0.02
query42	0.03	0.02	0.02
query43	0.03	0.03	0.03
Total cold run time: 103.9 s
Total hot run time: 28.26 s

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 94.29% (33/35) 🎉
Increment coverage report
Complete coverage report

@morrySnow morrySnow merged commit f5b9fb5 into branch-3.1 Sep 5, 2025
23 checks passed
@github-actions github-actions bot deleted the auto-pick-54953-branch-3.1 branch September 5, 2025 10:22
@morrySnow morrySnow mentioned this pull request Sep 22, 2025
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.

5 participants

Comments