Skip to content

[Feature](lambda) Support some map lambda functions - #66968

Open
linrrzqqq wants to merge 4 commits into
apache:masterfrom
linrrzqqq:map-lambda
Open

[Feature](lambda) Support some map lambda functions#66968
linrrzqqq wants to merge 4 commits into
apache:masterfrom
linrrzqqq:map-lambda

Conversation

@linrrzqqq

@linrrzqqq linrrzqqq commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

What problem does this PR solve?

Related PR: #67045, #67047

Doc: apache/doris-website#4085

Problem Summary:

This PR adds MAP lambda support under the Nereids planner.

Supported higher-order functions:

  • map_filter((k, v) -> predicate, map)
  • map_exists((k, v) -> predicate, map)
  • map_all((k, v) -> predicate, map)
  • map_apply((k, v) -> struct(new_key, new_value), map)
  • transform_keys((k, v) -> new_key, map)
  • transform_values((k, v) -> new_value, map)

Example:

SELECT map_filter(
    (k, v) -> v > 10,
    map(1, 10, 2, 20)
);

SELECT transform_values(
    (k, v) -> v + 1,
    map(1, 10, 2, 20)
);

SELECT map_apply(
    (k, v) -> (k + 1, v * 2),
    map(1, 10, 2, 20)
);

Implementation

Use map_entries(m) to expand the map parameter and reuse the original array lambda for execution.

map_apply((k, v) -> (k2, v2), m)
    ↓
map_from_entries(
    array_apply(entry: struct{k, v} -> (k2, v2), map_entries(m)
);

map_filter((k, v) -> k + v > 0, m)
    ↓
%map_from_filtered_entries_unique%(
    array_map(
        entry: strct{k, v} -> if(
            e.k + e.v > 0, entry, null
        ),
    map_entries(m)
)


transform_values((k, v) -> k + v + col, m)
    ↓
%map_from_entries_unique%(
    array_map(
        entry -> (e.k, e.k + e.v + col),
        map_entries(m)
    )
)


map_exists((k, v) -> k + v = 1, m)
    ↓
array_match_any(
    array_map(
        entry -> e.k + e.v = 1,
        map_entries(m)
    )
)


map_all((k, v) -> k + v = 1, m)
    ↓
array_match_all(
    array_map(
        entry -> e.k + e.v = 1,
        map_entries(m)
    )
)

Internal helper function

This PR adds two internal Map construction functions used by the rewritten expressions:

  • %map_from_entries_unique%: rebuilds a Map from an entry array without running key deduplication. Used by transform_value
  • %map_from_filtered_entries_unique%: removes null entries input instead of throw error like map_from_entries. Used by map_filter

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

@linrrzqqq linrrzqqq changed the title [tmp] [Feature](lambda) Support some map lambda functions Aug 21, 2026
@linrrzqqq
linrrzqqq force-pushed the map-lambda branch 2 times, most recently from 5c42734 to 2130e12 Compare August 21, 2026 07:14
@linrrzqqq

Copy link
Copy Markdown
Collaborator Author

/review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated review status: complete and converged after three rounds. Requesting changes for three P1 correctness issues.

Findings

  1. The FE materialization rule moves sensitive Map inputs from Join candidate-pair scope into a child-row Project, changing outer-join error behavior and volatile evaluation frequency.
  2. The same rule moves computed Maps out of selector-controlled IF/CASE branches, defeating supported short-circuit execution.
  3. The BE eight-batch direct path bypasses the variable-width lambda safety ceiling and can turn a bounded query into a multi-gigabyte ColumnString overflow.

Checkpoint conclusions

  • Goal and scope: the advertised Map lambda wrappers, constructors, tuple syntax, recursive NULL-type handling, and FE-to-BE lowerings are present. The scalar wrappers and registrations are localized; the 786-line late materialization rule and the unrelated ArrayMap batching expansion are the principal risk surfaces.
  • Planner semantics and parallel paths: Project, OneRowRelation, Filter, Having, normalized Aggregate, Generate, Join metadata, nested lambda ExprIds, marker translation, and second-pass stability were reviewed. Outside the two inline evaluation-domain failures, no additional owner or parallel path defect survived.
  • Types, nullability, compatibility, and physical symbols: lambda arity, Map-key legality, nullable Maps/predicates, nested NULL_TYPE merging, last-win semantics, and the names map_from_arrays, %map_from_arrays_unique%, map_filter, and map_from_entries align across FE and BE. No serialized format or existing function signature changes.
  • Runtime correctness and ownership: constant/nullable wrappers, offsets, selected rows, invalid entries, duplicate keys, COW detachment, and Status propagation were checked. Those paths remain sound outside the accepted lambda budget issue.
  • Performance and memory: the direct-path multiplier is a correctness failure as well as an allocation regression; no other distinct performance defect survived review.
  • Concurrency, lifecycle, configuration, persistence, transactions, writes, and observability: no new applicable mechanism is introduced.
  • Tests: the changed unit and regression sources broadly cover ordinary, null, constant, duplicate, empty, nested, aggregate, Join, Generate, and selected-row behavior, but omit the three accepted boundaries. Per the automated-review contract, I did not run builds or tests; current style, license, formatting, and secret checks pass, while build/test jobs are skipped.
  • User focus: no additional focus was supplied.

No pre-existing live review thread or comment duplicated these findings.

Comment thread be/src/exprs/lambda_function/varray_map_function.cpp
@linrrzqqq

Copy link
Copy Markdown
Collaborator Author

run buildall

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17629	3094	3081	3081
q2	1928	255	154	154
q3	10410	954	562	562
q4	4678	264	218	218
q5	7642	580	410	410
q6	139	116	97	97
q7	510	513	399	399
q8	9242	894	1022	894
q9	3539	2462	2432	2432
q10	6528	861	720	720
q11	463	258	234	234
q12	696	388	330	330
q13	17883	1539	1200	1200
q14	155	149	144	144
q15	q16	445	402	363	363
q17	842	733	838	733
q18	3337	2268	2289	2268
q19	1104	941	838	838
q20	662	503	478	478
q21	5301	1765	1935	1765
q22	330	275	234	234
Total cold run time: 93463 ms
Total hot run time: 17554 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	3444	3346	3363	3346
q2	205	223	153	153
q3	2363	2475	2245	2245
q4	1224	1203	921	921
q5	2287	2141	2145	2141
q6	184	131	89	89
q7	1073	977	892	892
q8	1659	1461	1461	1461
q9	3223	3222	3242	3222
q10	1908	1883	1669	1669
q11	363	276	262	262
q12	463	434	340	340
q13	1515	1571	1225	1225
q14	195	187	165	165
q15	q16	397	405	374	374
q17	1075	1032	1037	1032
q18	5215	4590	5136	4590
q19	898	895	887	887
q20	1106	1039	1105	1039
q21	3912	3195	3252	3195
q22	413	361	317	317
Total cold run time: 33122 ms
Total hot run time: 29565 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 84739 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 2130e12f16144fc369125d34a5dda5309b3e7184, data reload: false

query5	4265	425	333	333
query6	430	162	148	148
query7	4856	460	272	272
query8	317	122	116	116
query9	8693	2890	2918	2890
query10	451	260	228	228
query11	5386	1066	924	924
query12	119	69	70	69
query13	1198	461	310	310
query14	6020	2253	2139	2139
query14_1	2009	1974	2016	1974
query15	172	122	112	112
query16	919	397	375	375
query17	795	459	370	370
query18	2338	329	239	239
query19	171	140	124	124
query20	73	75	69	69
query21	211	119	103	103
query22	5855	5395	5650	5395
query23	6869	6376	6083	6083
query23_1	6075	6220	6269	6220
query24	7296	1111	810	810
query24_1	807	790	820	790
query25	447	323	274	274
query26	1256	274	181	181
query27	2712	458	295	295
query28	4592	1498	1496	1496
query29	921	435	350	350
query30	272	182	177	177
query31	871	461	392	392
query32	101	50	51	50
query33	459	218	181	181
query34	1016	836	496	496
query35	399	398	352	352
query36	574	542	536	536
query37	116	82	69	69
query38	1016	848	835	835
query39	529	482	476	476
query39_1	501	473	450	450
query40	220	127	110	110
query41	54	52	50	50
query42	82	79	83	79
query43	243	240	214	214
query44	1012	548	573	548
query45	118	104	106	104
query46	787	839	525	525
query47	777	769	777	769
query48	327	322	239	239
query49	560	243	192	192
query50	834	329	251	251
query51	8211	8296	8337	8296
query52	73	78	65	65
query53	199	207	157	157
query54	223	172	171	171
query55	79	60	57	57
query56	231	228	204	204
query57	663	687	653	653
query58	233	192	190	190
query59	1216	1219	1095	1095
query60	258	219	188	188
query61	131	125	120	120
query62	345	201	179	179
query63	184	157	169	157
query64	2878	820	683	683
query65	1644	1619	1740	1619
query66	1917	349	262	262
query67	10387	9959	9862	9862
query68	2875	1159	794	794
query69	356	236	211	211
query70	682	622	649	622
query71	292	286	244	244
query72	2524	1761	1570	1570
query73	644	588	360	360
query74	1848	1255	1169	1169
query75	1245	1170	1017	1017
query76	2287	757	542	542
query77	263	257	214	214
query78	4011	3743	3255	3255
query79	2770	818	623	623
query80	1636	402	340	340
query81	536	203	180	180
query82	681	121	104	104
query83	319	251	234	234
query84	325	123	102	102
query85	885	444	370	370
query86	489	183	174	174
query87	1028	986	901	901
query88	2937	2126	2141	2126
query89	315	223	205	205
query90	2016	146	139	139
query91	158	141	124	124
query92	57	48	47	47
query93	1723	1163	818	818
query94	628	235	196	196
query95	641	345	361	345
query96	802	583	270	270
query97	1041	1062	1040	1040
query98	176	137	130	130
query99	416	352	309	309
Total cold run time: 181011 ms
Total hot run time: 84739 ms

@hello-stephen

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

query1	0.01	0.00	0.01
query2	0.08	0.04	0.04
query3	0.24	0.10	0.10
query4	1.61	0.10	0.10
query5	0.17	0.16	0.16
query6	1.25	0.67	0.72
query7	0.03	0.01	0.00
query8	0.04	0.03	0.03
query9	0.29	0.21	0.21
query10	0.36	0.35	0.36
query11	0.16	0.11	0.12
query12	0.15	0.12	0.12
query13	0.31	0.30	0.30
query14	0.46	0.44	0.45
query15	0.36	0.36	0.37
query16	0.23	0.22	0.21
query17	0.71	0.70	0.69
query18	0.18	0.17	0.17
query19	1.24	1.23	1.13
query20	0.02	0.01	0.01
query21	15.45	0.17	0.11
query22	5.06	0.05	0.04
query23	16.16	0.25	0.10
query24	2.99	0.32	0.25
query25	0.10	0.04	0.03
query26	0.74	0.17	0.12
query27	0.03	0.04	0.03
query28	3.61	0.56	0.27
query29	12.43	3.14	2.57
query30	0.26	0.12	0.12
query31	2.76	0.38	0.16
query32	3.50	0.30	0.23
query33	1.36	1.46	1.42
query34	15.41	2.19	1.79
query35	1.75	1.73	1.71
query36	0.46	0.29	0.30
query37	0.06	0.04	0.04
query38	0.04	0.02	0.02
query39	0.02	0.02	0.02
query40	0.11	0.08	0.07
query41	0.08	0.03	0.03
query42	0.03	0.02	0.03
query43	0.04	0.03	0.03
Total cold run time: 90.35 s
Total hot run time: 14.67 s

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 77.36% (540/698) 🎉
Increment coverage report
Complete coverage report

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 62.45% (29116/46620)
Line Coverage 47.48% (304812/641967)
Region Coverage 43.15% (246043/570241)
Branch Coverage 44.68% (114474/256188)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100% (0/0) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 75.95% (34292/45153)
Line Coverage 60.89% (386426/634622)
Region Coverage 56.97% (323618/568077)
Branch Coverage 57.81% (147689/255463)

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 68.43% (479/700) 🎉
Increment coverage report
Complete coverage report

@linrrzqqq
linrrzqqq force-pushed the map-lambda branch 2 times, most recently from 1872ace to 9651dc4 Compare August 23, 2026 18:00
@linrrzqqq

Copy link
Copy Markdown
Collaborator Author

/review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated review status: complete and converged after three rounds. Requesting changes for one new P1 correctness issue.

Finding

  • Native-table access-path pruning can lose Map values used only inside a nested Lambda and substitute default/null values; one inline comment is attached.
  • The existing P1 variable-width Lambda budget thread remains applicable and was not duplicated.

Critical checkpoint conclusions

  • Goal and proof: the PR adds Map Lambda functions, Map constructors/filtering, tuple Lambda syntax, and FE-to-BE lowering. Registrations and ordinary semantics align, and unit/regression sources cover null, empty, duplicate, constant, computed, nondeterministic, nested, aggregate, Join, and Generate cases; the accepted native stored-column boundary is not covered.
  • Scope and focus: the implementation is cohesive for the advertised feature and reuses ArrayMap/MapEntries/Map primitives. No additional user focus was supplied.
  • Concurrency: execution uses query-local expression/column state; no new shared mutable state, locks, lock ordering, or thread-safety mechanism is introduced.
  • Lifecycle/static initialization: Lambda frames use scoped guards and ColumnMap sharing uses COW; no non-intuitive release path, circular ownership, or cross-TU static initialization dependency was found.
  • Configuration: no configuration item or dynamic-update path is added.
  • Compatibility: FE wrapper names, arities, return/nullability types, and internal physical symbols match BE registration. No storage format, persisted metadata, or protocol variable changes are introduced; the new function symbols are additive.
  • Parallel paths: public Map functions, internal unique/filtered constructors, legacy two-argument map_filter, constant folding, computed inputs, nested Lambdas, and native/external scan paths were checked. The native scan divergence is the attached finding.
  • Conditional checks: const broadcasting, top-level null Maps/arrays, hidden null-row payloads, mismatched offsets, nullable predicates, and last-win deduplication checks have explicit failure/skip behavior and targeted tests. No separate conditional-check defect survived.
  • Test coverage: BE unit tests and FE/regression tests are broad, including negative cases, but need a stored native-table test where the outer Map Lambda retains the key and reads the value only inside an inner Lambda.
  • Test results: the committed .out results match the asserted ordinary semantics. Per the review-run contract, I did not run builds or tests.
  • Observability: these are scalar analysis/execution paths; existing AnalysisException/Status failures are sufficient, and no new log or metric is required.
  • Transactions/persistence: no transaction, EditLog, master-failover, or persistent-state path is changed.
  • Data writes/crashes: the feature is query-time only and does not modify stored data. COW detachment and Status propagation are sound outside the accepted read-pruning correctness issue.
  • FE-BE variables: no new session/protocol variable is transmitted. FE and BE independently computed types/names were checked and agree.
  • Performance: zero-copy/COW paths are reasonable, but the existing live byte-budget P1 remains unresolved; no distinct additional CPU/memory issue survived duplicate fencing.
  • Other issues: the scalar-subquery tuple-parser candidate was rejected because the semantic predicate only gates, rather than forces, its alternative. No other unresolved candidate remains.

@linrrzqqq

Copy link
Copy Markdown
Collaborator Author

run buildall

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17560	3053	3010	3010
q2	1874	225	151	151
q3	10485	849	511	511
q4	4671	252	196	196
q5	7679	593	383	383
q6	137	110	99	99
q7	536	516	389	389
q8	9240	922	933	922
q9	3525	2437	2344	2344
q10	6517	898	710	710
q11	434	257	242	242
q12	684	396	328	328
q13	17855	1513	1165	1165
q14	162	148	139	139
q15	q16	431	398	364	364
q17	808	852	797	797
q18	3146	2229	2231	2229
q19	1104	855	783	783
q20	597	501	438	438
q21	5200	1685	1736	1685
q22	323	260	227	227
Total cold run time: 92968 ms
Total hot run time: 17112 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	3373	3322	3286	3286
q2	206	208	154	154
q3	2211	2340	2177	2177
q4	1180	1161	887	887
q5	2182	2109	2127	2109
q6	171	122	86	86
q7	1010	905	867	867
q8	1603	1400	1385	1385
q9	3135	3058	3062	3058
q10	1874	1807	1621	1621
q11	350	268	246	246
q12	458	431	332	332
q13	1488	1522	1179	1179
q14	170	164	168	164
q15	q16	391	390	345	345
q17	1040	1032	1022	1022
q18	4887	4343	4860	4343
q19	877	855	842	842
q20	983	929	778	778
q21	3472	3301	3281	3281
q22	410	341	336	336
Total cold run time: 31471 ms
Total hot run time: 28498 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 82668 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 9651dc40a821a64e8eee1bc21d5fe3ab472bc746, data reload: false

query5	4259	397	344	344
query6	398	162	194	162
query7	4840	446	258	258
query8	286	119	115	115
query9	8698	2814	2849	2814
query10	399	244	240	240
query11	5377	1025	908	908
query12	119	76	71	71
query13	1201	449	333	333
query14	6174	2174	2065	2065
query14_1	1971	1945	1913	1913
query15	172	122	110	110
query16	907	376	401	376
query17	808	467	385	385
query18	2330	337	240	240
query19	167	142	113	113
query20	71	68	78	68
query21	215	117	103	103
query22	5277	5320	5170	5170
query23	6752	6310	6119	6119
query23_1	5929	6109	6006	6006
query24	7269	1112	771	771
query24_1	764	773	773	773
query25	407	288	245	245
query26	1255	264	156	156
query27	2725	443	285	285
query28	4637	1482	1486	1482
query29	915	432	344	344
query30	265	179	154	154
query31	834	418	351	351
query32	96	48	48	48
query33	451	213	162	162
query34	1010	854	484	484
query35	404	400	331	331
query36	553	536	540	536
query37	117	78	67	67
query38	993	836	825	825
query39	543	468	471	468
query39_1	477	481	510	481
query40	216	121	113	113
query41	52	50	50	50
query42	78	75	81	75
query43	235	235	208	208
query44	1008	541	565	541
query45	116	105	100	100
query46	739	851	507	507
query47	765	733	696	696
query48	318	294	228	228
query49	539	231	180	180
query50	807	324	264	264
query51	7902	7870	7931	7870
query52	78	85	71	71
query53	199	198	163	163
query54	265	175	171	171
query55	73	62	57	57
query56	273	219	222	219
query57	673	651	646	646
query58	228	209	192	192
query59	1196	1200	1111	1111
query60	254	206	216	206
query61	136	138	131	131
query62	340	212	174	174
query63	185	153	161	153
query64	2936	785	657	657
query65	1629	1572	1558	1558
query66	1979	314	248	248
query67	10288	9971	9563	9563
query68	3033	1202	718	718
query69	332	210	191	191
query70	670	583	607	583
query71	314	249	231	231
query72	2345	1750	1554	1554
query73	642	641	350	350
query74	2006	1208	1135	1135
query75	1243	1142	1013	1013
query76	2388	733	544	544
query77	262	265	208	208
query78	3844	3608	3188	3188
query79	2114	909	615	615
query80	1597	388	343	343
query81	487	195	182	182
query82	624	128	99	99
query83	322	248	231	231
query84	307	121	105	105
query85	844	438	396	396
query86	391	177	168	168
query87	991	966	898	898
query88	2778	2129	2118	2118
query89	302	221	204	204
query90	2024	146	149	146
query91	157	151	119	119
query92	52	48	44	44
query93	1503	1160	762	762
query94	634	246	224	224
query95	637	360	396	360
query96	776	561	253	253
query97	1075	1034	1011	1011
query98	145	133	132	132
query99	411	353	310	310
Total cold run time: 178242 ms
Total hot run time: 82668 ms

@hello-stephen

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

query1	0.01	0.00	0.00
query2	0.07	0.03	0.03
query3	0.24	0.11	0.09
query4	1.61	0.11	0.10
query5	0.18	0.16	0.15
query6	1.26	0.67	0.67
query7	0.03	0.01	0.00
query8	0.05	0.03	0.04
query9	0.29	0.21	0.21
query10	0.35	0.34	0.36
query11	0.17	0.11	0.12
query12	0.15	0.12	0.11
query13	0.30	0.31	0.31
query14	0.44	0.45	0.46
query15	0.36	0.36	0.33
query16	0.21	0.20	0.22
query17	0.69	0.72	0.74
query18	0.17	0.16	0.17
query19	1.19	1.19	1.22
query20	0.02	0.01	0.01
query21	15.45	0.16	0.12
query22	5.10	0.04	0.05
query23	16.18	0.26	0.10
query24	2.97	0.32	0.26
query25	0.12	0.03	0.03
query26	0.79	0.16	0.13
query27	0.04	0.03	0.03
query28	3.63	0.55	0.28
query29	12.44	3.21	2.54
query30	0.27	0.11	0.12
query31	2.76	0.38	0.17
query32	3.54	0.33	0.23
query33	1.49	1.44	1.38
query34	15.40	2.19	1.75
query35	1.74	1.76	1.71
query36	0.45	0.30	0.27
query37	0.06	0.04	0.04
query38	0.05	0.04	0.04
query39	0.03	0.02	0.03
query40	0.10	0.08	0.07
query41	0.08	0.03	0.02
query42	0.03	0.03	0.03
query43	0.04	0.03	0.03
Total cold run time: 90.55 s
Total hot run time: 14.61 s

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 82.27% (283/344) 🎉
Increment coverage report
Complete coverage report

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 62.47% (29128/46629)
Line Coverage 47.49% (304953/642120)
Region Coverage 43.12% (245929/570358)
Branch Coverage 44.69% (114516/256256)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100% (0/0) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 75.93% (34292/45162)
Line Coverage 60.91% (386640/634775)
Region Coverage 57.05% (324146/568194)
Branch Coverage 57.85% (147817/255531)

@linrrzqqq
linrrzqqq marked this pull request as ready for review August 24, 2026 01:56
@linrrzqqq
linrrzqqq requested a review from englefly as a code owner August 24, 2026 01:56
@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100% (0/0) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 75.92% (34288/45162)
Line Coverage 60.89% (386492/634775)
Region Coverage 57.01% (323918/568194)
Branch Coverage 57.83% (147767/255531)

Comment thread be/src/exprs/function/function_map.cpp Outdated
@linrrzqqq
linrrzqqq force-pushed the map-lambda branch 2 times, most recently from 7b2a020 to 4a6f18e Compare August 24, 2026 12:17
@HappenLee

Copy link
Copy Markdown
Contributor

/review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated review status: complete and converged after two rounds. Requesting changes for two new P1 issues.

Findings

  1. The new key-preserving/removing Map paths assume a carrier-wide unique-key invariant that external and serialized Map readers do not enforce, so duplicate-key Maps can bypass Doris's last-win normalization.
  2. The regression expects map_from_arrays([1], [[]]) to fail even though this PR's signature normalization and FE unit test explicitly accept it as MAP<TINYINT,ARRAY<TINYINT>>.

The existing variable-width Lambda batching and nested-Lambda Map access-path P1 threads remain applicable and were not duplicated.

Critical checkpoint conclusions

  • Goal and proof: the PR adds the advertised Map Lambda functions, constructors/filtering, tuple Lambda syntax, and FE-to-BE lowering. Ordinary semantics are broadly tested, but the two attached boundaries keep the implementation from meeting the goal end to end.
  • Scope and focus: the implementation is generally cohesive and reuses ArrayMap, MapEntries, and existing Map constructors; the unrelated ArrayMap fast-path expansion remains the principal out-of-scope risk already covered by a live thread.
  • Concurrency: execution and analysis use query-local expression/column state; no new shared mutable state, locks, lock ordering, atomics, or thread entry is introduced.
  • Lifecycle/static initialization: scoped Lambda frames and COW columns were traced; no non-intuitive release path, circular ownership, or cross-TU static initialization dependency was found.
  • Configuration: no configuration item or dynamic-update path is added.
  • Compatibility: public/internal function names, arities, return types, nullable shapes, and FE/BE registrations agree. The symbols are additive and no storage format or persisted protocol changes; cross-carrier Map semantics fail only at the first attached finding.
  • Parallel paths: direct and Lambda map_filter, map_apply, transform_keys, transform_values, public/internal constructors, native/external readers, constant folding, nested Lambdas, and access-path pruning were compared. M1 is the surviving divergence.
  • Conditional checks, errors, nullability, and memory: const/nullable materialization, empty/null Maps, null predicates, offset checks, selector ordering, COW ownership, and Status propagation are sound outside M1. The existing 8x variable-width budget thread remains the memory blocker.
  • Tests: BE unit, FE unit, parser, access-path, and regression sources cover normal, null, empty, constant, duplicate-producing, nested, volatile, aggregate, Join, Generate, and invalid-input paths. They omit external duplicate-key provenance, and M2 is an internally contradictory expected error.
  • Test results: committed .out labels and ordinary results were checked, but the M2 error block is incorrect. Per the review contract, no builds or tests were run.
  • Observability: these are scalar analysis/execution paths with existing AnalysisException/Status reporting; no new log or metric is required.
  • Transactions/persistence and data writes: no EditLog, transaction, failover, stored-data mutation, or crash-recovery path is changed.
  • FE-BE variables: no session/protocol variable is added; all new physical function names and types match across FE and BE.
  • Performance: entry rewrites are linear and zero-copy/COW use is reasonable, but the existing variable-width fast-path issue remains unresolved; the unsafe uniqueness optimization is M1.
  • Other issues: the tuple-parser scalar-subquery candidate was rejected because its semantic predicate enables but does not force the nonviable tuple alternative. No other unresolved nonduplicate candidate remains.
  • User focus: no additional focus was supplied.

All 26 changed files were swept explicitly; Round 2 normal FE, normal BE, and separate cross-layer risk reviews each returned NO_NEW_VALUABLE_FINDINGS.

Comment thread be/src/exprs/function/function_map.cpp
@linrrzqqq

Copy link
Copy Markdown
Collaborator Author

run buildall

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17633	3123	3101	3101
q2	2119	245	160	160
q3	10245	942	528	528
q4	4681	256	212	212
q5	7684	583	390	390
q6	144	120	95	95
q7	534	523	399	399
q8	9257	960	961	960
q9	3637	2425	2439	2425
q10	6593	871	730	730
q11	527	200	187	187
q12	699	274	203	203
q13	18122	1579	1198	1198
q14	164	157	145	145
q15	q16	454	409	381	381
q17	833	861	777	777
q18	3284	2343	2324	2324
q19	1299	923	820	820
q20	396	293	206	206
q21	5645	1867	1949	1867
q22	354	271	240	240
Total cold run time: 94304 ms
Total hot run time: 17348 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	3496	3420	3397	3397
q2	218	227	168	168
q3	2309	2498	2260	2260
q4	1221	1220	924	924
q5	2214	2173	2176	2173
q6	183	136	88	88
q7	1065	973	869	869
q8	1627	1435	1444	1435
q9	3226	3181	3164	3164
q10	1919	1870	1718	1718
q11	361	279	259	259
q12	475	447	350	350
q13	1542	1589	1210	1210
q14	176	178	173	173
q15	q16	401	407	372	372
q17	1072	1047	1042	1042
q18	5257	4622	5054	4622
q19	1105	864	874	864
q20	1139	992	869	869
q21	3690	3029	3228	3029
q22	376	363	327	327
Total cold run time: 33072 ms
Total hot run time: 29313 ms

@hello-stephen

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

query5	4262	422	334	334
query6	410	140	136	136
query7	4901	435	237	237
query8	411	131	117	117
query9	8666	2939	2940	2939
query10	472	229	190	190
query11	5391	1073	946	946
query12	126	76	73	73
query13	1200	463	334	334
query14	6033	2293	2169	2169
query14_1	2057	2045	2040	2040
query15	177	129	114	114
query16	3144	400	359	359
query17	839	474	377	377
query18	2123	344	273	273
query19	187	158	114	114
query20	78	75	74	74
query21	780	108	90	90
query22	5828	5619	5642	5619
query23	7104	6527	6318	6318
query23_1	6271	6399	6434	6399
query24	7360	1140	792	792
query24_1	783	789	801	789
query25	450	330	266	266
query26	1227	244	138	138
query27	2723	415	253	253
query28	4690	1506	1539	1506
query29	949	446	376	376
query30	265	163	133	133
query31	836	413	346	346
query32	101	51	49	49
query33	500	229	188	188
query34	1024	820	474	474
query35	413	424	365	365
query36	599	576	542	542
query37	132	83	74	74
query38	1126	940	895	895
query39	538	511	510	510
query39_1	481	497	518	497
query40	216	93	82	82
query41	56	54	51	51
query42	73	80	70	70
query43	252	252	223	223
query44	1074	570	558	558
query45	116	107	102	102
query46	825	883	569	569
query47	779	786	754	754
query48	341	312	222	222
query49	601	260	200	200
query50	768	266	206	206
query51	8332	8291	8275	8275
query52	70	74	57	57
query53	191	210	154	154
query54	231	191	196	191
query55	85	61	62	61
query56	207	164	180	164
query57	801	684	651	651
query58	204	167	155	155
query59	1229	1254	1137	1137
query60	250	189	176	176
query61	119	124	115	115
query62	380	210	183	183
query63	173	145	144	144
query64	2397	676	599	599
query65	1773	1598	1571	1571
query66	1680	269	214	214
query67	10292	10120	10122	10120
query68	2803	1268	770	770
query69	516	234	206	206
query70	676	606	623	606
query71	254	188	169	169
query72	2583	1834	1619	1619
query73	671	607	336	336
query74	1584	1275	1194	1194
query75	1227	1133	990	990
query76	1864	762	553	553
query77	275	281	222	222
query78	4054	3953	3421	3421
query79	2379	821	607	607
query80	1525	340	296	296
query81	517	160	133	133
query82	702	132	97	97
query83	285	216	203	203
query84	370	116	94	94
query85	810	357	295	295
query86	412	174	169	169
query87	1044	995	940	940
query88	2851	2118	2143	2118
query89	309	204	179	179
query90	1995	138	135	135
query91	135	122	105	105
query92	52	53	56	53
query93	1539	1135	687	687
query94	683	243	217	217
query95	538	316	236	236
query96	831	581	280	280
query97	1082	1114	1055	1055
query98	151	141	141	141
query99	523	353	327	327
Total cold run time: 183656 ms
Total hot run time: 85102 ms

@hello-stephen

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

query1	0.01	0.01	0.00
query2	0.24	0.04	0.04
query3	0.52	0.11	0.11
query4	1.82	0.10	0.10
query5	0.18	0.18	0.16
query6	1.33	0.71	0.71
query7	0.04	0.01	0.00
query8	0.05	0.04	0.03
query9	0.51	0.22	0.22
query10	0.36	0.35	0.34
query11	0.33	0.12	0.11
query12	0.20	0.12	0.12
query13	0.32	0.32	0.30
query14	0.46	0.46	0.46
query15	0.39	0.35	0.35
query16	0.24	0.23	0.23
query17	0.67	0.70	0.70
query18	0.18	0.16	0.15
query19	1.46	1.12	1.20
query20	0.02	0.01	0.01
query21	15.67	0.15	0.12
query22	4.83	0.04	0.04
query23	16.28	0.27	0.11
query24	12.25	0.34	0.30
query25	0.11	0.05	0.04
query26	0.73	0.18	0.13
query27	0.04	0.03	0.03
query28	3.60	0.57	0.29
query29	12.50	3.17	2.59
query30	0.26	0.12	0.13
query31	2.86	0.38	0.17
query32	3.55	0.34	0.25
query33	1.42	1.39	1.54
query34	15.35	2.24	1.81
query35	1.79	1.81	1.80
query36	0.46	0.30	0.28
query37	0.21	0.04	0.04
query38	0.05	0.03	0.03
query39	0.10	0.02	0.03
query40	0.17	0.09	0.08
query41	0.23	0.02	0.02
query42	0.11	0.02	0.03
query43	0.04	0.03	0.03
Total cold run time: 101.94 s
Total hot run time: 14.97 s

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100% (0/0) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 76.01% (34386/45237)
Line Coverage 61.01% (387615/635362)
Region Coverage 57.06% (324615/568907)
Branch Coverage 57.94% (148256/255863)

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 40.70% (256/629) 🎉
Increment coverage report
Complete coverage report

HappenLee
HappenLee previously approved these changes Aug 26, 2026

@HappenLee HappenLee left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM for BE part

@linrrzqqq

Copy link
Copy Markdown
Collaborator Author

/review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated review status: complete and converged after three rounds. Requesting changes for five new issues.

New inline findings

  1. Residual nested NullType fields can reach wrapper validation before the established recursive TINYINT fallback, rejecting valid Map-Lambda expressions.
  2. Lambda map_filter introduces its internal constructor after coercion, allowing its physical entry fields to disagree with the normalized FE result type.
  3. The shared MapEntries/ArrayMap lowering evaluates physical entries hidden beneath semantically null Map rows, exposing lambda errors or side effects.
  4. Both new Map filtering paths narrow legal 64-bit nested positions into a 32-bit selector and can copy the wrong entry above 2^32.
  5. MapFilter, TransformValues, TransformKeys, and MapApply merge independent Map/Struct decimal or time precisions before execution or lowering.

Previously raised blockers still present (not duplicated inline)

Critical checkpoint conclusions

  • Goal and proof: the PR adds the six advertised Nereids Map-Lambda functions, tuple-Lambda syntax, FE lowering, BE constructors/filtering, and broad ordinary-path tests. The five new findings and two existing blockers prevent the feature from meeting that goal end to end.
  • Scope and focus: all 26 changed files and the complete 3,060-line authoritative diff were reviewed. The implementation is mostly feature-focused; the ArrayMap fast-path expansion is the principal adjacent change. No additional user review focus was supplied.
  • Concurrency: analysis and execution use query-local expression/column state; no new shared mutable state, thread entry, locks, lock ordering, or atomic protocol is introduced.
  • Lifecycle and static initialization: scoped Lambda bindings, rewritten expression ownership, and COW columns were traced. No non-intuitive release path, cycle, or cross-TU static initialization dependency was found.
  • Configuration: no configuration item or dynamic-update path is added.
  • Compatibility: public/internal names and registrations match. The three new serialized BE symbols are additive and compatible with the repository's BE-before-FE rolling order; no storage format, persisted metadata, or protocol variable changes are introduced.
  • Parallel paths: direct and Lambda map_filter, all six one-driver lowerings, public/internal constructors, native/external Map producers, nested Lambdas, access-path pruning, and old/new BE symbol paths were compared. The surviving divergences are represented by the five attached findings and two existing threads.
  • Conditional checks: null/empty/constant/computed/volatile Maps, nullable predicates, mask/offset mismatches, hidden null-row payload, nested NullTypes, selector bounds, and error propagation were checked. Ordinary-sized direct filtering is sound outside the listed issues.
  • Test coverage: changed BE, FE, parser, access-path, and regression tests cover broad normal, null, empty, constant, duplicate-producing, nested, volatile, aggregate, Join, and Generate cases, but omit the accepted adversarial cases and the two existing blocker boundaries.
  • Test results: all 44 changed regression query/result names correspond one-for-one and committed ordinary results were checked. Per the review-run contract, no build or test was executed; current completed style, formatting, license, secret, and large-file checks pass.
  • Observability: these are local scalar analysis/execution paths with existing AnalysisException/Status propagation; no additional distributed log, identifier, or metric is required.
  • Transactions and persistence: no transaction, EditLog, master-failover, or persistent-state path is changed.
  • Data writes and crashes: the feature is query-time only and does not mutate stored data. Outside the physical type mismatch, selector corruption, and existing memory blocker already reported, no additional crash-recovery, leak, or atomicity issue survived.
  • FE/BE variables: no session or protocol variable is added. Function names align, but the second inline finding identifies a concrete FE descriptor versus BE physical-column disagreement.
  • Performance: ordinary entry processing is linear and COW use is reasonable. The existing eight-batch variable-width issue remains a correctness/allocation blocker; no other distinct CPU or memory issue survived.
  • Other issues: tuple-parser ambiguity was rechecked and dismissed because the predicate only enables a branch that adaptive prediction can reject; the nested captured-entry access-path issue is fixed in the current base. Every other candidate was either disproved or duplicate-fenced.
  • User focus: no additional focus was supplied, so the review covered the full PR without a separate focus constraint.

Comment thread be/src/exprs/function/function_map.cpp
### What problem does this PR solve?

Issue Number: None

Related PR: apache#66968

Problem Summary: Map offsets use 64-bit positions while IColumn::Selector stores 32-bit indexes. map_filter and the filtered-entry map constructor could therefore truncate a position at 2^32 and silently copy the wrong key and value. Validate the nested entry count before building a selector and return INVALID_ARGUMENT when an index cannot be represented. Add an O(1)-memory boundary unit test for the overflow case.

### Release note

Reject map operations whose nested positions exceed the selector range instead of returning corrupted data.

### Check List (For Author)

- Test: Unit Test (FunctionMapTest.* under ASAN)
- Behavior changed: Yes (oversized selector inputs now return INVALID_ARGUMENT)
- Does this need documentation: No
@linrrzqqq

Copy link
Copy Markdown
Collaborator Author

/review

@linrrzqqq

Copy link
Copy Markdown
Collaborator Author

run buildall

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated review status: complete and converged after two rounds. Requesting changes without new inline comments because every surviving blocker is already covered by an existing review thread.

Current-head blockers (not duplicated inline)

  1. The existing variable-width Lambda budget thread remains applicable: _calculate_lambda_batch_size() can return the variable-width safety ceiling and the new direct path then admits 8 * max_rows, defeating the byte bound and risking multi-gigabyte ColumnString expansion.
  2. The existing external duplicate-key Map thread remains applicable: external and serialized Map readers can feed the new unique/filter paths without Doris's last-win normalization.
  3. The existing internal-constructor coercion thread remains applicable: Lambda map_filter creates MapFromFilteredEntriesUnique after wrapper coercion, so the normalized FE result descriptor can disagree with the physical entry fields sent to BE.
  4. The existing hidden null-Map payload thread remains applicable: MapEntries and ArrayMap still evaluate nested entries retained beneath semantically null outer Map rows.
  5. The existing independent Map precision thread remains applicable: MapFilter, TransformValues, TransformKeys, and MapApply still omit the no-op precision contract that prevents independent key/value decimal or time scales from being merged.

Current-head repairs and dismissals

  • The 64-to-32-bit selector issue is fixed by explicit range checks and a boundary test.
  • The nested-Lambda Map access-path dependency is present in the exact base/head and the captured outer entry now resolves through every active Lambda frame.
  • The contradictory regression expected-error block was replaced with a deterministic result.
  • The mixed-version BE-symbol candidate is dismissed under Doris's documented BE-first, Master-FE-last upgrade sequence.
  • The tuple-Lambda scalar-subquery candidate is dismissed because its semantic predicate only enables the tuple alternative; adaptive prediction still eliminates that branch when its required expression cannot start with SELECT, WITH, or VALUES.

Critical checkpoint conclusions

  • Goal and proof: the PR adds the six advertised Nereids Map-Lambda functions, tuple syntax, FE lowerings, BE constructors/filtering, and broad ordinary-path tests. The five existing blocker mechanisms above prevent end-to-end correctness.
  • Scope and focus: all 26 changed files and the complete 2,925-line authoritative diff were reviewed. The implementation is mostly feature-focused; the ArrayMap eight-batch fast path is the principal adjacent change. No additional user focus was supplied.
  • Concurrency: analysis and execution state is query-local; no shared mutable state, thread entry, lock ordering, or atomic protocol is introduced.
  • Lifecycle and initialization: Lambda binding frames, nullable nested payloads, rewritten expression ownership, and COW columns were traced. The hidden-payload blocker is listed above; no separate release, cycle, or static-initialization defect survived.
  • Configuration: no configuration item or dynamic-update path is added.
  • Compatibility: public/internal names and FE/BE registrations match, and the new symbols are compatible with the documented upgrade order. No storage format, persisted metadata, or protocol-variable change is introduced.
  • Parallel paths and special conditions: all six wrappers, direct map_filter, both internal constructors, native/external Map producers, const/null/empty inputs, nullable predicates, nested Lambdas, access-path pruning, selector/offset bounds, and join/branch/aggregate lowering were checked. The surviving divergences are exactly the five duplicate-fenced threads above.
  • Tests and results: changed BE, FE, parser, access-path, and regression sources cover broad normal, null, empty, constant, duplicate-producing, nested, volatile, aggregate, Join, and Generate cases. All 37 changed regression query labels match committed result blocks, but the five blocker boundaries are not proved. Per the review contract, no local build or test was run.
  • Observability: these are local scalar analysis/execution paths with existing AnalysisException/Status propagation; no additional distributed log, identifier, or metric is required.
  • Persistence, transactions, and writes: no EditLog, failover, transaction, persistent-state, or stored-data mutation path changes.
  • FE/BE variables: no session or protocol variable is added. Physical function names align; the internal-constructor thread identifies the surviving descriptor/column mismatch.
  • Performance: ordinary entry processing is linear and COW use is reasonable, but the existing eight-batch variable-width issue remains a correctness and allocation blocker; no other distinct performance issue survived.
  • Other issues: the parser and mixed-version candidates were independently challenged and dismissed. Every other candidate was either fixed at head, disproved, or duplicate-fenced.
  • User focus: no additional focus was supplied.

Review completeness: complete and converged. Round 2 normal FE, normal BE/tests, and separate parser/resolved-thread risk reviews all returned NO_NEW_VALUABLE_FINDINGS.

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17574	3097	3062	3062
q2	2069	259	220	220
q3	10254	851	522	522
q4	4674	249	205	205
q5	7670	557	383	383
q6	139	112	97	97
q7	523	501	398	398
q8	9254	904	910	904
q9	3486	2395	2397	2395
q10	6517	851	688	688
q11	402	197	182	182
q12	626	270	203	203
q13	18098	1546	1162	1162
q14	159	150	143	143
q15	q16	429	397	372	372
q17	1434	894	796	796
q18	3072	2243	2248	2243
q19	1133	895	807	807
q20	382	278	204	204
q21	5209	1712	1878	1712
q22	329	270	225	225
Total cold run time: 93433 ms
Total hot run time: 16923 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	3433	3370	3332	3332
q2	519	393	372	372
q3	2190	2354	2138	2138
q4	1190	1169	889	889
q5	2176	2115	2097	2097
q6	165	117	84	84
q7	1047	925	843	843
q8	1616	1418	1416	1416
q9	3147	3120	3102	3102
q10	1862	1799	1617	1617
q11	354	269	255	255
q12	448	426	343	343
q13	1483	1555	1170	1170
q14	177	164	153	153
q15	q16	399	397	354	354
q17	3592	3295	3177	3177
q18	4850	4483	4772	4483
q19	3507	890	847	847
q20	995	939	806	806
q21	3798	3061	3185	3061
q22	391	341	326	326
Total cold run time: 37339 ms
Total hot run time: 30865 ms

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 80.38% (213/265) 🎉
Increment coverage report
Complete coverage report

@hello-stephen

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

query5	4286	409	338	338
query6	392	136	122	122
query7	4955	416	237	237
query8	285	123	117	117
query9	8682	2898	2905	2898
query10	408	217	176	176
query11	5388	1029	911	911
query12	113	69	72	69
query13	1228	440	301	301
query14	6061	2175	2074	2074
query14_1	1951	1964	1949	1949
query15	178	122	104	104
query16	898	366	275	275
query17	785	427	371	371
query18	2325	325	227	227
query19	166	135	99	99
query20	72	68	67	67
query21	199	100	86	86
query22	5462	5386	5303	5303
query23	6376	6256	6118	6118
query23_1	5946	6099	5968	5968
query24	7304	1063	733	733
query24_1	774	763	776	763
query25	405	272	263	263
query26	1089	238	124	124
query27	2771	404	246	246
query28	4698	1489	1506	1489
query29	940	430	331	331
query30	251	152	128	128
query31	826	386	313	313
query32	122	71	68	68
query33	455	205	165	165
query34	991	788	480	480
query35	413	411	337	337
query36	561	574	546	546
query37	116	83	70	70
query38	994	832	830	830
query39	510	475	466	466
query39_1	454	454	450	450
query40	201	87	79	79
query41	56	50	51	50
query42	79	73	73	73
query43	239	245	211	211
query44	1011	538	542	538
query45	107	103	102	102
query46	800	862	513	513
query47	745	763	720	720
query48	299	294	228	228
query49	528	244	186	186
query50	766	267	198	198
query51	8258	8246	8266	8246
query52	74	68	63	63
query53	198	197	144	144
query54	234	175	160	160
query55	73	59	55	55
query56	198	175	189	175
query57	696	698	665	665
query58	199	160	169	160
query59	1238	1217	1090	1090
query60	242	192	182	182
query61	134	143	134	134
query62	403	213	175	175
query63	179	141	141	141
query64	2656	708	599	599
query65	1613	1595	1627	1595
query66	1844	253	205	205
query67	9976	9661	9564	9564
query68	3037	1131	756	756
query69	336	218	202	202
query70	686	625	618	618
query71	245	166	165	165
query72	2362	1728	1593	1593
query73	656	650	328	328
query74	1978	1217	1140	1140
query75	1170	1101	935	935
query76	2350	732	526	526
query77	245	258	210	210
query78	3925	3673	3153	3153
query79	2856	824	560	560
query80	1574	323	276	276
query81	515	154	135	135
query82	635	132	92	92
query83	290	213	202	202
query84	295	111	89	89
query85	818	348	304	304
query86	404	175	177	175
query87	1006	963	897	897
query88	2962	2128	2077	2077
query89	288	200	177	177
query90	1947	129	133	129
query91	130	120	103	103
query92	81	69	71	69
query93	1878	1084	725	725
query94	650	237	227	227
query95	529	323	227	227
query96	794	591	283	283
query97	1088	1067	1039	1039
query98	162	130	130	130
query99	414	347	306	306
Total cold run time: 178610 ms
Total hot run time: 81934 ms

@hello-stephen

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

query1	0.00	0.01	0.00
query2	0.07	0.03	0.04
query3	0.25	0.10	0.11
query4	1.60	0.10	0.10
query5	0.17	0.15	0.16
query6	1.25	0.69	0.70
query7	0.04	0.01	0.00
query8	0.04	0.03	0.03
query9	0.29	0.22	0.21
query10	0.34	0.35	0.34
query11	0.17	0.12	0.11
query12	0.15	0.12	0.12
query13	0.32	0.31	0.32
query14	0.45	0.45	0.45
query15	0.37	0.33	0.34
query16	0.22	0.22	0.22
query17	0.66	0.73	0.69
query18	0.17	0.16	0.18
query19	1.21	1.13	1.17
query20	0.02	0.01	0.01
query21	15.43	0.16	0.12
query22	5.06	0.04	0.04
query23	16.18	0.24	0.11
query24	3.01	0.32	0.25
query25	0.10	0.04	0.04
query26	0.83	0.16	0.12
query27	0.04	0.03	0.03
query28	3.68	0.55	0.26
query29	12.46	3.14	2.53
query30	0.25	0.12	0.12
query31	2.75	0.37	0.16
query32	3.53	0.32	0.23
query33	1.36	1.51	1.47
query34	15.37	2.17	1.77
query35	1.74	1.73	1.68
query36	0.46	0.29	0.28
query37	0.06	0.04	0.04
query38	0.05	0.03	0.03
query39	0.03	0.03	0.02
query40	0.10	0.08	0.07
query41	0.08	0.02	0.02
query42	0.03	0.02	0.03
query43	0.03	0.03	0.03
Total cold run time: 90.42 s
Total hot run time: 14.62 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.

3 participants