Skip to content

[test](fe) Add MV residual compensation coverage#64051

Open
foxtail463 wants to merge 1 commit into
apache:masterfrom
foxtail463:test/mv-residual-compensation-coverage
Open

[test](fe) Add MV residual compensation coverage#64051
foxtail463 wants to merge 1 commit into
apache:masterfrom
foxtail463:test/mv-residual-compensation-coverage

Conversation

@foxtail463
Copy link
Copy Markdown
Contributor

This PR adds focused FE unit test coverage for MV residual predicate compensation.

The new cases cover:

  • Comparable literal types beyond bigint, including date, timestamp, decimal, and string literals.
  • Boundary operator implication, such as < implying <=, > implying >=, and = implying range predicates.
  • Negative reverse cases to ensure broader predicates are not incorrectly treated as covered.
  • Nested DNF predicates where every expanded query branch must be covered by a view branch.
  • A mixed DNF negative case where adding one uncovered branch makes the residual compensation unsafe.

No optimizer behavior is changed. This is test-only coverage for the existing MV predicate compensation logic.

@foxtail463
Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 0.00% (0/10) 🎉
Increment coverage report
Complete coverage report

@hello-stephen
Copy link
Copy Markdown
Contributor

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

------ Round 1 ----------------------------------
orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	17735	4149	4129	4129
q2	q3	10803	1515	838	838
q4	4680	477	354	354
q5	7611	883	590	590
q6	188	177	140	140
q7	773	858	629	629
q8	9366	1641	1670	1641
q9	5803	4516	4483	4483
q10	6742	1812	1524	1524
q11	445	278	255	255
q12	639	427	303	303
q13	18134	3347	2787	2787
q14	260	258	240	240
q15	q16	820	781	715	715
q17	947	849	909	849
q18	7006	5714	5515	5515
q19	1305	1258	1078	1078
q20	517	402	266	266
q21	6208	2840	2743	2743
q22	472	383	337	337
Total cold run time: 100454 ms
Total hot run time: 29416 ms

----- Round 2, with runtime_filter_mode=off -----
orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	5108	4808	4842	4808
q2	q3	4961	5237	4690	4690
q4	2134	2200	1382	1382
q5	4966	4710	4727	4710
q6	240	174	132	132
q7	1893	1781	1619	1619
q8	2449	2175	2141	2141
q9	8065	7493	7469	7469
q10	4750	4669	4194	4194
q11	527	423	359	359
q12	727	732	529	529
q13	3016	3393	2802	2802
q14	288	273	250	250
q15	q16	675	695	613	613
q17	1289	1248	1249	1248
q18	7236	6908	6867	6867
q19	1150	1115	1089	1089
q20	2215	2236	1946	1946
q21	5379	4603	4457	4457
q22	523	458	399	399
Total cold run time: 57591 ms
Total hot run time: 51704 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-DS: Total hot run time: 169349 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 38e55b28b8a061d417d4d64a02eb28d7e38a25a6, data reload: false

query5	4337	626	504	504
query6	441	197	194	194
query7	4867	557	286	286
query8	367	222	202	202
query9	8762	4099	4062	4062
query10	463	307	257	257
query11	5947	2367	2177	2177
query12	157	105	102	102
query13	1258	592	461	461
query14	6353	5416	5087	5087
query14_1	4428	4483	4377	4377
query15	221	192	177	177
query16	1038	446	386	386
query17	1101	700	574	574
query18	2499	463	348	348
query19	196	181	142	142
query20	110	105	104	104
query21	216	142	115	115
query22	13595	13739	13364	13364
query23	17343	16488	16125	16125
query23_1	16339	16255	16295	16255
query24	7522	1775	1304	1304
query24_1	1324	1305	1296	1296
query25	545	463	390	390
query26	1333	326	161	161
query27	2702	548	344	344
query28	4463	2036	2025	2025
query29	1074	613	480	480
query30	322	236	202	202
query31	1112	1075	962	962
query32	110	66	62	62
query33	537	341	269	269
query34	1207	1177	667	667
query35	761	799	677	677
query36	1429	1377	1282	1282
query37	160	107	93	93
query38	3223	3140	3068	3068
query39	932	922	902	902
query39_1	901	877	868	868
query40	225	134	111	111
query41	71	71	69	69
query42	98	101	100	100
query43	316	329	277	277
query44	
query45	202	190	185	185
query46	1119	1215	744	744
query47	2349	2364	2284	2284
query48	417	423	314	314
query49	645	481	362	362
query50	999	361	262	262
query51	4330	4265	4241	4241
query52	91	101	81	81
query53	238	266	199	199
query54	307	236	225	225
query55	83	86	71	71
query56	275	242	243	242
query57	1466	1398	1354	1354
query58	261	231	224	224
query59	1562	1675	1451	1451
query60	305	262	272	262
query61	186	211	156	156
query62	695	682	584	584
query63	233	190	183	183
query64	2589	798	616	616
query65	
query66	1777	463	344	344
query67	29758	29652	29491	29491
query68	
query69	414	303	262	262
query70	938	973	1005	973
query71	299	216	215	215
query72	2998	2668	2385	2385
query73	850	814	433	433
query74	5179	4920	4761	4761
query75	2711	2574	2251	2251
query76	2341	1139	785	785
query77	368	360	287	287
query78	12451	12399	11873	11873
query79	1342	1081	760	760
query80	663	478	384	384
query81	453	280	245	245
query82	467	162	128	128
query83	358	271	242	242
query84	265	147	112	112
query85	879	542	444	444
query86	375	301	282	282
query87	3359	3351	3216	3216
query88	3632	2784	2722	2722
query89	435	373	329	329
query90	1921	175	186	175
query91	177	166	141	141
query92	62	58	58	58
query93	1535	1485	882	882
query94	555	339	319	319
query95	700	471	343	343
query96	1023	782	356	356
query97	2685	2706	2553	2553
query98	208	208	206	206
query99	1144	1163	1046	1046
Total cold run time: 251546 ms
Total hot run time: 169349 ms

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.

2 participants