Skip to content

[fix](expr) Enforce nullable column output matching - #68388

Draft
Mryange wants to merge 1 commit into
apache:masterfrom
Mryange:fix-expr-nullable-column-check
Draft

Mryange wants to merge 1 commit into
apache:masterfrom
Mryange:fix-expr-nullable-column-check

Conversation

@Mryange

@Mryange Mryange commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary: VExpr::execute_column accepted a non-nullable column when the expression declared Nullable(T), even though DataTypeNullable requires a ColumnNullable representation. Remove this expression-only fallback so data type nullability and column nullability remain aligned.

Release note

None

Check List (For Author)

  • Test: No need to test (pipeline validation requested)
  • Behavior changed: Yes (strictly enforce nullable column output matching)
  • Does this need documentation: No

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

@Mryange
Mryange marked this pull request as draft September 22, 2026 09:41
@Mryange

Mryange commented Sep 22, 2026

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17992	3954	3886	3886
q2	2147	358	309	309
q3	10098	1434	787	787
q4	4679	478	366	366
q5	7473	823	547	547
q6	185	177	139	139
q7	750	785	585	585
q8	9294	1547	1491	1491
q9	5418	4187	4172	4172
q10	6818	1329	1007	1007
q11	428	270	250	250
q12	633	420	290	290
q13	18032	2656	2005	2005
q14	270	257	238	238
q15	q16	727	721	660	660
q17	1749	1124	1051	1051
q18	6516	5611	5537	5537
q19	1299	1215	1062	1062
q20	476	386	264	264
q21	5851	3400	3038	3038
q22	450	382	326	326
Total cold run time: 101285 ms
Total hot run time: 28010 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4661	4749	4445	4445
q2	723	560	536	536
q3	5292	5235	4549	4549
q4	2267	2385	1436	1436
q5	4610	4438	4646	4438
q6	226	177	126	126
q7	1771	1737	1502	1502
q8	2348	2105	2075	2075
q9	7370	7313	7207	7207
q10	3689	3627	3147	3147
q11	512	374	365	365
q12	715	709	508	508
q13	2289	2593	2011	2011
q14	277	285	294	285
q15	q16	659	683	596	596
q17	7307	6804	6633	6633
q18	11839	11042	11804	11042
q19	1084	1016	1043	1016
q20	2215	2173	1915	1915
q21	5123	4286	4369	4286
q22	505	442	387	387
Total cold run time: 65482 ms
Total hot run time: 58505 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 152380 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 5e9654aba7a366422c9a8c56e0ac5d461b7033e9, data reload: false

query5	4296	601	448	448
query6	423	204	188	188
query7	4849	569	306	306
query8	331	182	158	158
query9	8794	3967	3976	3967
query10	449	311	269	269
query11	5880	3550	3231	3231
query12	150	93	87	87
query13	1268	587	420	420
query14	6527	4551	4225	4225
query14_1	3952	3963	3938	3938
query15	201	199	179	179
query16	992	450	414	414
query17	913	683	503	503
query18	2406	438	324	324
query19	189	172	138	138
query20	78	80	76	76
query21	212	134	115	115
query22	12986	12929	12813	12813
query23	13961	12875	12304	12304
query23_1	12585	12451	12526	12451
query24	7215	1120	641	641
query24_1	653	680	725	680
query25	532	401	344	344
query26	1263	293	169	169
query27	2683	537	340	340
query28	4522	1963	1974	1963
query29	1560	732	507	507
query30	297	219	181	181
query31	860	748	628	628
query32	151	90	88	88
query33	511	297	240	240
query34	1172	1111	624	624
query35	719	742	653	653
query36	829	800	723	723
query37	139	104	88	88
query38	1824	1746	1680	1680
query39	696	671	663	663
query39_1	668	667	650	650
query40	222	120	114	114
query41	74	72	73	72
query42	95	93	95	93
query43	339	359	299	299
query44	1375	727	712	712
query45	182	188	165	165
query46	1109	1195	737	737
query47	1505	1531	1384	1384
query48	400	407	302	302
query49	613	416	306	306
query50	986	348	263	263
query51	10853	10769	10578	10578
query52	89	90	76	76
query53	246	274	185	185
query54	270	231	194	194
query55	77	75	74	74
query56	243	228	233	228
query57	1446	1394	1384	1384
query58	297	278	263	263
query59	2007	2055	1926	1926
query60	265	236	222	222
query61	134	147	143	143
query62	398	320	266	266
query63	215	170	181	170
query64	2779	1001	798	798
query65	3473	3393	3419	3393
query66	1782	419	316	316
query67	20208	20023	19772	19772
query68	3350	1537	948	948
query69	413	296	257	257
query70	890	838	817	817
query71	293	237	215	215
query72	2731	2477	2272	2272
query73	842	778	419	419
query74	4604	4503	4266	4266
query75	2303	2282	1922	1922
query76	2403	1150	745	745
query77	366	389	294	294
query78	8915	8957	8396	8396
query79	1170	1114	768	768
query80	549	459	366	366
query81	519	326	285	285
query82	262	158	129	129
query83	212	221	195	195
query84	292	146	111	111
query85	781	444	375	375
query86	276	236	229	229
query87	1982	1971	1827	1827
query88	3602	2707	2671	2671
query89	315	285	242	242
query90	2130	182	182	182
query91	168	153	128	128
query92	104	89	88	88
query93	1433	1397	939	939
query94	501	342	299	299
query95	656	373	412	373
query96	1055	820	351	351
query97	2404	2430	2321	2321
query98	164	170	145	145
query99	713	731	612	612
Total cold run time: 235341 ms
Total hot run time: 152380 ms

@hello-stephen

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

query1	0.01	0.01	0.00
query2	0.09	0.05	0.05
query3	0.26	0.14	0.14
query4	1.61	0.15	0.14
query5	0.24	0.22	0.22
query6	1.15	0.94	0.91
query7	0.05	0.01	0.01
query8	0.06	0.04	0.04
query9	0.39	0.33	0.32
query10	0.55	0.57	0.56
query11	0.21	0.14	0.14
query12	0.18	0.14	0.16
query13	0.46	0.46	0.47
query14	0.96	0.94	0.94
query15	0.61	0.59	0.58
query16	0.31	0.34	0.31
query17	1.08	1.06	1.05
query18	0.22	0.20	0.21
query19	2.02	1.99	1.97
query20	0.02	0.01	0.01
query21	15.48	0.19	0.13
query22	4.96	0.05	0.05
query23	16.10	0.31	0.12
query24	2.95	0.40	0.26
query25	0.11	0.05	0.04
query26	0.72	0.21	0.16
query27	0.05	0.04	0.03
query28	3.41	0.81	0.37
query29	12.48	4.09	3.20
query30	0.27	0.15	0.15
query31	2.77	0.57	0.31
query32	3.22	0.60	0.48
query33	3.15	3.21	3.12
query34	15.54	3.95	3.30
query35	3.20	3.23	3.23
query36	0.56	0.45	0.40
query37	0.09	0.07	0.06
query38	0.05	0.04	0.04
query39	0.04	0.04	0.03
query40	0.17	0.15	0.15
query41	0.09	0.04	0.04
query42	0.05	0.03	0.03
query43	0.04	0.04	0.03
Total cold run time: 95.98 s
Total hot run time: 23.92 s

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