Skip to content

[fix](fe) Add null reject compensation for join rewrite#63268

Merged
morrySnow merged 1 commit into
apache:masterfrom
seawinde:fix-mv-null-reject-compensation
May 18, 2026
Merged

[fix](fe) Add null reject compensation for join rewrite#63268
morrySnow merged 1 commit into
apache:masterfrom
seawinde:fix-mv-null-reject-compensation

Conversation

@seawinde
Copy link
Copy Markdown
Member

@seawinde seawinde commented May 15, 2026

What problem does this PR solve?

Issue Number: N/A

Related PR: #62492

Problem Summary:

INNER JoinEdge null-reject inference can validate rewriting an INNER JOIN query by an OUTER JOIN materialized view without adding the required non-null compensation predicate. The rewritten plan can keep null-padded rows from the MV side that should be rejected by the original query.

Root cause: In AbstractMaterializedViewRule.predicatesCompensate(), the previous check treated INNER JoinEdge null-reject inference as proof that an OUTER JOIN MV rewrite was valid, but the proof was not materialized as a real IS NOT NULL predicate in the rewritten query.

Change Summary:

AbstractMaterializedViewRule.java | Split predicate-based null-reject proof from INNER JoinEdge proof and add query-based IS NOT NULL compensation when only JoinEdge proof covers required MV nullable sides. Fail rewrite if no safe MV output slot can carry the compensation predicate.

NullRejectInferenceTest.java | Add unit coverage for LEFT/FULL OUTER JOIN MV rewrites that require INNER JoinEdge null-reject compensation on both sides.

inner_join_null_reject_compensation.groovy | Add regression coverage with unmatched OUTER JOIN MV rows, including the LEFT JOIN MV to INNER JOIN query repro with nullable join keys.

Design rationale: Existing query predicates already flow through normal predicate compensation, so they do not need extra filters. INNER JoinEdge proof is only logical evidence; when it is needed to reject null-generated MV rows, the rewrite must add a real IS NOT NULL predicate on an MV output slot. If no such slot is available, the rewrite is rejected conservatively.

Release note

Fixed an issue where OUTER JOIN materialized view rewrite could return extra null-padded rows for INNER JOIN queries.

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

Unit tests / checks:

  • Added NullRejectInferenceTest coverage for INNER/FULL join null-reject compensation on both sides.

  • Ran git diff --check.

  • Tried ./run-fe-ut.sh --run org.apache.doris.nereids.rules.exploration.mv.NullRejectInferenceTest, but FE core compilation failed before tests because generated cloud proto classes miss Cloud.CreateMetaSyncPointRequest/Response in MetaServiceClient and MetaServiceProxy.

Regression test:

  • Added inner_join_null_reject_compensation.groovy for FULL/LEFT OUTER JOIN MV rewrites with unmatched null-padded rows.

  • Not run locally; the local FE UT build is currently blocked by the cloud proto compilation issue above.

  • Behavior changed:

    • Yes. OUTER JOIN MV rewrite now adds real IS NOT NULL compensation when INNER JoinEdge null-reject inference is required, or rejects the rewrite if no safe MV output slot can carry that predicate.

    • No.

  • 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

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

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

@seawinde
Copy link
Copy Markdown
Member Author

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-H: Total hot run time: 29856 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 92825abbf981e5c0b7b63eba8f526c082a9c1202, 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	17632	3969	4008	3969
q2	q3	10725	917	624	624
q4	4663	495	364	364
q5	7458	1364	1142	1142
q6	188	182	144	144
q7	945	961	769	769
q8	9322	1443	1313	1313
q9	5582	5387	5369	5369
q10	6239	2110	1805	1805
q11	471	283	268	268
q12	635	439	304	304
q13	18058	3346	2794	2794
q14	306	290	265	265
q15	q16	867	881	803	803
q17	940	1165	683	683
q18	6679	5757	5613	5613
q19	1199	1330	1152	1152
q20	512	401	256	256
q21	4422	2307	1910	1910
q22	422	364	309	309
Total cold run time: 97265 ms
Total hot run time: 29856 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	4304	4205	4221	4205
q2	q3	4713	4836	4227	4227
q4	2330	2304	1569	1569
q5	5025	5009	5294	5009
q6	203	178	144	144
q7	2046	2221	1690	1690
q8	3556	3221	3277	3221
q9	8573	8642	8569	8569
q10	4600	4630	4346	4346
q11	644	459	443	443
q12	726	778	525	525
q13	3636	3722	3003	3003
q14	332	326	292	292
q15	q16	822	842	763	763
q17	1370	1385	1307	1307
q18	8308	7288	7261	7261
q19	1182	1166	1147	1147
q20	2305	2262	2011	2011
q21	6491	5819	5280	5280
q22	591	711	470	470
Total cold run time: 61757 ms
Total hot run time: 55482 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-DS: Total hot run time: 170885 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 92825abbf981e5c0b7b63eba8f526c082a9c1202, data reload: false

query5	4343	643	522	522
query6	330	215	208	208
query7	4242	567	295	295
query8	321	235	218	218
query9	8816	4019	4053	4019
query10	450	342	300	300
query11	5786	2390	2206	2206
query12	186	129	124	124
query13	1298	590	436	436
query14	5917	5355	5065	5065
query14_1	4374	4399	4343	4343
query15	210	206	182	182
query16	994	472	467	467
query17	945	766	654	654
query18	2445	490	342	342
query19	227	204	164	164
query20	136	130	131	130
query21	212	133	119	119
query22	13596	13923	14505	13923
query23	17319	16483	16175	16175
query23_1	16228	16192	16273	16192
query24	7477	1738	1345	1345
query24_1	1333	1337	1354	1337
query25	592	473	414	414
query26	1293	301	173	173
query27	2717	580	327	327
query28	4434	1937	1926	1926
query29	1009	638	513	513
query30	298	236	201	201
query31	1096	1070	925	925
query32	82	75	70	70
query33	520	346	288	288
query34	1187	1140	648	648
query35	748	774	664	664
query36	1308	1325	1187	1187
query37	151	102	93	93
query38	3207	3149	3068	3068
query39	929	948	911	911
query39_1	895	855	889	855
query40	229	163	139	139
query41	62	100	64	64
query42	107	107	110	107
query43	328	333	292	292
query44	
query45	207	201	193	193
query46	1056	1213	732	732
query47	2331	2249	2189	2189
query48	392	408	295	295
query49	629	528	437	437
query50	702	287	211	211
query51	4286	4262	4273	4262
query52	104	103	94	94
query53	246	282	211	211
query54	307	271	254	254
query55	101	89	83	83
query56	293	303	301	301
query57	1423	1387	1280	1280
query58	290	272	259	259
query59	1544	1608	1457	1457
query60	339	333	314	314
query61	155	156	157	156
query62	664	616	554	554
query63	241	198	215	198
query64	2442	818	666	666
query65	
query66	1743	507	386	386
query67	29397	30068	29190	29190
query68	
query69	470	344	302	302
query70	1056	1026	980	980
query71	315	277	270	270
query72	3071	2915	2659	2659
query73	854	774	424	424
query74	5089	4969	4773	4773
query75	2781	2687	2344	2344
query76	2321	1184	781	781
query77	438	445	356	356
query78	12859	13032	12260	12260
query79	1470	1020	748	748
query80	673	568	483	483
query81	461	280	244	244
query82	1309	157	122	122
query83	342	276	256	256
query84	311	140	111	111
query85	860	524	448	448
query86	403	322	321	321
query87	3406	3373	3238	3238
query88	3589	2669	2650	2650
query89	440	392	340	340
query90	1917	182	186	182
query91	172	172	142	142
query92	91	71	71	71
query93	951	959	548	548
query94	514	361	286	286
query95	685	498	354	354
query96	1046	775	318	318
query97	2698	2713	2565	2565
query98	238	231	224	224
query99	1119	1151	970	970
Total cold run time: 252142 ms
Total hot run time: 170885 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 69.14% (56/81) 🎉
Increment coverage report
Complete coverage report

@hello-stephen
Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 56.80% (71/125) 🎉
Increment coverage report
Complete coverage report

@seawinde seawinde force-pushed the fix-mv-null-reject-compensation branch from 92825ab to 3920f78 Compare May 15, 2026 03:49
@seawinde
Copy link
Copy Markdown
Member Author

run buildall

1 similar comment
@seawinde
Copy link
Copy Markdown
Member Author

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-H: Total hot run time: 29411 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 3920f7869e0e0ac4e71cb03795fa84500cff5907, 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	17685	3870	3858	3858
q2	q3	10705	878	603	603
q4	4662	465	342	342
q5	7462	1322	1134	1134
q6	186	169	134	134
q7	911	932	759	759
q8	9303	1406	1271	1271
q9	5612	5378	5303	5303
q10	6307	2083	1812	1812
q11	470	263	253	253
q12	671	421	301	301
q13	18132	3312	2686	2686
q14	302	288	262	262
q15	q16	914	882	787	787
q17	1005	1044	774	774
q18	6458	5756	5501	5501
q19	1220	1214	1068	1068
q20	512	388	264	264
q21	4559	2324	1972	1972
q22	471	386	327	327
Total cold run time: 97547 ms
Total hot run time: 29411 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	4835	4558	4709	4558
q2	q3	4628	4802	4200	4200
q4	2208	2169	1414	1414
q5	5041	5064	5278	5064
q6	204	169	137	137
q7	2039	1777	1599	1599
q8	3376	3078	3088	3078
q9	8492	8689	8456	8456
q10	4524	4501	4271	4271
q11	595	438	429	429
q12	682	750	520	520
q13	3304	3616	2955	2955
q14	317	305	277	277
q15	q16	761	804	686	686
q17	1358	1333	1262	1262
q18	7964	7200	7102	7102
q19	1152	1133	1192	1133
q20	2279	2247	1941	1941
q21	6113	5418	4866	4866
q22	517	493	402	402
Total cold run time: 60389 ms
Total hot run time: 54350 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-DS: Total hot run time: 170279 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 3920f7869e0e0ac4e71cb03795fa84500cff5907, data reload: false

query5	4346	659	508	508
query6	339	221	200	200
query7	4358	538	306	306
query8	325	228	218	218
query9	8835	4014	3981	3981
query10	463	339	293	293
query11	5819	2374	2244	2244
query12	189	128	134	128
query13	1329	575	456	456
query14	5947	5367	5069	5069
query14_1	4397	4376	4350	4350
query15	213	207	195	195
query16	1031	453	438	438
query17	1145	768	642	642
query18	2633	497	364	364
query19	220	210	171	171
query20	141	138	132	132
query21	218	145	123	123
query22	13622	13569	13408	13408
query23	17277	16350	16088	16088
query23_1	16094	16181	16240	16181
query24	7382	1759	1375	1375
query24_1	1358	1357	1358	1357
query25	597	515	456	456
query26	1351	313	184	184
query27	2660	608	349	349
query28	4418	1963	1989	1963
query29	1005	670	536	536
query30	319	241	201	201
query31	1119	1084	995	995
query32	86	81	73	73
query33	543	346	289	289
query34	1442	1115	650	650
query35	785	765	671	671
query36	1418	1378	1257	1257
query37	162	105	90	90
query38	3283	3216	3132	3132
query39	995	967	917	917
query39_1	942	914	915	914
query40	235	155	141	141
query41	68	63	65	63
query42	112	111	112	111
query43	322	334	300	300
query44	
query45	210	204	188	188
query46	1068	1200	691	691
query47	2332	2309	2185	2185
query48	402	429	285	285
query49	639	563	435	435
query50	723	293	228	228
query51	4295	4257	4211	4211
query52	105	104	93	93
query53	263	274	199	199
query54	307	270	274	270
query55	91	90	83	83
query56	298	306	309	306
query57	1440	1395	1319	1319
query58	302	270	276	270
query59	1560	1611	1440	1440
query60	346	318	313	313
query61	162	155	184	155
query62	662	616	543	543
query63	243	207	201	201
query64	2429	809	654	654
query65	
query66	1707	512	403	403
query67	30078	29918	29927	29918
query68	
query69	450	330	302	302
query70	995	1012	1034	1012
query71	302	268	257	257
query72	2924	2640	2421	2421
query73	833	741	396	396
query74	5126	4921	4694	4694
query75	2740	2671	2313	2313
query76	2293	1149	756	756
query77	422	420	349	349
query78	13006	12997	12345	12345
query79	1486	954	742	742
query80	1340	563	488	488
query81	515	277	236	236
query82	1173	167	125	125
query83	331	275	248	248
query84	263	136	109	109
query85	920	504	468	468
query86	448	359	364	359
query87	3443	3363	3233	3233
query88	3525	2655	2677	2655
query89	446	383	347	347
query90	1901	182	176	176
query91	180	171	139	139
query92	83	79	72	72
query93	1011	945	569	569
query94	740	340	294	294
query95	681	384	343	343
query96	1052	767	345	345
query97	2692	2702	2575	2575
query98	242	231	226	226
query99	1135	1145	983	983
Total cold run time: 254912 ms
Total hot run time: 170279 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 87.65% (71/81) 🎉
Increment coverage report
Complete coverage report

@hello-stephen
Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 73.20% (71/97) 🎉
Increment coverage report
Complete coverage report

@morrySnow
Copy link
Copy Markdown
Contributor

/review

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Reviewed the PR against the Doris code-review checklist. I found one blocking test-coverage issue: the new regression checks that the MV appears as a rewrite candidate, but the result comparison can still execute the original base-table plan, so the end-to-end null-reject compensation path is not actually verified.

Critical checkpoint conclusions:

  • Goal/test proof: the code targets OUTER JOIN MV rewrite for INNER JOIN queries needing null-reject compensation; unit tests cover predicate construction, but the regression does not prove runtime correctness of the chosen MV plan.
  • Scope/focus: the implementation is localized to MV predicate compensation and related tests.
  • Concurrency/lifecycle/config/compatibility: no new concurrency, lifecycle, config, persistence, or FE-BE protocol concerns found.
  • Parallel paths: normal INNER/LEFT/FULL join MV paths were considered; ASOF join behavior appears outside this PR scope.
  • Test coverage: needs strengthening as noted inline.
  • Observability/performance: no additional observability needed; no material hot-path performance issue found.

User focus: no additional user-provided focus points were present.

### What problem does this PR solve?

Issue Number: N/A

Related PR: apache#62492

Problem Summary:

INNER JoinEdge null-reject inference can validate rewriting an INNER JOIN query by an OUTER JOIN materialized view without adding the required non-null compensation predicate. The rewritten plan can keep null-padded rows from the MV side that should be rejected by the original query.

Root cause: In AbstractMaterializedViewRule.predicatesCompensate(), the previous check treated INNER JoinEdge null-reject inference as proof that an OUTER JOIN MV rewrite was valid, but the proof was not materialized as a real IS NOT NULL predicate in the rewritten query.

Change Summary:

| File | Change Description |

|------|--------------------|

| AbstractMaterializedViewRule.java | Split predicate-based null-reject proof from INNER JoinEdge proof and add query-based IS NOT NULL compensation when only JoinEdge proof covers required MV nullable sides. Fail rewrite if no safe MV output slot can carry the compensation predicate. |

| NullRejectInferenceTest.java | Add unit coverage for LEFT/FULL OUTER JOIN MV rewrites that require INNER JoinEdge null-reject compensation on both sides. |

| inner_join_null_reject_compensation.groovy | Add regression coverage with unmatched OUTER JOIN MV rows, including the LEFT JOIN MV to INNER JOIN query repro with nullable join keys. |

Design rationale: Existing query predicates already flow through normal predicate compensation, so they do not need extra filters. INNER JoinEdge proof is only logical evidence; when it is needed to reject null-generated MV rows, the rewrite must add a real IS NOT NULL predicate on an MV output slot. If no such slot is available, the rewrite is rejected conservatively.

### Release note

Fixed an issue where OUTER JOIN materialized view rewrite could return extra null-padded rows for INNER JOIN queries.

### Check List (For Author)

- Test

    - [x] Regression test

    - [x] 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

Unit tests / checks:

- Added NullRejectInferenceTest coverage for INNER/FULL join null-reject compensation on both sides.

- Ran git diff --check.

- Tried ./run-fe-ut.sh --run org.apache.doris.nereids.rules.exploration.mv.NullRejectInferenceTest, but FE core compilation failed before tests because generated cloud proto classes miss Cloud.CreateMetaSyncPointRequest/Response in MetaServiceClient and MetaServiceProxy.

Regression test:

- Added inner_join_null_reject_compensation.groovy for FULL/LEFT OUTER JOIN MV rewrites with unmatched null-padded rows.

- Not run locally; the local FE UT build is currently blocked by the cloud proto compilation issue above.

- Behavior changed:

    - [x] Yes. OUTER JOIN MV rewrite now adds real IS NOT NULL compensation when INNER JoinEdge null-reject inference is required, or rejects the rewrite if no safe MV output slot can carry that predicate.

    - [ ] No.

- Does this need documentation?

    - [x] No.

    - [ ] Yes.

### Check List (For Reviewer who merge this PR)

- [ ] Confirm the release note

- [ ] Confirm test cases

- [ ] Confirm document

- [ ] Add branch pick label

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@seawinde seawinde force-pushed the fix-mv-null-reject-compensation branch from 3920f78 to bb824f3 Compare May 15, 2026 10:25
@seawinde
Copy link
Copy Markdown
Member Author

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-H: Total hot run time: 31202 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit bb824f35fbe7439b5335db22576c399f1766c26b, 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	17652	3859	3849	3849
q2	q3	10784	1363	798	798
q4	4687	475	343	343
q5	7710	2308	2125	2125
q6	253	183	137	137
q7	945	778	627	627
q8	9437	1693	1509	1509
q9	5198	4948	4892	4892
q10	6398	2106	1813	1813
q11	433	284	243	243
q12	643	425	288	288
q13	18116	3414	2750	2750
q14	265	251	238	238
q15	q16	811	782	708	708
q17	979	889	974	889
q18	6915	5873	5649	5649
q19	1314	1271	1099	1099
q20	519	431	396	396
q21	6312	2882	2532	2532
q22	458	517	317	317
Total cold run time: 99829 ms
Total hot run time: 31202 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	4827	4854	4736	4736
q2	q3	4956	5257	4655	4655
q4	2135	2227	1392	1392
q5	5017	4807	4743	4743
q6	259	182	127	127
q7	1939	1726	1565	1565
q8	2380	2111	2069	2069
q9	7759	7352	7315	7315
q10	4476	4403	3984	3984
q11	554	374	353	353
q12	713	717	505	505
q13	3017	3404	2835	2835
q14	270	278	245	245
q15	q16	683	697	613	613
q17	1272	1257	1244	1244
q18	7445	6794	6777	6777
q19	1122	1117	1081	1081
q20	2224	2224	1927	1927
q21	5355	4624	4527	4527
q22	520	463	412	412
Total cold run time: 56923 ms
Total hot run time: 51105 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

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

query5	4325	653	516	516
query6	333	219	199	199
query7	4216	574	316	316
query8	345	230	213	213
query9	8813	3939	3965	3939
query10	441	328	297	297
query11	5786	2345	2237	2237
query12	186	129	124	124
query13	1263	616	427	427
query14	5893	5343	5065	5065
query14_1	4341	4363	4332	4332
query15	216	201	187	187
query16	985	447	451	447
query17	1136	737	617	617
query18	2524	501	364	364
query19	219	215	169	169
query20	135	130	128	128
query21	215	138	119	119
query22	13625	13526	13320	13320
query23	17098	16360	15977	15977
query23_1	16132	16161	16123	16123
query24	7405	1747	1275	1275
query24_1	1308	1279	1271	1271
query25	574	500	435	435
query26	1320	321	173	173
query27	2693	569	343	343
query28	4409	1934	1941	1934
query29	1021	630	504	504
query30	305	236	197	197
query31	1112	1066	949	949
query32	91	77	74	74
query33	555	362	295	295
query34	1184	1103	636	636
query35	754	775	664	664
query36	1352	1365	1188	1188
query37	152	101	84	84
query38	3223	3159	3089	3089
query39	927	945	904	904
query39_1	875	864	880	864
query40	225	144	124	124
query41	67	62	62	62
query42	108	110	105	105
query43	315	329	283	283
query44	
query45	207	199	192	192
query46	1083	1152	734	734
query47	2361	2337	2199	2199
query48	391	403	287	287
query49	648	492	383	383
query50	974	348	245	245
query51	4288	4274	4186	4186
query52	104	104	97	97
query53	260	279	210	210
query54	305	270	249	249
query55	92	89	82	82
query56	295	308	294	294
query57	1416	1432	1341	1341
query58	293	268	276	268
query59	1565	1632	1378	1378
query60	316	329	313	313
query61	160	157	162	157
query62	675	621	563	563
query63	240	201	201	201
query64	2384	830	647	647
query65	
query66	1708	485	354	354
query67	29996	29916	29891	29891
query68	
query69	454	348	303	303
query70	991	981	1028	981
query71	302	269	270	269
query72	2960	2835	2407	2407
query73	845	767	447	447
query74	5040	4910	4701	4701
query75	2680	2596	2247	2247
query76	2309	1135	756	756
query77	391	404	335	335
query78	12156	12079	11564	11564
query79	1404	1042	754	754
query80	661	539	442	442
query81	454	274	240	240
query82	1389	155	123	123
query83	337	277	248	248
query84	257	135	110	110
query85	889	531	448	448
query86	387	328	299	299
query87	3400	3388	3213	3213
query88	3499	2657	2634	2634
query89	451	378	338	338
query90	1898	171	175	171
query91	179	167	141	141
query92	77	78	73	73
query93	1447	1550	863	863
query94	547	349	298	298
query95	668	488	352	352
query96	1018	751	322	322
query97	2726	2709	2576	2576
query98	243	237	239	237
query99	1120	1094	998	998
Total cold run time: 252110 ms
Total hot run time: 168753 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 69.14% (56/81) 🎉
Increment coverage report
Complete coverage report

@hello-stephen
Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 87.65% (71/81) 🎉
Increment coverage report
Complete coverage report

@morrySnow
Copy link
Copy Markdown
Contributor

/review

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Review result: no additional blocking issues found beyond the existing thread, which appears addressed in the current diff by forcing MV usage in the new correctness helper.

Critical checkpoint conclusions:

  • Goal/test: The PR targets null-reject compensation when rewriting INNER JOIN queries using OUTER JOIN MVs. The implementation adds real IS NOT NULL compensation or rejects unsafe rewrites, with FE unit coverage and regression coverage for full/left outer MV cases.
  • Scope: The change is focused in MV predicate compensation plus targeted tests.
  • Concurrency/lifecycle/config/compatibility: No new concurrency, lifecycle, configuration, persistence, or wire/storage compatibility concerns found.
  • Parallel paths: The changed path is the common MV predicate compensation path; related regression expectations were updated for affected join rewrite behavior.
  • Predicate correctness: Existing query-predicate proof and INNER JoinEdge proof are separated, and INNER JoinEdge-only proof is materialized as post-MV compensation where a safe output slot exists.
  • Testing: Unit and regression coverage were added; existing review feedback about forcing MV execution is not re-raised because the current helper now uses use_mv and mv_rewrite_success before comparing results.
  • Observability/performance: No new logging/metrics need found; added work is bounded to rewrite-time slot/predicate set checks.

User focus: No additional user-provided review focus was supplied.

@morrySnow morrySnow merged commit 76bbe58 into apache:master May 18, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants