Skip to content

Conversation

@feiniaofeiafei
Copy link
Contributor

@feiniaofeiafei feiniaofeiafei commented Oct 20, 2025

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

After partition pruning on a list-partitioned table, the partitioning key predicates used for pruning are often redundant within the remaining partitions, leading to unnecessary column scan and computation.

Given a table:

CREATE TABLE sales (
    id INT,
    region VARCHAR(10)
) PARTITION BY LIST (region) (
    PARTITION p_north VALUES IN ('bj', 'tj'),
    PARTITION p_south VALUES IN ('gz', 'sz')
);
query:
SELECT * FROM sales WHERE region IN ('bj', 'tj');

Plan Before:

-> TableReader(Partition p_north)
    -> TableScan(Filter: region in ('bj', 'tj'))

Plan After:

-> TableReader(Partition p_north)
    -> TableScan() // Filter is removed

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

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

@feiniaofeiafei
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TPC-DS: Total hot run time: 190630 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 6af0887f7646233df6f56605650d54fc7c34a9a7, data reload: false

query1	1067	446	406	406
query2	6562	1713	1723	1713
query3	6760	220	224	220
query4	26564	23599	23589	23589
query5	5361	649	510	510
query6	346	249	251	249
query7	4670	510	298	298
query8	312	276	274	274
query9	8739	2576	2595	2576
query10	539	340	305	305
query11	15591	15118	14865	14865
query12	185	120	119	119
query13	1690	573	448	448
query14	12609	9374	9578	9374
query15	256	201	182	182
query16	7816	674	488	488
query17	1607	791	740	740
query18	2219	445	371	371
query19	351	218	201	201
query20	139	134	131	131
query21	220	142	122	122
query22	4612	4542	4561	4542
query23	34928	33780	34095	33780
query24	8194	2554	2561	2554
query25	601	536	454	454
query26	1263	283	165	165
query27	2744	565	373	373
query28	4598	2222	2203	2203
query29	841	640	528	528
query30	665	239	206	206
query31	1101	858	789	789
query32	90	77	73	73
query33	581	425	337	337
query34	833	921	548	548
query35	907	892	794	794
query36	984	994	874	874
query37	127	110	85	85
query38	3542	3651	3430	3430
query39	1483	1429	1412	1412
query40	222	125	119	119
query41	64	58	60	58
query42	124	112	110	110
query43	477	498	476	476
query44	1334	824	825	824
query45	188	177	178	177
query46	848	996	647	647
query47	1729	1744	1720	1720
query48	387	428	327	327
query49	761	480	431	431
query50	653	692	417	417
query51	3993	3951	3978	3951
query52	111	106	103	103
query53	243	276	204	204
query54	610	597	525	525
query55	87	89	86	86
query56	322	323	322	322
query57	1148	1165	1119	1119
query58	292	288	282	282
query59	2619	2648	2513	2513
query60	354	372	364	364
query61	163	163	160	160
query62	808	735	664	664
query63	239	196	197	196
query64	4406	1190	857	857
query65	4061	3937	4010	3937
query66	1062	436	330	330
query67	15319	14996	14766	14766
query68	9594	899	601	601
query69	515	340	292	292
query70	1414	1349	1204	1204
query71	525	349	318	318
query72	5518	4763	4723	4723
query73	702	568	359	359
query74	9312	9183	8925	8925
query75	4558	3379	2833	2833
query76	4882	1172	768	768
query77	1023	426	399	399
query78	9575	9895	8886	8886
query79	1446	843	598	598
query80	713	597	515	515
query81	490	261	226	226
query82	252	170	129	129
query83	304	275	250	250
query84	304	117	89	89
query85	962	494	426	426
query86	342	333	323	323
query87	3737	3775	3745	3745
query88	2900	2324	2278	2278
query89	391	329	294	294
query90	2061	227	230	227
query91	167	165	140	140
query92	83	73	67	67
query93	1205	995	645	645
query94	693	451	338	338
query95	394	332	320	320
query96	498	585	294	294
query97	2942	2960	2887	2887
query98	250	215	210	210
query99	1438	1425	1308	1308
Total cold run time: 283511 ms
Total hot run time: 190630 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 6af0887f7646233df6f56605650d54fc7c34a9a7, data reload: false

query1	0.06	0.05	0.04
query2	0.09	0.06	0.06
query3	0.26	0.08	0.08
query4	1.60	0.12	0.11
query5	0.29	0.27	0.25
query6	1.17	0.67	0.65
query7	0.02	0.03	0.03
query8	0.06	0.04	0.04
query9	0.64	0.53	0.52
query10	0.60	0.58	0.59
query11	0.16	0.11	0.12
query12	0.16	0.12	0.13
query13	0.63	0.62	0.62
query14	1.03	1.05	1.03
query15	0.86	0.90	0.85
query16	0.41	0.40	0.40
query17	1.08	1.08	1.06
query18	0.22	0.20	0.21
query19	1.89	1.87	1.83
query20	0.01	0.02	0.01
query21	15.43	0.92	0.58
query22	0.77	1.15	0.64
query23	15.04	1.40	0.61
query24	7.63	0.93	0.85
query25	0.42	0.22	0.07
query26	0.57	0.17	0.14
query27	0.07	0.05	0.06
query28	8.89	1.37	0.94
query29	12.52	4.00	3.28
query30	0.28	0.13	0.12
query31	2.83	0.60	0.38
query32	3.23	0.55	0.47
query33	3.08	3.22	3.12
query34	16.15	5.40	4.83
query35	4.92	4.95	4.94
query36	0.69	0.51	0.50
query37	0.10	0.08	0.08
query38	0.07	0.04	0.04
query39	0.03	0.04	0.03
query40	0.17	0.17	0.15
query41	0.08	0.03	0.03
query42	0.04	0.03	0.03
query43	0.04	0.04	0.04
Total cold run time: 104.29 s
Total hot run time: 30.51 s

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 81.16% (56/69) 🎉
Increment coverage report
Complete coverage report

@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 92.75% (64/69) 🎉
Increment coverage report
Complete coverage report

@feiniaofeiafei feiniaofeiafei force-pushed the support_prune_predicate branch from 67a10c5 to f95f6dd Compare October 21, 2025 09:37
@feiniaofeiafei
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

query1	1076	456	428	428
query2	6554	1695	1687	1687
query3	6754	232	235	232
query4	26183	23705	23128	23128
query5	5561	651	493	493
query6	350	265	229	229
query7	4661	504	319	319
query8	312	276	270	270
query9	8712	2639	2612	2612
query10	537	347	283	283
query11	15363	15100	14791	14791
query12	182	119	115	115
query13	1707	561	424	424
query14	12704	9349	9317	9317
query15	289	204	182	182
query16	7776	674	482	482
query17	1581	776	618	618
query18	2165	447	349	349
query19	282	211	178	178
query20	144	146	132	132
query21	227	132	126	126
query22	4809	4704	4500	4500
query23	34939	33835	33896	33835
query24	8167	2579	2545	2545
query25	563	559	485	485
query26	1335	284	166	166
query27	2861	528	387	387
query28	4419	2242	2240	2240
query29	819	648	505	505
query30	319	255	216	216
query31	958	836	777	777
query32	85	78	75	75
query33	609	408	370	370
query34	831	874	550	550
query35	846	858	817	817
query36	1034	1030	979	979
query37	146	127	98	98
query38	3682	3641	3496	3496
query39	1499	1410	1457	1410
query40	242	131	120	120
query41	71	65	65	65
query42	131	118	114	114
query43	482	523	479	479
query44	1245	761	750	750
query45	189	185	183	183
query46	899	998	642	642
query47	1746	1831	1712	1712
query48	422	421	337	337
query49	784	488	473	473
query50	656	691	409	409
query51	3940	3926	3836	3836
query52	110	105	98	98
query53	239	260	202	202
query54	606	592	534	534
query55	91	85	82	82
query56	322	317	307	307
query57	1185	1191	1115	1115
query58	289	288	273	273
query59	2560	2594	2538	2538
query60	398	338	319	319
query61	161	158	158	158
query62	785	754	674	674
query63	235	196	199	196
query64	4388	1126	857	857
query65	4068	3981	3987	3981
query66	1036	431	318	318
query67	15508	15506	14991	14991
query68	8617	891	597	597
query69	531	317	295	295
query70	1371	1346	1293	1293
query71	537	350	310	310
query72	5916	4960	4880	4880
query73	725	570	357	357
query74	9243	9058	8632	8632
query75	4080	3312	2855	2855
query76	3777	1158	730	730
query77	815	410	319	319
query78	9570	9714	8902	8902
query79	5117	828	587	587
query80	724	549	520	520
query81	487	260	228	228
query82	569	160	145	145
query83	300	268	260	260
query84	305	114	94	94
query85	868	477	471	471
query86	331	322	293	293
query87	3781	3737	3592	3592
query88	3176	2273	2209	2209
query89	452	326	295	295
query90	2059	217	219	217
query91	164	162	135	135
query92	83	73	64	64
query93	2491	974	654	654
query94	699	439	332	332
query95	404	314	320	314
query96	493	592	289	289
query97	2933	2968	2883	2883
query98	241	218	214	214
query99	1446	1420	1322	1322
Total cold run time: 286134 ms
Total hot run time: 189897 ms

@doris-robot
Copy link

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

query1	0.06	0.05	0.04
query2	0.10	0.05	0.05
query3	0.27	0.09	0.08
query4	1.62	0.12	0.11
query5	0.28	0.27	0.25
query6	1.17	0.68	0.64
query7	0.04	0.03	0.03
query8	0.05	0.04	0.04
query9	0.62	0.52	0.53
query10	0.57	0.57	0.59
query11	0.19	0.11	0.12
query12	0.15	0.12	0.12
query13	0.65	0.61	0.63
query14	1.01	1.04	1.00
query15	0.88	0.84	0.89
query16	0.39	0.41	0.41
query17	1.05	1.08	1.05
query18	0.21	0.20	0.20
query19	2.00	1.84	1.84
query20	0.01	0.02	0.01
query21	15.42	0.19	0.13
query22	4.91	0.07	0.05
query23	15.69	0.26	0.11
query24	3.20	0.49	0.48
query25	0.09	0.07	0.06
query26	0.14	0.14	0.13
query27	0.07	0.05	0.05
query28	5.05	1.15	0.93
query29	12.57	4.01	3.44
query30	0.28	0.14	0.13
query31	2.83	0.60	0.39
query32	3.24	0.57	0.49
query33	3.26	3.05	3.17
query34	16.17	5.50	4.91
query35	4.89	4.91	4.97
query36	0.72	0.53	0.51
query37	0.10	0.07	0.08
query38	0.07	0.05	0.04
query39	0.04	0.04	0.03
query40	0.18	0.16	0.15
query41	0.09	0.03	0.03
query42	0.04	0.03	0.03
query43	0.04	0.04	0.04
Total cold run time: 100.41 s
Total hot run time: 28.68 s

@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 93.42% (71/76) 🎉
Increment coverage report
Complete coverage report

@feiniaofeiafei
Copy link
Contributor Author

run buildall

@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 93.42% (71/76) 🎉
Increment coverage report
Complete coverage report

@feiniaofeiafei
Copy link
Contributor Author

run performance

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17610	5276	5100	5100
q2	1975	301	180	180
q3	10310	1539	799	799
q4	10249	1014	422	422
q5	7373	901	515	515
q6	188	192	158	158
q7	763	759	557	557
q8	9386	719	537	537
q9	25314	4975	4903	4903
q10	9204	4880	4483	4483
q11	549	351	351	351
q12	382	450	271	271
q13	17789	3667	3081	3081
q14	440	428	413	413
q15	625	576	574	574
q16	474	451	409	409
q17	611	920	429	429
q18	7554	7089	7082	7082
q19	1273	968	562	562
q20	586	531	383	383
q21	4607	4083	4139	4083
q22	385	318	311	311
Total cold run time: 127647 ms
Total hot run time: 35603 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5177	5159	5518	5159
q2	366	461	365	365
q3	2247	2717	2273	2273
q4	1396	1812	1383	1383
q5	4429	4266	4270	4266
q6	224	175	138	138
q7	8131	7896	7803	7803
q8	3019	2956	3004	2956
q9	24628	24408	24474	24408
q10	4418	4752	4404	4404
q11	1358	1246	1217	1217
q12	666	774	577	577
q13	3308	3720	3024	3024
q14	411	416	371	371
q15	579	545	521	521
q16	563	607	583	583
q17	2222	2573	2410	2410
q18	7399	7096	7074	7074
q19	786	946	1152	946
q20	1966	2019	1866	1866
q21	10903	10210	10464	10210
q22	635	593	552	552
Total cold run time: 84831 ms
Total hot run time: 82506 ms

@doris-robot
Copy link

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

query1	0.08	0.05	0.05
query2	0.09	0.05	0.05
query3	0.26	0.10	0.09
query4	1.60	0.13	0.15
query5	0.39	0.38	0.37
query6	1.20	0.79	0.84
query7	0.03	0.02	0.02
query8	0.07	0.05	0.04
query9	0.73	0.66	0.62
query10	0.66	0.65	0.64
query11	0.16	0.14	0.13
query12	0.17	0.17	0.15
query13	0.74	0.68	0.67
query14	0.94	0.87	0.93
query15	0.92	0.89	0.90
query16	0.45	0.45	0.45
query17	1.12	1.09	1.10
query18	0.27	0.26	0.26
query19	1.97	1.91	2.07
query20	0.02	0.02	0.02
query21	15.39	0.22	0.13
query22	5.09	0.08	0.06
query23	15.68	0.29	0.11
query24	3.41	0.57	0.79
query25	0.09	0.08	0.06
query26	0.16	0.16	0.14
query27	0.08	0.10	0.06
query28	5.28	1.28	1.04
query29	12.57	3.95	3.28
query30	0.28	0.20	0.18
query31	2.83	0.64	0.43
query32	3.25	0.61	0.55
query33	3.14	3.20	3.16
query34	16.06	5.52	4.95
query35	4.96	5.03	4.95
query36	0.73	0.56	0.54
query37	0.11	0.10	0.09
query38	0.06	0.05	0.05
query39	0.03	0.04	0.04
query40	0.23	0.21	0.19
query41	0.08	0.04	0.03
query42	0.04	0.02	0.04
query43	0.03	0.05	0.04
Total cold run time: 101.45 s
Total hot run time: 29.91 s

@feiniaofeiafei
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

query1	0.06	0.06	0.05
query2	0.10	0.05	0.05
query3	0.26	0.09	0.09
query4	1.61	0.12	0.12
query5	0.29	0.27	0.25
query6	1.18	0.67	0.68
query7	0.04	0.02	0.03
query8	0.06	0.05	0.05
query9	0.62	0.55	0.53
query10	0.60	0.59	0.58
query11	0.18	0.11	0.12
query12	0.16	0.13	0.13
query13	0.64	0.63	0.62
query14	1.03	1.01	1.03
query15	0.87	0.84	0.87
query16	0.41	0.41	0.42
query17	1.09	1.09	1.03
query18	0.23	0.22	0.21
query19	1.93	1.84	1.80
query20	0.02	0.01	0.02
query21	15.45	0.19	0.13
query22	5.06	0.08	0.05
query23	15.63	0.27	0.12
query24	2.39	1.61	0.34
query25	0.08	0.08	0.07
query26	0.16	0.16	0.15
query27	0.07	0.05	0.06
query28	4.50	1.16	0.96
query29	12.58	4.08	3.42
query30	0.29	0.15	0.13
query31	2.83	0.63	0.39
query32	3.25	0.57	0.49
query33	3.06	3.11	3.06
query34	15.91	5.20	4.59
query35	4.58	4.66	4.61
query36	0.70	0.52	0.50
query37	0.11	0.07	0.06
query38	0.06	0.04	0.04
query39	0.04	0.03	0.03
query40	0.19	0.16	0.14
query41	0.09	0.04	0.03
query42	0.04	0.03	0.03
query43	0.05	0.04	0.04
Total cold run time: 98.5 s
Total hot run time: 28.01 s

@feiniaofeiafei
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TPC-DS: Total hot run time: 190730 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 52a7ae627987a4d5bc601b37e58308f5be34829f, data reload: false

query1	1073	426	435	426
query2	6594	1718	1735	1718
query3	6764	227	224	224
query4	26145	23617	23275	23275
query5	4421	665	505	505
query6	360	278	246	246
query7	4657	512	306	306
query8	336	276	264	264
query9	8688	2642	2619	2619
query10	488	345	308	308
query11	15868	15243	14973	14973
query12	191	118	120	118
query13	1697	584	443	443
query14	12336	9281	9313	9281
query15	224	190	182	182
query16	7782	722	622	622
query17	1616	860	693	693
query18	2336	471	371	371
query19	258	212	197	197
query20	141	130	129	129
query21	224	151	123	123
query22	4658	4879	4712	4712
query23	34827	34019	33626	33626
query24	8299	2487	2495	2487
query25	612	545	464	464
query26	1412	291	205	205
query27	2707	534	394	394
query28	4732	2251	2177	2177
query29	806	610	496	496
query30	300	225	196	196
query31	923	819	727	727
query32	81	72	74	72
query33	577	390	316	316
query34	806	874	540	540
query35	803	826	745	745
query36	942	997	874	874
query37	122	112	84	84
query38	3580	3553	3545	3545
query39	1498	1409	1449	1409
query40	220	129	119	119
query41	64	59	63	59
query42	124	118	115	115
query43	488	495	496	495
query44	1264	748	745	745
query45	185	178	175	175
query46	924	1002	661	661
query47	1795	1824	1719	1719
query48	416	443	321	321
query49	843	515	433	433
query50	671	694	409	409
query51	3913	3886	3881	3881
query52	114	114	104	104
query53	248	274	203	203
query54	604	604	551	551
query55	86	90	88	88
query56	331	328	326	326
query57	1213	1202	1108	1108
query58	293	284	267	267
query59	2524	2638	2624	2624
query60	362	347	340	340
query61	158	157	148	148
query62	791	716	691	691
query63	244	204	205	204
query64	4402	1228	829	829
query65	4061	3998	3964	3964
query66	1102	426	336	336
query67	15677	15337	15097	15097
query68	8213	908	605	605
query69	497	327	287	287
query70	1355	1315	1305	1305
query71	529	346	326	326
query72	5764	4975	4864	4864
query73	661	578	370	370
query74	9230	9157	8748	8748
query75	4038	3383	2852	2852
query76	3617	1168	783	783
query77	803	411	328	328
query78	9450	9787	8916	8916
query79	2006	871	590	590
query80	712	589	530	530
query81	496	260	236	236
query82	468	169	139	139
query83	277	269	254	254
query84	255	121	92	92
query85	933	469	438	438
query86	344	315	297	297
query87	3687	3746	3667	3667
query88	3697	2257	2243	2243
query89	408	340	297	297
query90	2033	220	225	220
query91	185	163	135	135
query92	86	80	70	70
query93	1455	1019	639	639
query94	700	449	339	339
query95	408	317	323	317
query96	501	582	347	347
query97	2953	2980	2888	2888
query98	243	214	214	214
query99	1354	1402	1290	1290
Total cold run time: 280359 ms
Total hot run time: 190730 ms

@doris-robot
Copy link

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

query1	0.06	0.05	0.06
query2	0.10	0.06	0.06
query3	0.25	0.08	0.08
query4	1.61	0.13	0.12
query5	0.28	0.27	0.26
query6	1.18	0.68	0.65
query7	0.04	0.03	0.03
query8	0.05	0.04	0.04
query9	0.62	0.53	0.53
query10	0.59	0.58	0.58
query11	0.16	0.11	0.14
query12	0.15	0.12	0.12
query13	0.61	0.61	0.60
query14	0.99	1.03	1.02
query15	0.85	0.84	0.86
query16	0.40	0.40	0.41
query17	1.06	1.05	1.04
query18	0.21	0.21	0.20
query19	1.89	1.78	1.79
query20	0.02	0.02	0.01
query21	15.53	0.20	0.13
query22	5.02	0.08	0.05
query23	15.66	0.26	0.10
query24	2.90	1.04	0.45
query25	0.07	0.06	0.06
query26	0.12	0.14	0.13
query27	0.07	0.05	0.05
query28	4.14	1.14	0.94
query29	12.60	3.97	3.25
query30	0.27	0.14	0.12
query31	2.81	0.60	0.39
query32	3.24	0.55	0.47
query33	3.07	3.14	3.13
query34	15.95	5.13	4.53
query35	4.58	4.55	4.57
query36	0.69	0.51	0.51
query37	0.10	0.07	0.07
query38	0.07	0.05	0.04
query39	0.04	0.03	0.03
query40	0.18	0.15	0.13
query41	0.08	0.03	0.04
query42	0.04	0.04	0.03
query43	0.05	0.04	0.04
Total cold run time: 98.4 s
Total hot run time: 27.75 s

@feiniaofeiafei
Copy link
Contributor Author

run nonConcurrent

@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 93.42% (71/76) 🎉
Increment coverage report
Complete coverage report

1 similar comment
@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 93.42% (71/76) 🎉
Increment coverage report
Complete coverage report

partitionSlots, filter.getPredicate(), nameToPartitionItem, ctx,
PartitionTableType.EXTERNAL, sortedPartitionRanges));
PartitionTableType.EXTERNAL, sortedPartitionRanges);
List<String> prunedPartitions = new ArrayList<>(res.first);
Copy link
Contributor

@924060929 924060929 Oct 23, 2025

Choose a reason for hiding this comment

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

we support prune predicates for the external table in the future

924060929
924060929 previously approved these changes Oct 23, 2025
@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Oct 23, 2025
@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 83.54% (66/79) 🎉
Increment coverage report
Complete coverage report

@doris-robot
Copy link

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

query1	0.05	0.05	0.04
query2	0.09	0.05	0.05
query3	0.26	0.09	0.09
query4	1.61	0.12	0.12
query5	0.29	0.27	0.25
query6	1.17	0.66	0.65
query7	0.03	0.03	0.03
query8	0.06	0.05	0.05
query9	0.64	0.52	0.52
query10	0.58	0.59	0.59
query11	0.17	0.11	0.12
query12	0.14	0.12	0.12
query13	0.63	0.64	0.62
query14	1.00	1.02	0.99
query15	0.86	0.87	0.85
query16	0.41	0.40	0.40
query17	1.04	1.07	0.98
query18	0.23	0.20	0.20
query19	1.99	1.82	1.85
query20	0.01	0.02	0.01
query21	15.44	0.19	0.14
query22	5.12	0.07	0.04
query23	15.66	0.26	0.10
query24	2.37	1.13	0.45
query25	0.07	0.05	0.06
query26	0.14	0.13	0.15
query27	0.07	0.05	0.06
query28	4.03	1.17	0.95
query29	12.56	4.05	3.35
query30	0.29	0.14	0.12
query31	2.82	0.58	0.39
query32	3.24	0.55	0.48
query33	3.11	3.09	3.10
query34	15.90	5.22	4.56
query35	4.56	4.59	4.60
query36	0.68	0.51	0.50
query37	0.10	0.06	0.07
query38	0.06	0.04	0.04
query39	0.04	0.03	0.03
query40	0.17	0.14	0.15
query41	0.09	0.03	0.04
query42	0.04	0.03	0.03
query43	0.05	0.04	0.03
Total cold run time: 97.87 s
Total hot run time: 27.84 s

@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 93.67% (74/79) 🎉
Increment coverage report
Complete coverage report

@feiniaofeiafei
Copy link
Contributor Author

run nonConcurrent

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Oct 28, 2025
@github-actions
Copy link
Contributor

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

@englefly
Copy link
Contributor

englefly commented Nov 3, 2025

这个pr会导致统计信息推导出问题.因为我们并不是所有表都收集的partition的行数. 所以如果我们10个分区裁剪了9个,但因为没有partition的行数,那么估行时,我们会认为table输出了全部行,而不是部分行.

@morrySnow morrySnow merged commit fdef535 into apache:master Nov 3, 2025
32 of 34 checks passed
924060929 pushed a commit that referenced this pull request Nov 5, 2025
…prune predicate after partition prune (#57688)

Add session variable skip_prune_predicate to skip prune predicate after
partition prune.

Related PR: #57169
924060929 pushed a commit that referenced this pull request Nov 10, 2025
…7817)

Related PR: #57169

Problem Summary:
Previous pr only skip prune predicate when run delete command, forget to
skip prune predicate when explain delete stmt.
To solve this problem, this pr skip prune predicate when explain delete
stmt and add some cases for update and delete.
feiniaofeiafei added a commit to feiniaofeiafei/doris that referenced this pull request Nov 14, 2025
…true after partition prune in list partition (apache#57169)

Problem Summary:

After partition pruning on a list-partitioned table, the partitioning
key predicates used for pruning are often redundant within the remaining
partitions, leading to unnecessary column scan and computation.

Given a table:

CREATE TABLE sales (
    id INT,
    region VARCHAR(10)
) PARTITION BY LIST (region) (
    PARTITION p_north VALUES IN ('bj', 'tj'),
    PARTITION p_south VALUES IN ('gz', 'sz')
);

query:
SELECT * FROM sales WHERE region IN ('bj', 'tj');

Plan Before:

-> TableReader(Partition p_north)
    -> TableScan(Filter: region in ('bj', 'tj'))

Plan After:

-> TableReader(Partition p_north)
    -> TableScan() // Filter is removed
feiniaofeiafei added a commit to feiniaofeiafei/doris that referenced this pull request Nov 14, 2025
…prune predicate after partition prune (apache#57688)

Add session variable skip_prune_predicate to skip prune predicate after
partition prune.

Related PR: apache#57169
feiniaofeiafei added a commit to feiniaofeiafei/doris that referenced this pull request Nov 14, 2025
…ache#57817)

Related PR: apache#57169

Problem Summary:
Previous pr only skip prune predicate when run delete command, forget to
skip prune predicate when explain delete stmt.
To solve this problem, this pr skip prune predicate when explain delete
stmt and add some cases for update and delete.
wyxxxcat pushed a commit to wyxxxcat/doris that referenced this pull request Nov 18, 2025
…true after partition prune in list partition (apache#57169)

### What problem does this PR solve?

Problem Summary:

After partition pruning on a list-partitioned table, the partitioning
key predicates used for pruning are often redundant within the remaining
partitions, leading to unnecessary column scan and computation.

Given a table:

CREATE TABLE sales (
    id INT,
    region VARCHAR(10)
) PARTITION BY LIST (region) (
    PARTITION p_north VALUES IN ('bj', 'tj'),
    PARTITION p_south VALUES IN ('gz', 'sz')
);

query:
SELECT * FROM sales WHERE region IN ('bj', 'tj');

Plan Before:

-> TableReader(Partition p_north)
    -> TableScan(Filter: region in ('bj', 'tj'))

Plan After:

-> TableReader(Partition p_north)
    -> TableScan() // Filter is removed
wyxxxcat pushed a commit to wyxxxcat/doris that referenced this pull request Nov 18, 2025
…prune predicate after partition prune (apache#57688)

Add session variable skip_prune_predicate to skip prune predicate after
partition prune.

Related PR: apache#57169
wyxxxcat pushed a commit to wyxxxcat/doris that referenced this pull request Nov 18, 2025
…ache#57817)

Related PR: apache#57169

Problem Summary:
Previous pr only skip prune predicate when run delete command, forget to
skip prune predicate when explain delete stmt.
To solve this problem, this pr skip prune predicate when explain delete
stmt and add some cases for update and delete.
feiniaofeiafei added a commit to feiniaofeiafei/doris that referenced this pull request Nov 25, 2025
…true after partition prune in list partition (apache#57169)

Problem Summary:

After partition pruning on a list-partitioned table, the partitioning
key predicates used for pruning are often redundant within the remaining
partitions, leading to unnecessary column scan and computation.

Given a table:

CREATE TABLE sales (
    id INT,
    region VARCHAR(10)
) PARTITION BY LIST (region) (
    PARTITION p_north VALUES IN ('bj', 'tj'),
    PARTITION p_south VALUES IN ('gz', 'sz')
);

query:
SELECT * FROM sales WHERE region IN ('bj', 'tj');

Plan Before:

-> TableReader(Partition p_north)
    -> TableScan(Filter: region in ('bj', 'tj'))

Plan After:

-> TableReader(Partition p_north)
    -> TableScan() // Filter is removed
feiniaofeiafei added a commit to feiniaofeiafei/doris that referenced this pull request Nov 25, 2025
…prune predicate after partition prune (apache#57688)

Add session variable skip_prune_predicate to skip prune predicate after
partition prune.

Related PR: apache#57169
feiniaofeiafei added a commit to feiniaofeiafei/doris that referenced this pull request Nov 25, 2025
…ache#57817)

Related PR: apache#57169

Problem Summary:
Previous pr only skip prune predicate when run delete command, forget to
skip prune predicate when explain delete stmt.
To solve this problem, this pr skip prune predicate when explain delete
stmt and add some cases for update and delete.
yiguolei pushed a commit that referenced this pull request Nov 27, 2025
… are always true after partition prune in list partition #57169 #57688 #57817 (#58040)

picked from #57169 #57688 #57817
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/4.0.2-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants