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) fix push down non-foldable filter through project #47989

Merged
merged 8 commits into from
Feb 19, 2025

Conversation

yujun777
Copy link
Collaborator

@yujun777 yujun777 commented Feb 18, 2025

What problem does this PR solve?

When the expression contains slots which is an alias and its original expression is non-foldable, then this expression cann't push down through project. For example:

filter(b > 1) -> project(a + random(1, 10) as b),

if push down , it will got

project(a + random(1, 10) as b) -> filter(a + random(1, 10) > 1),

it will contains two distinct RANDOM function. This is an error.

But if the filter expression itself contains non-foldable expression, it can still push down. For example:

filter(a + random(1, 10) > 1) -> project(a),

it can still push down the filter, and got

project(a) -> filter(a + random(1, 10) > 1).

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@yujun777
Copy link
Collaborator Author

run buildall

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

@yujun777
Copy link
Collaborator Author

run buildall

@yujun777
Copy link
Collaborator Author

run buildall

@yujun777
Copy link
Collaborator Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17589	5178	5075	5075
q2	2048	306	167	167
q3	10468	1225	730	730
q4	10204	1093	526	526
q5	7508	2324	2326	2324
q6	186	178	140	140
q7	910	737	587	587
q8	9299	1287	1106	1106
q9	4856	4652	4633	4633
q10	6834	2295	1887	1887
q11	486	267	263	263
q12	344	344	215	215
q13	17792	3673	3077	3077
q14	231	235	207	207
q15	498	458	451	451
q16	618	612	580	580
q17	577	860	333	333
q18	6779	6189	6183	6183
q19	1216	938	533	533
q20	307	319	189	189
q21	2873	2121	1966	1966
q22	352	323	296	296
Total cold run time: 101975 ms
Total hot run time: 31468 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5110	5114	5085	5085
q2	238	331	244	244
q3	2157	2686	2285	2285
q4	1397	1804	1360	1360
q5	4212	4121	4120	4120
q6	206	165	123	123
q7	1846	1815	1665	1665
q8	2564	2629	2564	2564
q9	7152	7216	7078	7078
q10	2984	3181	2784	2784
q11	591	523	507	507
q12	680	759	612	612
q13	3450	3952	3425	3425
q14	272	284	272	272
q15	517	468	449	449
q16	624	674	641	641
q17	1151	1597	1299	1299
q18	7698	7459	7345	7345
q19	793	801	898	801
q20	1977	2015	1859	1859
q21	5391	5006	4650	4650
q22	628	557	537	537
Total cold run time: 51638 ms
Total hot run time: 49705 ms

Comment on lines 63 to 70
// Forbidden filter-project, we must make filter-project -> project-filter.
// except that the project contains NoneMovableFunction
if (child instanceof PhysicalProject && !((PhysicalProject<?>) child).containsNoneMovableFunction()) {
if (child instanceof PhysicalProject && !((PhysicalProject<?>) child).containsNoneMovableFunction()
&& filter.getInputSlots().stream().map(((PhysicalProject<?>) child).getAliasToProducer()::get)
.noneMatch(expr -> expr != null && expr.containsNonfoldable())) {
throw new AnalysisException(
"Nereids generate a filter-project plan, but backend not support:\n" + filter.treeString());
}
Copy link
Contributor

Choose a reason for hiding this comment

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

i think we could remove this if statement directly, because we have processed filter-project in translator

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i think we could remove this if statement directly, because we have processed filter-project in translator

had remove

@doris-robot
Copy link

TPC-DS: Total hot run time: 190016 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 476ff77cca6840795bf21ea7d623a1f7b8efe955, data reload: false

query1	1295	959	939	939
query2	6236	1857	1824	1824
query3	10977	4555	4493	4493
query4	54225	25754	23187	23187
query5	4976	571	498	498
query6	354	194	192	192
query7	4908	506	293	293
query8	303	246	241	241
query9	5760	2583	2566	2566
query10	445	303	263	263
query11	15318	15080	14758	14758
query12	154	110	105	105
query13	1044	515	384	384
query14	10217	6816	6601	6601
query15	200	198	195	195
query16	7105	643	506	506
query17	1066	724	553	553
query18	1619	420	309	309
query19	195	195	157	157
query20	127	124	120	120
query21	216	135	109	109
query22	4596	4585	4366	4366
query23	33722	33382	33284	33284
query24	5759	2390	2455	2390
query25	486	459	417	417
query26	693	277	152	152
query27	1958	495	328	328
query28	2911	2449	2457	2449
query29	563	591	442	442
query30	218	215	147	147
query31	920	860	775	775
query32	70	64	60	60
query33	438	346	307	307
query34	786	893	512	512
query35	839	862	753	753
query36	953	995	882	882
query37	122	102	76	76
query38	4254	4367	4275	4275
query39	1510	1466	1430	1430
query40	211	120	111	111
query41	57	54	54	54
query42	124	110	109	109
query43	510	527	475	475
query44	1343	803	813	803
query45	179	176	168	168
query46	893	1097	665	665
query47	1891	1877	1801	1801
query48	389	435	318	318
query49	699	558	440	440
query50	721	775	413	413
query51	4308	4269	4176	4176
query52	116	111	97	97
query53	236	267	191	191
query54	480	492	417	417
query55	78	78	79	78
query56	297	294	262	262
query57	1137	1165	1146	1146
query58	264	253	276	253
query59	2825	2906	2767	2767
query60	289	268	259	259
query61	121	130	124	124
query62	772	753	691	691
query63	227	197	199	197
query64	1711	1067	660	660
query65	3370	3163	3144	3144
query66	781	384	296	296
query67	16074	15778	15332	15332
query68	5453	771	500	500
query69	509	281	263	263
query70	1171	1116	1090	1090
query71	466	302	332	302
query72	6288	3593	3865	3593
query73	1276	757	349	349
query74	9169	9085	8874	8874
query75	3199	3181	2673	2673
query76	3826	1174	731	731
query77	503	374	279	279
query78	10117	10204	9308	9308
query79	1908	827	591	591
query80	691	534	498	498
query81	510	271	233	233
query82	428	126	96	96
query83	175	166	160	160
query84	289	99	83	83
query85	757	352	301	301
query86	345	303	285	285
query87	4491	4551	4489	4489
query88	2865	2216	2167	2167
query89	400	313	285	285
query90	1677	188	185	185
query91	137	136	104	104
query92	70	58	55	55
query93	2188	1024	581	581
query94	665	397	287	287
query95	342	262	256	256
query96	498	548	264	264
query97	2748	2856	2776	2776
query98	220	203	200	200
query99	1271	1434	1373	1373
Total cold run time: 292293 ms
Total hot run time: 190016 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.04
query2	0.07	0.03	0.03
query3	0.23	0.07	0.06
query4	1.63	0.10	0.10
query5	0.42	0.42	0.41
query6	1.16	0.67	0.66
query7	0.02	0.01	0.02
query8	0.04	0.03	0.03
query9	0.60	0.51	0.53
query10	0.59	0.59	0.58
query11	0.15	0.10	0.11
query12	0.14	0.10	0.11
query13	0.62	0.62	0.62
query14	2.69	2.76	2.69
query15	0.92	0.84	0.85
query16	0.38	0.37	0.37
query17	1.01	1.04	1.02
query18	0.21	0.20	0.19
query19	1.87	1.94	1.85
query20	0.02	0.01	0.01
query21	15.35	0.88	0.54
query22	0.75	1.19	1.09
query23	14.66	1.37	0.60
query24	12.41	1.03	0.33
query25	0.33	0.10	0.08
query26	0.74	0.18	0.14
query27	0.05	0.04	0.05
query28	6.18	0.80	0.44
query29	12.54	3.94	3.30
query30	0.25	0.09	0.07
query31	2.82	0.59	0.38
query32	3.24	0.55	0.46
query33	2.98	3.08	3.02
query34	15.84	5.09	4.51
query35	4.52	4.50	4.55
query36	0.66	0.50	0.49
query37	0.09	0.07	0.06
query38	0.06	0.04	0.03
query39	0.03	0.03	0.03
query40	0.17	0.13	0.13
query41	0.08	0.03	0.02
query42	0.04	0.02	0.02
query43	0.03	0.04	0.02
Total cold run time: 106.62 s
Total hot run time: 30.51 s

@yujun777
Copy link
Collaborator Author

run buildall

@yujun777
Copy link
Collaborator Author

run buildall

1 similar comment
@yujun777
Copy link
Collaborator Author

run buildall

@yujun777
Copy link
Collaborator Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17602	5357	5132	5132
q2	2053	315	178	178
q3	10385	1304	751	751
q4	10216	1064	565	565
q5	7542	2430	2370	2370
q6	194	172	131	131
q7	914	720	597	597
q8	9299	1292	1090	1090
q9	4862	4778	4772	4772
q10	6840	2305	1898	1898
q11	472	276	253	253
q12	350	368	236	236
q13	17780	3706	3154	3154
q14	230	224	213	213
q15	512	485	460	460
q16	629	623	584	584
q17	563	893	345	345
q18	6699	6241	6118	6118
q19	1287	957	569	569
q20	324	327	201	201
q21	2935	2214	1956	1956
q22	374	335	298	298
Total cold run time: 102062 ms
Total hot run time: 31871 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5241	5163	5187	5163
q2	242	330	229	229
q3	2197	2683	2354	2354
q4	1488	1834	1384	1384
q5	4267	4151	4184	4151
q6	207	167	124	124
q7	1885	1831	1788	1788
q8	2630	2689	2580	2580
q9	7185	7200	7277	7200
q10	2918	3201	2787	2787
q11	600	513	518	513
q12	713	759	596	596
q13	3493	3953	3249	3249
q14	291	303	289	289
q15	521	473	469	469
q16	650	684	645	645
q17	1202	1644	1306	1306
q18	7576	7477	7274	7274
q19	848	841	858	841
q20	1999	2010	1920	1920
q21	5404	4949	4825	4825
q22	643	595	577	577
Total cold run time: 52200 ms
Total hot run time: 50264 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 189612 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 06e8d7c0ac04a3a4ca6dfd9bcae59cd377e58ae4, data reload: false

query1	1321	967	939	939
query2	6183	1816	1793	1793
query3	11148	4495	4689	4495
query4	56126	25514	23133	23133
query5	5231	520	485	485
query6	397	207	209	207
query7	5173	539	295	295
query8	336	243	250	243
query9	6987	2503	2518	2503
query10	413	324	257	257
query11	15336	15175	15091	15091
query12	155	111	117	111
query13	1246	534	398	398
query14	10997	6819	6618	6618
query15	203	197	187	187
query16	7114	657	475	475
query17	1037	735	539	539
query18	1641	406	322	322
query19	187	196	161	161
query20	135	121	120	120
query21	205	135	105	105
query22	4427	4524	4441	4441
query23	33830	33303	33330	33303
query24	5626	2401	2399	2399
query25	465	471	392	392
query26	692	273	167	167
query27	1672	518	341	341
query28	2896	2444	2416	2416
query29	552	568	435	435
query30	206	188	157	157
query31	883	898	812	812
query32	73	64	60	60
query33	441	384	298	298
query34	745	857	493	493
query35	792	821	760	760
query36	976	1004	912	912
query37	123	100	79	79
query38	4320	4207	4275	4207
query39	1507	1406	1436	1406
query40	213	119	101	101
query41	52	51	54	51
query42	130	110	103	103
query43	504	512	499	499
query44	1324	799	802	799
query45	173	170	163	163
query46	890	1062	654	654
query47	1808	1886	1754	1754
query48	385	434	311	311
query49	694	529	428	428
query50	744	765	438	438
query51	4507	4341	4293	4293
query52	103	103	98	98
query53	233	266	197	197
query54	477	506	409	409
query55	81	77	79	77
query56	277	274	255	255
query57	1176	1172	1061	1061
query58	235	220	232	220
query59	2717	2825	2657	2657
query60	276	260	262	260
query61	114	117	117	117
query62	683	717	646	646
query63	228	189	187	187
query64	1706	1000	687	687
query65	3219	3209	3156	3156
query66	730	404	310	310
query67	15926	15508	15415	15415
query68	4706	798	509	509
query69	483	303	269	269
query70	1133	1130	1126	1126
query71	407	300	265	265
query72	6284	3772	3556	3556
query73	809	744	336	336
query74	9209	9267	8677	8677
query75	3194	3179	2639	2639
query76	3054	1180	769	769
query77	563	382	293	293
query78	10080	10188	9330	9330
query79	1514	860	576	576
query80	704	548	491	491
query81	528	278	241	241
query82	397	133	96	96
query83	178	166	151	151
query84	284	86	79	79
query85	736	405	302	302
query86	332	295	311	295
query87	4395	4492	4366	4366
query88	2798	2189	2102	2102
query89	397	305	282	282
query90	1726	191	193	191
query91	131	139	109	109
query92	63	58	56	56
query93	1449	1002	578	578
query94	608	401	301	301
query95	358	274	260	260
query96	483	570	264	264
query97	2767	2849	2750	2750
query98	232	208	213	208
query99	1333	1401	1244	1244
Total cold run time: 292737 ms
Total hot run time: 189612 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.03
query2	0.07	0.03	0.04
query3	0.24	0.06	0.06
query4	1.62	0.10	0.10
query5	0.40	0.42	0.39
query6	1.19	0.67	0.65
query7	0.02	0.01	0.01
query8	0.04	0.03	0.04
query9	0.57	0.52	0.52
query10	0.60	0.58	0.57
query11	0.15	0.11	0.11
query12	0.14	0.11	0.11
query13	0.64	0.60	0.60
query14	2.69	2.71	2.73
query15	0.92	0.86	0.86
query16	0.38	0.38	0.38
query17	1.07	1.03	1.04
query18	0.22	0.20	0.20
query19	1.92	1.81	2.04
query20	0.02	0.01	0.01
query21	15.38	0.90	0.55
query22	0.75	1.13	0.80
query23	14.85	1.41	0.60
query24	12.15	0.80	0.36
query25	0.34	0.11	0.08
query26	0.86	0.19	0.13
query27	0.06	0.04	0.05
query28	6.72	0.78	0.44
query29	12.55	3.91	3.26
query30	0.24	0.08	0.06
query31	2.84	0.58	0.39
query32	3.22	0.54	0.46
query33	2.98	3.03	3.15
query34	15.78	5.24	4.54
query35	4.57	4.56	4.54
query36	0.69	0.50	0.49
query37	0.09	0.06	0.06
query38	0.05	0.04	0.04
query39	0.04	0.03	0.02
query40	0.17	0.13	0.13
query41	0.08	0.04	0.02
query42	0.04	0.03	0.02
query43	0.03	0.03	0.03
Total cold run time: 107.42 s
Total hot run time: 30.3 s

@yujun777
Copy link
Collaborator Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17574	5350	5351	5350
q2	2043	300	164	164
q3	10417	1305	709	709
q4	10218	1023	565	565
q5	7476	2499	2387	2387
q6	196	177	136	136
q7	930	762	608	608
q8	9328	1367	1147	1147
q9	4965	4812	4542	4542
q10	6852	2327	1897	1897
q11	483	287	255	255
q12	346	352	220	220
q13	17751	3651	3061	3061
q14	231	228	215	215
q15	522	461	453	453
q16	623	605	585	585
q17	578	882	356	356
q18	6613	6228	6298	6228
q19	1072	961	565	565
q20	324	330	195	195
q21	2824	2259	1942	1942
q22	368	329	311	311
Total cold run time: 101734 ms
Total hot run time: 31891 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5230	5220	5223	5220
q2	230	330	239	239
q3	2199	2679	2267	2267
q4	1437	1800	1402	1402
q5	4240	4164	4163	4163
q6	205	164	122	122
q7	1873	1808	1743	1743
q8	2638	2628	2560	2560
q9	7246	7143	7092	7092
q10	2972	3209	2708	2708
q11	574	505	501	501
q12	694	769	607	607
q13	3512	4051	3257	3257
q14	283	308	281	281
q15	507	457	471	457
q16	646	668	638	638
q17	1163	1546	1370	1370
q18	7522	7327	7227	7227
q19	849	878	943	878
q20	1979	1997	1837	1837
q21	5321	4862	4731	4731
q22	644	618	542	542
Total cold run time: 51964 ms
Total hot run time: 49842 ms

@doris-robot
Copy link

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

query1	980	395	366	366
query2	6525	1852	1810	1810
query3	6797	215	215	215
query4	26111	23758	23561	23561
query5	4679	678	539	539
query6	311	217	194	194
query7	4611	499	301	301
query8	287	246	235	235
query9	8581	2521	2504	2504
query10	478	329	253	253
query11	15621	15248	14964	14964
query12	163	110	105	105
query13	1667	544	394	394
query14	9230	6228	6597	6228
query15	209	185	176	176
query16	7637	658	476	476
query17	1409	720	570	570
query18	1962	408	301	301
query19	199	189	160	160
query20	129	118	116	116
query21	213	127	103	103
query22	4204	4578	4325	4325
query23	34115	33420	33043	33043
query24	7332	2341	2349	2341
query25	544	460	412	412
query26	1211	269	158	158
query27	2395	476	317	317
query28	4286	2410	2390	2390
query29	693	535	416	416
query30	230	182	150	150
query31	928	848	771	771
query32	78	59	60	59
query33	568	346	283	283
query34	798	843	502	502
query35	761	805	725	725
query36	978	1004	911	911
query37	114	98	73	73
query38	4058	4045	3994	3994
query39	1456	1423	1375	1375
query40	201	110	106	106
query41	53	51	54	51
query42	127	101	107	101
query43	495	510	473	473
query44	1281	796	792	792
query45	169	166	159	159
query46	866	1031	638	638
query47	1757	1817	1714	1714
query48	381	407	305	305
query49	781	506	400	400
query50	685	730	421	421
query51	4363	4195	4112	4112
query52	104	106	90	90
query53	224	251	180	180
query54	481	479	400	400
query55	78	80	85	80
query56	264	247	255	247
query57	1111	1124	1077	1077
query58	240	235	231	231
query59	2752	2678	2534	2534
query60	275	277	252	252
query61	116	113	112	112
query62	816	743	668	668
query63	220	185	191	185
query64	4223	1042	663	663
query65	3241	3129	3105	3105
query66	1097	393	299	299
query67	16068	15634	15458	15458
query68	6635	773	513	513
query69	485	296	260	260
query70	1208	1135	1103	1103
query71	417	298	269	269
query72	5717	3421	3706	3421
query73	755	747	357	357
query74	8957	9109	8845	8845
query75	3149	3191	2672	2672
query76	3270	1170	732	732
query77	457	364	271	271
query78	10070	10135	9339	9339
query79	2094	809	599	599
query80	1445	547	457	457
query81	560	280	235	235
query82	441	122	94	94
query83	185	168	148	148
query84	241	93	80	80
query85	783	354	306	306
query86	356	313	301	301
query87	4667	4533	4304	4304
query88	2948	2234	2190	2190
query89	381	310	288	288
query90	1723	266	197	197
query91	142	141	106	106
query92	61	57	54	54
query93	1237	1037	589	589
query94	689	418	308	308
query95	341	263	255	255
query96	499	543	266	266
query97	2807	2872	2773	2773
query98	230	208	208	208
query99	1293	1406	1245	1245
Total cold run time: 269260 ms
Total hot run time: 183454 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.04
query2	0.08	0.03	0.03
query3	0.24	0.07	0.06
query4	1.62	0.10	0.10
query5	0.39	0.41	0.39
query6	1.15	0.65	0.65
query7	0.02	0.01	0.02
query8	0.04	0.03	0.03
query9	0.60	0.50	0.53
query10	0.58	0.58	0.57
query11	0.15	0.10	0.10
query12	0.15	0.11	0.12
query13	0.63	0.60	0.59
query14	2.68	2.70	2.72
query15	0.91	0.85	0.87
query16	0.37	0.39	0.37
query17	1.05	1.02	1.02
query18	0.22	0.21	0.20
query19	1.91	1.80	2.02
query20	0.01	0.02	0.01
query21	15.37	0.89	0.55
query22	0.77	1.25	0.76
query23	14.74	1.40	0.63
query24	12.02	1.06	0.40
query25	0.34	0.19	0.22
query26	1.12	0.19	0.15
query27	0.04	0.06	0.05
query28	5.91	0.79	0.44
query29	12.53	3.93	3.31
query30	0.25	0.08	0.06
query31	2.83	0.60	0.40
query32	3.23	0.55	0.47
query33	3.07	3.02	3.01
query34	15.82	5.18	4.52
query35	4.59	4.56	4.63
query36	0.66	0.50	0.49
query37	0.09	0.06	0.06
query38	0.05	0.04	0.04
query39	0.02	0.02	0.02
query40	0.16	0.14	0.12
query41	0.08	0.02	0.03
query42	0.04	0.03	0.02
query43	0.04	0.04	0.03
Total cold run time: 106.6 s
Total hot run time: 30.42 s

Copy link
Contributor

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

@github-actions github-actions bot added approved Indicates a PR has been approved by one committer. reviewed labels Feb 19, 2025
Copy link
Contributor

PR approved by anyone and no changes requested.

@starocean999 starocean999 merged commit 8ede4c6 into apache:master Feb 19, 2025
25 of 26 checks passed
yiguolei pushed a commit that referenced this pull request Feb 21, 2025
lzyy2024 pushed a commit to lzyy2024/doris that referenced this pull request Feb 21, 2025
…che#47989)

When the expression contains slots which is an alias and its original
expression is non-foldable, then this expression cann't push down
through project. For example:

```filter(b > 1) -> project(a + random(1, 10) as b)```, 

if push down , it will got 

```project(a + random(1, 10) as b) -> filter(a + random(1, 10) > 1)```,

it will contains two distinct RANDOM function. This is an error.

But if the filter expression itself contains non-foldable expression, it
can still push down. For example:

```filter(a + random(1, 10) > 1) -> project(a)```,  

it can still push down the filter, and got 

```project(a) -> filter(a + random(1, 10) > 1)```.
@yujun777 yujun777 added the usercase Important user case type label label Feb 24, 2025
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.9-merged dev/3.0.x dev/3.0.x-conflict reviewed usercase Important user case type label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants