Skip to content

branch-3.0: [fix](nereids) add equals for some unbound expressions #55060 - #55112

Closed
github-actions[bot] wants to merge 1 commit into
branch-3.0from
auto-pick-55060-branch-3.0
Closed

branch-3.0: [fix](nereids) add equals for some unbound expressions #55060#55112
github-actions[bot] wants to merge 1 commit into
branch-3.0from
auto-pick-55060-branch-3.0

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Cherry-picked from #55060

### What problem does this PR solve?

some unbound expressions not define equals and hash, add them.

for example:  unbound variable not define equals, then will have bug:

```mysql
set @Mystart = 1;
set @Myend = 100;
select * from t where a between @Mystart and @Myend
```

because unbound variable not define equals, then the unbound variable
`@mystart` and `@myend` will be equals(call Expression.equals), then
logical plan build will generate a filter `a = @mystart`
@github-actions
github-actions Bot requested a review from dataroaring as a code owner August 21, 2025 08:01
@Thearas

Thearas commented Aug 21, 2025

Copy link
Copy Markdown
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 Aug 21, 2025
@Thearas

Thearas commented Aug 21, 2025

Copy link
Copy Markdown
Contributor

run buildall

@doris-robot

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

------ Round 1 ----------------------------------
q1	17576	6721	6663	6663
q2	2036	220	183	183
q3	10467	1111	1149	1111
q4	10221	724	885	724
q5	7738	2891	2833	2833
q6	213	129	133	129
q7	974	610	595	595
q8	9355	1961	1995	1961
q9	6717	6378	6427	6378
q10	7048	2238	2301	2238
q11	467	253	257	253
q12	404	220	215	215
q13	17796	3002	2969	2969
q14	238	200	214	200
q15	510	449	457	449
q16	487	375	387	375
q17	968	617	555	555
q18	7213	6682	6555	6555
q19	1418	1058	1067	1058
q20	481	203	215	203
q21	3792	3062	3350	3062
q22	1099	980	975	975
Total cold run time: 107218 ms
Total hot run time: 39684 ms

----- Round 2, with runtime_filter_mode=off -----
q1	6599	6534	6579	6534
q2	328	230	231	230
q3	2884	2895	2937	2895
q4	2026	1746	1767	1746
q5	5733	5741	5661	5661
q6	203	130	129	129
q7	2240	1794	1800	1794
q8	3367	3512	3516	3512
q9	8758	8895	8866	8866
q10	3568	3507	3511	3507
q11	603	494	496	494
q12	838	613	612	612
q13	9309	3230	3116	3116
q14	308	265	258	258
q15	505	468	470	468
q16	486	445	448	445
q17	1828	1641	1602	1602
q18	8231	7856	7886	7856
q19	1762	1560	1548	1548
q20	2097	1871	1869	1869
q21	5309	5156	5081	5081
q22	1169	1114	1060	1060
Total cold run time: 68151 ms
Total hot run time: 59283 ms

@doris-robot

Copy link
Copy Markdown
TPC-DS: Total hot run time: 192491 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 63f757a40974bc704c7e4a05e0a7338de2252474, data reload: false

query1	935	423	395	395
query2	6279	1904	1927	1904
query3	8691	211	215	211
query4	33675	23528	23449	23449
query5	3707	465	434	434
query6	286	184	174	174
query7	4198	306	307	306
query8	285	223	226	223
query9	9523	2598	2584	2584
query10	449	261	263	261
query11	17957	15205	15270	15205
query12	158	104	100	100
query13	1568	436	417	417
query14	8845	7352	7438	7352
query15	250	170	179	170
query16	8025	513	542	513
query17	1627	595	606	595
query18	2147	319	341	319
query19	315	166	160	160
query20	127	125	119	119
query21	204	112	111	111
query22	4754	4516	4573	4516
query23	35188	34412	34138	34138
query24	11192	2916	2967	2916
query25	649	431	435	431
query26	1185	172	169	169
query27	2609	360	372	360
query28	7591	2160	2184	2160
query29	859	461	440	440
query30	275	159	159	159
query31	1101	878	836	836
query32	100	61	57	57
query33	796	318	337	318
query34	953	516	515	515
query35	845	724	704	704
query36	1129	988	1000	988
query37	134	68	65	65
query38	4101	3957	3879	3879
query39	1548	1461	1507	1461
query40	206	106	114	106
query41	52	50	51	50
query42	117	104	111	104
query43	538	494	501	494
query44	1265	839	821	821
query45	188	167	169	167
query46	1153	715	706	706
query47	1982	1888	1862	1862
query48	468	380	376	376
query49	1011	395	406	395
query50	837	422	429	422
query51	7382	7241	7127	7127
query52	105	95	94	94
query53	267	182	186	182
query54	1355	498	475	475
query55	80	81	78	78
query56	278	259	250	250
query57	1331	1198	1201	1198
query58	224	208	206	206
query59	3349	3018	3139	3018
query60	287	244	266	244
query61	112	109	118	109
query62	874	703	723	703
query63	230	193	194	193
query64	5072	687	629	629
query65	3436	3300	3286	3286
query66	1328	292	293	292
query67	16259	15700	15504	15504
query68	4680	581	589	581
query69	437	272	267	267
query70	1190	1114	1144	1114
query71	375	258	251	251
query72	6202	4067	4174	4067
query73	755	348	363	348
query74	10626	8903	8967	8903
query75	3347	2618	2622	2618
query76	2778	1039	1092	1039
query77	414	276	274	274
query78	10463	9519	9456	9456
query79	2513	612	616	612
query80	944	424	432	424
query81	546	219	220	219
query82	1118	88	89	88
query83	257	140	144	140
query84	239	79	81	79
query85	1571	298	288	288
query86	469	312	294	294
query87	4368	4208	4296	4208
query88	4486	2381	2364	2364
query89	415	293	302	293
query90	2009	191	191	191
query91	190	147	154	147
query92	64	50	49	49
query93	2415	557	558	557
query94	813	280	306	280
query95	356	257	254	254
query96	619	284	285	284
query97	3297	3099	3158	3099
query98	221	206	204	204
query99	1505	1294	1323	1294
Total cold run time: 303728 ms
Total hot run time: 192491 ms

@doris-robot

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

query1	0.04	0.03	0.03
query2	0.07	0.02	0.03
query3	0.24	0.07	0.06
query4	1.63	0.11	0.10
query5	0.50	0.53	0.49
query6	1.12	0.73	0.73
query7	0.02	0.03	0.02
query8	0.04	0.03	0.03
query9	0.57	0.49	0.49
query10	0.54	0.54	0.55
query11	0.15	0.11	0.10
query12	0.14	0.10	0.11
query13	0.61	0.60	0.59
query14	0.78	0.79	0.80
query15	0.84	0.82	0.81
query16	0.38	0.37	0.41
query17	1.08	0.98	1.04
query18	0.25	0.22	0.22
query19	1.95	1.88	1.83
query20	0.02	0.01	0.02
query21	15.38	0.59	0.60
query22	2.39	2.20	1.57
query23	17.06	0.94	0.86
query24	3.49	1.47	0.52
query25	0.19	0.11	0.05
query26	0.45	0.14	0.13
query27	0.04	0.04	0.05
query28	10.10	0.53	0.46
query29	12.59	3.21	3.20
query30	0.27	0.06	0.05
query31	2.88	0.40	0.41
query32	3.23	0.48	0.45
query33	2.98	2.99	3.03
query34	16.80	4.53	4.52
query35	4.51	4.55	4.60
query36	0.70	0.48	0.48
query37	0.09	0.06	0.06
query38	0.05	0.03	0.04
query39	0.03	0.03	0.02
query40	0.16	0.12	0.13
query41	0.08	0.02	0.02
query42	0.04	0.03	0.02
query43	0.04	0.03	0.02
Total cold run time: 104.52 s
Total hot run time: 29.46 s

@morrySnow morrySnow closed this Aug 22, 2025
@morningman
morningman deleted the auto-pick-55060-branch-3.0 branch July 8, 2026 14:32
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