Skip to content

[Feature](func) Support table function json_each, json_each_text#60910

Open
linrrzqqq wants to merge 5 commits intoapache:masterfrom
linrrzqqq:json-each
Open

[Feature](func) Support table function json_each, json_each_text#60910
linrrzqqq wants to merge 5 commits intoapache:masterfrom
linrrzqqq:json-each

Conversation

@linrrzqqq
Copy link
Contributor

@linrrzqqq linrrzqqq commented Feb 28, 2026

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

Release note

doc: apache/doris-website#3422

Doris> SELECT k, v
    -> FROM (SELECT 1) dummy
    -> LATERAL VIEW json_each('{"a":"foo","b":"bar"}') t AS k, v;
+------+-------+
| k    | v     |
+------+-------+
| a    | "foo" |
| b    | "bar" |
+------+-------+
2 rows in set (0.01 sec)

Doris> SELECT k, v
    -> FROM (SELECT 1) dummy
    -> LATERAL VIEW json_each_text('{"a":"foo","b":"bar"}') t AS k, v;
+------+------+
| k    | v    |
+------+------+
| a    | foo  |
| b    | bar  |
+------+------+
2 rows in set (0.01 sec)

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@linrrzqqq linrrzqqq requested a review from zclllyybb as a code owner February 28, 2026 07:56
@hello-stephen
Copy link
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@zclllyybb zclllyybb self-assigned this Feb 28, 2026
@linrrzqqq
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
============================================
q1	17655	4452	4296	4296
q2	q3	10643	814	528	528
q4	4680	363	266	266
q5	7590	1212	1039	1039
q6	184	180	145	145
q7	789	824	674	674
q8	10106	1485	1317	1317
q9	6124	4723	4751	4723
q10	6865	1924	1631	1631
q11	449	244	261	244
q12	748	573	461	461
q13	17797	4255	3439	3439
q14	233	233	214	214
q15	980	826	784	784
q16	761	731	665	665
q17	788	938	413	413
q18	6343	5360	5249	5249
q19	1399	991	653	653
q20	517	504	393	393
q21	4503	1833	1402	1402
q22	342	286	239	239
Total cold run time: 99496 ms
Total hot run time: 28775 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4463	4378	4337	4337
q2	q3	1766	2205	1717	1717
q4	853	1163	769	769
q5	4037	4346	4314	4314
q6	177	170	138	138
q7	1731	1616	1497	1497
q8	2431	2696	2489	2489
q9	7988	7433	7328	7328
q10	2671	2826	2496	2496
q11	529	458	418	418
q12	508	616	471	471
q13	3969	4575	3575	3575
q14	289	304	286	286
q15	848	801	801	801
q16	720	781	722	722
q17	1197	1548	1469	1469
q18	7149	6826	6586	6586
q19	892	841	883	841
q20	2112	2160	2151	2151
q21	3960	3575	3333	3333
q22	517	442	376	376
Total cold run time: 48807 ms
Total hot run time: 46114 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 184699 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 980c1881a75967647871694ec87db39ac02a9c71, data reload: false

query5	4777	632	532	532
query6	329	221	202	202
query7	4224	471	278	278
query8	340	254	243	243
query9	8745	2775	2767	2767
query10	515	395	354	354
query11	17012	17601	17453	17453
query12	209	130	126	126
query13	1267	494	352	352
query14	6936	3380	3181	3181
query14_1	3063	2935	2922	2922
query15	210	206	188	188
query16	4189	510	480	480
query17	1124	744	620	620
query18	2455	453	350	350
query19	218	227	172	172
query20	137	125	134	125
query21	219	153	117	117
query22	5580	5205	5120	5120
query23	17203	16747	16472	16472
query23_1	16653	16734	16627	16627
query24	7090	1621	1217	1217
query24_1	1232	1207	1225	1207
query25	579	439	408	408
query26	1184	253	151	151
query27	2755	460	295	295
query28	4454	1862	1868	1862
query29	742	557	480	480
query30	313	246	210	210
query31	877	736	654	654
query32	84	75	70	70
query33	545	334	280	280
query34	922	904	566	566
query35	628	674	603	603
query36	1100	1174	985	985
query37	136	96	86	86
query38	2964	2988	2879	2879
query39	933	856	835	835
query39_1	832	832	832	832
query40	233	151	136	136
query41	68	64	62	62
query42	105	106	103	103
query43	381	389	360	360
query44	
query45	203	193	188	188
query46	888	1037	619	619
query47	2143	2128	2021	2021
query48	312	321	264	264
query49	638	472	408	408
query50	697	290	225	225
query51	4089	4064	4122	4064
query52	106	112	97	97
query53	298	346	280	280
query54	304	281	279	279
query55	97	89	89	89
query56	332	318	326	318
query57	1362	1331	1274	1274
query58	303	281	289	281
query59	2576	2709	2565	2565
query60	355	344	342	342
query61	175	176	173	173
query62	628	592	547	547
query63	321	281	289	281
query64	4529	1244	990	990
query65	
query66	1292	449	351	351
query67	16534	16367	16427	16367
query68	
query69	389	316	279	279
query70	965	989	956	956
query71	330	299	299	299
query72	2728	2695	2500	2500
query73	542	551	317	317
query74	10006	9936	9741	9741
query75	2847	2761	2477	2477
query76	1865	1041	690	690
query77	390	372	313	313
query78	11228	11316	10746	10746
query79	3158	779	606	606
query80	1700	624	540	540
query81	598	281	244	244
query82	993	145	116	116
query83	338	260	241	241
query84	255	123	96	96
query85	874	466	428	428
query86	492	314	289	289
query87	3102	3109	3020	3020
query88	3564	2669	2652	2652
query89	425	369	347	347
query90	2007	177	176	176
query91	188	152	131	131
query92	78	79	68	68
query93	1451	848	515	515
query94	638	321	260	260
query95	584	330	312	312
query96	640	516	231	231
query97	2472	2494	2409	2409
query98	238	223	215	215
query99	981	1002	916	916
Total cold run time: 259120 ms
Total hot run time: 184699 ms

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 67.53% (104/154) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.58% (19639/37352)
Line Coverage 36.20% (183343/506508)
Region Coverage 32.48% (142180/437742)
Branch Coverage 33.44% (61678/184422)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 76.62% (118/154) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.46% (26137/36574)
Line Coverage 54.28% (274071/504955)
Region Coverage 51.50% (227579/441879)
Branch Coverage 52.90% (97861/184986)

@linrrzqqq
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
============================================
q1	17630	4534	4322	4322
q2	q3	10649	778	517	517
q4	4686	343	254	254
q5	7555	1212	1027	1027
q6	171	175	147	147
q7	764	859	673	673
q8	9289	1445	1292	1292
q9	4826	4738	4717	4717
q10	6800	1889	1657	1657
q11	448	252	264	252
q12	749	557	470	470
q13	17768	4190	3440	3440
q14	224	231	214	214
q15	970	799	787	787
q16	747	707	680	680
q17	726	898	432	432
q18	5933	5480	5407	5407
q19	1118	995	610	610
q20	529	506	406	406
q21	4470	1806	1390	1390
q22	337	280	244	244
Total cold run time: 96389 ms
Total hot run time: 28938 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4446	4349	4343	4343
q2	q3	1758	2181	1721	1721
q4	818	1155	760	760
q5	3999	4313	4303	4303
q6	181	169	136	136
q7	1724	1592	1482	1482
q8	2421	2657	2521	2521
q9	7393	7424	7405	7405
q10	2791	2851	2424	2424
q11	533	435	417	417
q12	508	589	450	450
q13	3936	4406	3703	3703
q14	296	315	293	293
q15	879	845	807	807
q16	721	759	725	725
q17	1185	1560	1333	1333
q18	7169	6715	6523	6523
q19	862	856	890	856
q20	2094	2179	2065	2065
q21	3979	3685	3353	3353
q22	479	437	395	395
Total cold run time: 48172 ms
Total hot run time: 46015 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 184511 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 844f62ce6cc898c9512589d1a809642ff1b28b4a, data reload: false

query5	5179	644	529	529
query6	332	226	202	202
query7	4233	480	274	274
query8	346	242	240	240
query9	8748	2755	2731	2731
query10	565	402	361	361
query11	17094	17488	17265	17265
query12	201	129	125	125
query13	1339	465	358	358
query14	7074	3325	3081	3081
query14_1	3056	2956	3168	2956
query15	212	198	188	188
query16	964	480	496	480
query17	2434	809	633	633
query18	2763	481	384	384
query19	223	225	202	202
query20	163	149	152	149
query21	229	148	128	128
query22	5623	5051	4916	4916
query23	17331	16904	16581	16581
query23_1	16713	16719	16718	16718
query24	7172	1613	1244	1244
query24_1	1240	1248	1223	1223
query25	569	502	423	423
query26	1237	263	156	156
query27	2702	456	294	294
query28	4467	1874	1870	1870
query29	789	561	470	470
query30	313	243	207	207
query31	864	713	639	639
query32	82	74	68	68
query33	516	330	271	271
query34	908	902	560	560
query35	625	698	628	628
query36	1099	1091	964	964
query37	128	92	79	79
query38	2905	2920	2921	2920
query39	899	869	840	840
query39_1	829	836	824	824
query40	231	153	134	134
query41	63	61	58	58
query42	107	102	100	100
query43	373	384	369	369
query44	
query45	197	190	180	180
query46	875	994	612	612
query47	2122	2157	2050	2050
query48	320	309	229	229
query49	626	464	392	392
query50	671	281	222	222
query51	4086	4045	4056	4045
query52	108	110	99	99
query53	286	342	282	282
query54	297	277	276	276
query55	89	83	82	82
query56	320	312	344	312
query57	1355	1315	1289	1289
query58	283	278	274	274
query59	2570	2701	2550	2550
query60	360	341	313	313
query61	154	150	142	142
query62	615	593	530	530
query63	317	283	275	275
query64	4836	1289	1010	1010
query65	
query66	1398	468	353	353
query67	16342	16491	16323	16323
query68	
query69	386	316	279	279
query70	1018	949	957	949
query71	340	310	293	293
query72	2880	2663	2396	2396
query73	538	549	322	322
query74	10008	9958	9747	9747
query75	2841	2748	2471	2471
query76	2302	1021	683	683
query77	358	378	304	304
query78	11185	11294	10700	10700
query79	3232	826	592	592
query80	1823	617	533	533
query81	582	275	252	252
query82	1000	153	116	116
query83	344	257	240	240
query84	258	120	102	102
query85	909	482	428	428
query86	500	330	296	296
query87	3115	3075	3143	3075
query88	3585	2713	2681	2681
query89	431	362	350	350
query90	2193	179	169	169
query91	161	159	141	141
query92	86	74	74	74
query93	1875	844	516	516
query94	659	310	299	299
query95	572	336	321	321
query96	650	510	230	230
query97	2478	2506	2416	2416
query98	232	220	218	218
query99	982	987	859	859
Total cold run time: 260533 ms
Total hot run time: 184511 ms

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 13.33% (4/30) 🎉
Increment coverage report
Complete coverage report

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 80.82% (118/146) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.59% (19645/37352)
Line Coverage 36.24% (183561/506500)
Region Coverage 32.51% (142314/437690)
Branch Coverage 33.47% (61721/184408)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 90.41% (132/146) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 73.31% (26811/36574)
Line Coverage 56.67% (286168/504947)
Region Coverage 54.17% (239319/441827)
Branch Coverage 55.70% (103024/184972)

@HappenLee
Copy link
Contributor

/review

@zclllyybb zclllyybb changed the base branch from master to auto-pick-59288-branch-3.1 March 3, 2026 03:14
@zclllyybb zclllyybb requested a review from morrySnow as a code owner March 3, 2026 03:14
@zclllyybb zclllyybb changed the base branch from auto-pick-59288-branch-3.1 to master March 3, 2026 03:14
@zclllyybb zclllyybb closed this Mar 3, 2026
@zclllyybb zclllyybb reopened this Mar 3, 2026
@zclllyybb
Copy link
Contributor

/review

Copy link
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.

Code Review Summary: [Feature](func) Support table function json_each, json_each_text

Overall this is a well-structured addition of two new table-generating functions (json_each and json_each_text) that expand JSON objects into key/value rows. The implementation follows existing patterns in the codebase (similar to explode_json_object). The C++ implementation is correct, the FE Java classes follow the established TableGeneratingFunction pattern, and the tests are comprehensive.

Issues Found

1. [Indentation] BuiltinTableGeneratingFunctions.javajson_each_text line has inconsistent indentation
The json_each_text entry has 20 spaces of indentation vs 12 spaces for every other entry in the list. Minor formatting issue.

2. [Missing outer variants] json_each and json_each_text lack _outer variants
Every other table-generating function in Doris (explode, explode_map, explode_json_object, explode_split, explode_numbers, posexplode, etc.) has a corresponding _outer variant that provides LEFT JOIN-like semantics (emitting a NULL row when the input is NULL or empty). json_each/json_each_text are the only table functions without outer variants.

  • The BE side (table_function_factory.cpp) already supports outer semantics automatically (it strips the _outer suffix, looks up the base function, and calls set_outer()). No BE changes are needed.
  • However, on the FE side: (a) function_fake.cpp uses register_function instead of register_table_function_expand_outer, so json_each_outer/json_each_text_outer are not registered in the BE function factory. (b) No JsonEachOuter.java/JsonEachTextOuter.java FE classes exist. (c) No registration in BuiltinTableGeneratingFunctions.java for the outer variants.
  • This means LATERAL VIEW OUTER json_each(...) will not work.
  • Consider whether this is intentional or an oversight. If intentional, a comment explaining why would be helpful.

3. [Performance] Const column optimization is incomplete
When _is_const = true, the process_row method still re-parses the JSON and rebuilds _kv_pairs on every row. The vexplode_numbers function demonstrates the pattern of pre-computing results in process_init and returning early in process_row when const. This is functionally correct but sub-optimal for queries with const JSON columns and many rows. Not a blocker, but worth noting as a follow-up optimization.

@@ -89,7 +93,8 @@
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Indentation inconsistency. This line has 20 spaces of indentation (5 levels), but every other entry in this list uses 12 spaces (3 levels). Should be aligned with the line above:

            tableGenerating(JsonEachText.class, "json_each_text"),

Copy link
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.

Code Review Summary: Feature Support table function json_each, json_each_text

Overall this is a clean, well-structured PR that follows existing patterns for adding table generating functions. The code is functionally correct, has good test coverage (unit tests + regression tests), and handles edge cases (NULL input, empty objects, non-object JSON, unicode, nested values) properly.

Issues Found

  1. [Style] Indentation inconsistency in BuiltinTableGeneratingFunctions.java — The JsonEachText registration line has extra indentation (double-indented) compared to all surrounding entries. Minor style nit.

  2. [Suggestion] Missing _outer variants — Unlike most other explode_* table functions, json_each and json_each_text do not provide _outer variants (json_each_outer, json_each_text_outer). In the BE, register_function is used instead of register_table_function_expand_outer, and no JsonEachOuter/JsonEachTextOuter FE classes exist. This means LATERAL VIEW json_each_outer(...) will fail. While there is precedent (e.g., ExplodeVariantArray, Unnest), this is a usability gap that users may expect to work, especially those coming from PostgreSQL. Consider adding outer variants, or explicitly documenting why they are omitted.

  3. [Suggestion] _is_const optimization not fully utilizedprocess_init correctly detects const columns via unpack_if_const and sets _is_const, but process_row still unconditionally re-parses JSON and rebuilds _kv_pairs on every call. Since the base class TableFunction::process_row preserves _cur_size when _is_const is true, the derived class could skip re-parsing after the first row for const inputs. This matches the existing pattern in vexplode_json_object (which also doesn't optimize), but is a missed opportunity for performance improvement with literal/const JSON inputs.

Positive Observations

  • Clean template design using TEXT_MODE bool to share code between json_each and json_each_text
  • Good handling of nullable columns, null JSON values, and edge cases
  • Comprehensive regression tests covering: basic types, nulls, empty objects, non-objects, unicode, negative numbers, booleans, nested values, and inline literals
  • Unit tests cover both get_value and get_same_many_values paths
  • Follows the established visitor pattern and function signature conventions correctly

@zclllyybb
Copy link
Contributor

/review

Copy link
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.

Code Review Summary: json_each / json_each_text Table Functions

Overall this is a well-structured implementation following existing patterns (particularly explode_json_object). The FE and BE implementations are consistent, the template approach (TEXT_MODE) is clean, and test coverage is reasonable. Below are findings organized by the critical review checkpoints.

Critical Checkpoint Conclusions

1. Goal & Correctness: The PR adds two table functions json_each and json_each_text that expand top-level JSON objects into key/value pairs (JSONB vs text value columns respectively). The implementation accomplishes this goal. Regression tests and unit tests prove the basic functionality.

2. Modification size/focus: The PR is focused and minimal for a new feature. 11 files changed, all related to the feature.

3. Concurrency: No concurrency concerns — table functions execute in a single-threaded pipeline context.

4. Lifecycle management: No special lifecycle concerns. Column pointers are properly nulled in process_close().

5. Configuration items: None added — N/A.

6. Incompatible changes: No incompatible changes — this is purely additive.

7. Parallel code paths (Missing _outer variants): ⚠️ Every existing explode_* table function has a corresponding _outer variant (e.g., explode_json_object / explode_json_object_outer). The _outer variant preserves the input row with NULL values when the generator produces zero rows (left-join semantics). json_each and json_each_text are missing their _outer variants. This is a functional gap — users have no way to get outer join behavior with these functions. See inline comments.

8. BE fake function registration: json_each / json_each_text are registered with register_function instead of register_table_function_expand_outer, which is consistent with not having outer variants, but inconsistent with how explode_json_object is registered. If outer variants are added, this needs to change.

9. DCHECK usage in function_fake.cpp: The new FunctionJsonEach and FunctionJsonEachText use DCHECK_EQ for argument type validation. Per coding standards, DCHECK disappears in RELEASE builds, leaving no protection. This should use a proper error return or DORIS_CHECK for invariant assertions. Note: this matches the existing pattern in FunctionExplodeJsonObject, so it's a pre-existing issue, but new code should not perpetuate it.

10. Test coverage: Good breadth — covers basic strings, numbers, booleans, null values, empty objects, SQL NULL input, non-object inputs (arrays, strings), unicode, negative numbers, inline literals, and multi-row scenarios. The BE unit test also covers get_same_many_values. Missing: FE unit tests (pattern exists in ExplodeTest.java), and the id=9 nested object/array test case only runs sql (no qt_ assertion).

11. Observability: N/A for a simple table function.

12. Transaction/persistence: N/A.

13. FE-BE variable passing: The function signatures are correctly matched between FE (JsonType input, Struct(String, JsonType/String) return) and BE (FunctionJsonEach/FunctionJsonEachText fake functions).

14. Formatting: Minor indentation issue in BuiltinTableGeneratingFunctions.java.

Issues Found (by severity)

# Severity File Issue
1 Medium Multiple Missing json_each_outer / json_each_text_outer variants
2 Low function_fake.cpp DCHECK_EQ should be DORIS_CHECK (disappears in RELEASE)
3 Nit BuiltinTableGeneratingFunctions.java Extra indentation on json_each_text line
4 Nit vjson_each.cpp compile_check_end.h placed after closing brace of namespace — inconsistent with header

@linrrzqqq
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
============================================
q1	17654	4371	4295	4295
q2	q3	10646	775	515	515
q4	4674	350	257	257
q5	7545	1212	1014	1014
q6	176	171	145	145
q7	789	857	658	658
q8	9962	1442	1295	1295
q9	4994	4716	4724	4716
q10	6857	1836	1661	1661
q11	474	263	237	237
q12	726	560	459	459
q13	17782	4194	3408	3408
q14	230	233	206	206
q15	921	790	791	790
q16	756	720	683	683
q17	699	881	400	400
q18	6249	5247	5244	5244
q19	1397	962	624	624
q20	502	479	385	385
q21	4831	1955	1465	1465
q22	395	333	248	248
Total cold run time: 98259 ms
Total hot run time: 28705 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4651	4745	4573	4573
q2	q3	1775	2228	1796	1796
q4	856	1175	761	761
q5	4139	4420	4314	4314
q6	181	173	144	144
q7	1758	1642	1494	1494
q8	2431	2660	2529	2529
q9	7450	7273	7446	7273
q10	2595	2803	2362	2362
q11	519	425	410	410
q12	505	572	444	444
q13	4107	4403	3555	3555
q14	281	281	266	266
q15	860	804	806	804
q16	731	764	724	724
q17	1232	1535	1410	1410
q18	7117	6677	6638	6638
q19	871	843	855	843
q20	2132	2264	2025	2025
q21	3939	3479	3513	3479
q22	494	448	383	383
Total cold run time: 48624 ms
Total hot run time: 46227 ms

@doris-robot
Copy link

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

query5	4784	623	527	527
query6	322	232	200	200
query7	4232	469	265	265
query8	339	242	230	230
query9	8733	2723	2673	2673
query10	537	371	318	318
query11	16957	17524	17287	17287
query12	198	155	142	142
query13	1716	489	394	394
query14	6728	3275	3061	3061
query14_1	2978	2846	2893	2846
query15	207	213	190	190
query16	1001	473	493	473
query17	1196	757	635	635
query18	3005	498	358	358
query19	217	222	195	195
query20	143	149	142	142
query21	217	139	122	122
query22	5639	5004	4881	4881
query23	17143	16740	16554	16554
query23_1	16603	16631	16724	16631
query24	7130	1583	1217	1217
query24_1	1238	1228	1222	1222
query25	528	443	397	397
query26	1231	256	145	145
query27	2763	462	279	279
query28	4501	1875	1890	1875
query29	781	557	465	465
query30	313	238	206	206
query31	874	715	625	625
query32	79	76	69	69
query33	507	327	280	280
query34	914	903	565	565
query35	621	675	587	587
query36	1105	1142	1013	1013
query37	136	90	119	90
query38	2962	2916	2847	2847
query39	892	871	843	843
query39_1	839	833	844	833
query40	229	150	131	131
query41	63	58	57	57
query42	102	101	100	100
query43	371	380	351	351
query44	
query45	209	191	182	182
query46	886	992	597	597
query47	2132	2159	2060	2060
query48	309	311	235	235
query49	622	459	392	392
query50	683	273	215	215
query51	4116	4166	3986	3986
query52	102	106	95	95
query53	289	338	286	286
query54	285	271	262	262
query55	90	85	84	84
query56	300	310	309	309
query57	1348	1345	1255	1255
query58	282	274	272	272
query59	2531	2640	2501	2501
query60	329	324	306	306
query61	147	144	145	144
query62	626	591	536	536
query63	308	273	269	269
query64	4818	1238	958	958
query65	
query66	1380	448	352	352
query67	16341	16515	16260	16260
query68	
query69	396	308	293	293
query70	968	985	902	902
query71	332	306	289	289
query72	2824	2662	2336	2336
query73	528	543	314	314
query74	10000	9995	9732	9732
query75	2848	2747	2468	2468
query76	2308	1021	667	667
query77	356	382	308	308
query78	11117	11350	10664	10664
query79	1164	801	605	605
query80	1357	626	520	520
query81	560	273	261	261
query82	999	146	113	113
query83	341	255	236	236
query84	273	123	119	119
query85	884	469	426	426
query86	428	294	311	294
query87	3104	3160	3006	3006
query88	3536	2698	2635	2635
query89	421	365	345	345
query90	2029	172	164	164
query91	164	157	136	136
query92	77	78	73	73
query93	1004	841	517	517
query94	628	328	302	302
query95	566	403	314	314
query96	653	502	223	223
query97	2444	2530	2403	2403
query98	232	217	212	212
query99	986	963	924	924
Total cold run time: 254025 ms
Total hot run time: 183134 ms

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
============================================
q1	17622	4392	4327	4327
q2	q3	10644	769	517	517
q4	4681	355	257	257
q5	7565	1212	1047	1047
q6	177	175	143	143
q7	778	823	671	671
q8	9305	1454	1295	1295
q9	4828	4746	4771	4746
q10	6290	1914	1638	1638
q11	458	248	233	233
q12	734	572	473	473
q13	18044	2968	2175	2175
q14	233	227	207	207
q15	950	792	820	792
q16	758	719	687	687
q17	716	861	412	412
q18	5886	5401	5304	5304
q19	1235	991	585	585
q20	500	489	390	390
q21	4457	1991	1520	1520
q22	380	325	272	272
Total cold run time: 96241 ms
Total hot run time: 27691 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4721	4668	4621	4621
q2	q3	3867	4353	3837	3837
q4	878	1186	777	777
q5	4075	4416	4366	4366
q6	191	176	141	141
q7	1825	1608	1554	1554
q8	2461	2714	2528	2528
q9	7446	7403	7213	7213
q10	3774	4021	3603	3603
q11	521	484	410	410
q12	511	584	443	443
q13	2690	3337	2427	2427
q14	288	300	290	290
q15	844	801	977	801
q16	826	749	715	715
q17	1159	1439	1342	1342
q18	7138	6773	6615	6615
q19	872	852	919	852
q20	2104	2327	1987	1987
q21	3936	3567	3406	3406
q22	454	437	396	396
Total cold run time: 50581 ms
Total hot run time: 48324 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 153471 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 57d6edcf06f74037dbf62d3715269c87e586031b, data reload: false

query5	4385	655	530	530
query6	327	222	207	207
query7	4510	471	280	280
query8	350	250	223	223
query9	9397	2811	2800	2800
query10	530	406	363	363
query11	7436	5865	5552	5552
query12	191	124	123	123
query13	1254	448	338	338
query14	5503	3798	3548	3548
query14_1	2804	2788	2750	2750
query15	198	189	182	182
query16	973	469	466	466
query17	881	703	619	619
query18	2448	455	360	360
query19	222	208	191	191
query20	139	133	134	133
query21	230	148	123	123
query22	4921	5053	4854	4854
query23	15873	15489	15281	15281
query23_1	15679	16162	16128	16128
query24	7730	1704	1263	1263
query24_1	1276	1281	1330	1281
query25	603	525	473	473
query26	1358	309	165	165
query27	3405	505	319	319
query28	4824	1915	1933	1915
query29	908	633	550	550
query30	342	285	317	285
query31	1792	1352	1316	1316
query32	90	81	86	81
query33	538	388	286	286
query34	924	907	586	586
query35	631	686	599	599
query36	1104	1151	1011	1011
query37	132	97	85	85
query38	2930	2953	2852	2852
query39	892	887	847	847
query39_1	833	819	823	819
query40	228	146	133	133
query41	68	60	58	58
query42	306	304	299	299
query43	250	264	216	216
query44	
query45	201	192	183	183
query46	882	989	599	599
query47	2131	2130	2066	2066
query48	308	315	236	236
query49	631	506	380	380
query50	663	278	215	215
query51	4144	4086	4037	4037
query52	286	295	286	286
query53	296	343	282	282
query54	301	269	280	269
query55	90	89	83	83
query56	317	327	323	323
query57	1350	1350	1291	1291
query58	288	279	290	279
query59	1320	1443	1310	1310
query60	381	332	332	332
query61	152	151	161	151
query62	626	595	537	537
query63	323	273	272	272
query64	5153	1297	1000	1000
query65	
query66	1465	457	356	356
query67	16365	16366	16431	16366
query68	
query69	383	322	285	285
query70	1010	1002	855	855
query71	338	304	292	292
query72	2814	2925	2475	2475
query73	556	567	327	327
query74	10025	9940	9746	9746
query75	2852	2762	2468	2468
query76	2301	1021	674	674
query77	374	372	308	308
query78	11198	11200	10635	10635
query79	2957	815	588	588
query80	1745	619	523	523
query81	577	282	245	245
query82	980	154	116	116
query83	333	259	245	245
query84	301	114	102	102
query85	987	565	467	467
query86	410	307	296	296
query87	3199	3093	3037	3037
query88	3555	2623	2631	2623
query89	431	369	343	343
query90	2041	178	173	173
query91	164	159	132	132
query92	83	77	70	70
query93	1172	815	505	505
query94	635	322	296	296
query95	579	341	315	315
query96	659	536	226	226
query97	2495	2472	2398	2398
query98	241	225	216	216
query99	1007	991	928	928
Total cold run time: 238787 ms
Total hot run time: 153471 ms

@linrrzqqq
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
============================================
q1	17630	4526	4287	4287
q2	q3	10646	833	511	511
q4	4675	365	255	255
q5	7562	1189	1015	1015
q6	186	180	151	151
q7	775	896	685	685
q8	9305	1476	1286	1286
q9	4862	4691	4687	4687
q10	6256	1909	1680	1680
q11	456	262	241	241
q12	718	559	471	471
q13	18026	2937	2171	2171
q14	228	233	220	220
q15	907	808	794	794
q16	722	735	669	669
q17	719	856	424	424
q18	6154	5372	5224	5224
q19	1155	997	587	587
q20	507	499	389	389
q21	4484	2041	1536	1536
q22	364	343	283	283
Total cold run time: 96337 ms
Total hot run time: 27566 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4683	4586	4564	4564
q2	q3	3840	4322	3783	3783
q4	884	1208	777	777
q5	4071	4405	4312	4312
q6	174	174	142	142
q7	1804	1610	1506	1506
q8	2499	2672	2749	2672
q9	7777	7331	7276	7276
q10	3742	4022	3611	3611
q11	511	419	413	413
q12	527	671	507	507
q13	2680	3139	2320	2320
q14	279	299	276	276
q15	885	807	814	807
q16	691	762	703	703
q17	1164	1457	1361	1361
q18	7369	6821	6641	6641
q19	842	840	953	840
q20	2037	2177	2004	2004
q21	3905	3492	3290	3290
q22	461	443	374	374
Total cold run time: 50825 ms
Total hot run time: 48179 ms

@doris-robot
Copy link

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

query5	4337	633	527	527
query6	321	220	222	220
query7	4212	489	267	267
query8	350	244	239	239
query9	8711	2793	2784	2784
query10	523	387	337	337
query11	7540	5892	5641	5641
query12	191	133	125	125
query13	1266	472	372	372
query14	5766	3904	3542	3542
query14_1	2851	2852	2860	2852
query15	208	191	175	175
query16	1011	483	458	458
query17	1093	720	614	614
query18	2447	444	362	362
query19	230	213	186	186
query20	134	132	133	132
query21	228	146	133	133
query22	4867	4830	4812	4812
query23	16508	16018	15854	15854
query23_1	15822	15704	15590	15590
query24	7914	1763	1250	1250
query24_1	1245	1226	1243	1226
query25	572	497	439	439
query26	1298	259	149	149
query27	2800	465	287	287
query28	4532	1880	1880	1880
query29	828	562	462	462
query30	308	249	213	213
query31	1337	1288	1230	1230
query32	85	70	75	70
query33	508	336	270	270
query34	942	900	576	576
query35	630	680	596	596
query36	1079	1151	1013	1013
query37	131	105	84	84
query38	2935	2926	2823	2823
query39	875	911	849	849
query39_1	828	809	836	809
query40	231	153	139	139
query41	63	59	59	59
query42	307	300	304	300
query43	236	249	225	225
query44	
query45	195	188	185	185
query46	878	982	623	623
query47	2134	2127	2038	2038
query48	327	315	236	236
query49	620	465	382	382
query50	670	285	214	214
query51	4140	4139	3992	3992
query52	288	292	283	283
query53	294	346	280	280
query54	300	280	275	275
query55	95	85	82	82
query56	325	318	307	307
query57	1404	1348	1252	1252
query58	287	280	269	269
query59	1375	1425	1339	1339
query60	339	341	321	321
query61	154	142	150	142
query62	632	609	537	537
query63	319	270	272	270
query64	5042	1294	1000	1000
query65	
query66	1453	452	350	350
query67	16433	16672	16338	16338
query68	
query69	390	305	294	294
query70	982	985	961	961
query71	332	312	306	306
query72	2708	2661	2652	2652
query73	555	541	315	315
query74	9994	9909	9758	9758
query75	2868	2768	2465	2465
query76	2275	1025	684	684
query77	346	379	312	312
query78	11220	11451	10695	10695
query79	2720	769	616	616
query80	1876	622	545	545
query81	582	279	245	245
query82	1013	152	117	117
query83	343	274	236	236
query84	254	115	95	95
query85	1213	501	430	430
query86	422	325	301	301
query87	3185	3087	2992	2992
query88	3525	2640	2629	2629
query89	425	373	340	340
query90	1870	181	177	177
query91	167	159	133	133
query92	76	77	69	69
query93	2170	882	498	498
query94	667	322	287	287
query95	590	345	317	317
query96	644	519	233	233
query97	2459	2531	2465	2465
query98	239	233	223	223
query99	1045	993	918	918
Total cold run time: 236911 ms
Total hot run time: 153294 ms

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 80.26% (122/152) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.58% (19665/37399)
Line Coverage 36.22% (183534/506789)
Region Coverage 32.31% (141549/438142)
Branch Coverage 33.47% (61777/184564)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 91.45% (139/152) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 73.37% (26868/36621)
Line Coverage 56.66% (286296/505248)
Region Coverage 54.10% (239274/442290)
Branch Coverage 55.73% (103179/185140)

@linrrzqqq
Copy link
Contributor Author

run nonConcurrent

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 91.45% (139/152) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 73.37% (26869/36621)
Line Coverage 56.67% (286315/505248)
Region Coverage 54.10% (239265/442290)
Branch Coverage 55.74% (103189/185140)

@linrrzqqq
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TPC-H: Total hot run time: 26807 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 33c1eb2c83ad9b13c8ea9fba3b735644c19e7f71, 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	17623	4531	4372	4372
q2	q3	10643	767	503	503
q4	4681	359	259	259
q5	7565	1195	1016	1016
q6	180	176	149	149
q7	799	856	690	690
q8	9312	1491	1345	1345
q9	4909	4841	4706	4706
q10	6334	1901	1663	1663
q11	483	268	248	248
q12	745	579	463	463
q13	18052	2932	2184	2184
q14	236	226	221	221
q15	q16	741	711	662	662
q17	715	842	447	447
q18	5866	5378	5218	5218
q19	1290	978	632	632
q20	539	485	374	374
q21	4482	1859	1384	1384
q22	531	411	271	271
Total cold run time: 95726 ms
Total hot run time: 26807 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	4864	4647	4564	4564
q2	q3	3876	4350	3809	3809
q4	919	1213	790	790
q5	4052	4388	4451	4388
q6	184	190	147	147
q7	1753	1644	1522	1522
q8	2541	2680	2555	2555
q9	7526	7477	7355	7355
q10	3722	3997	3713	3713
q11	561	447	427	427
q12	486	597	436	436
q13	2824	3404	2349	2349
q14	302	315	290	290
q15	q16	728	813	711	711
q17	1182	1424	1351	1351
q18	7126	6751	6816	6751
q19	932	920	940	920
q20	2110	2190	2137	2137
q21	4066	3506	3335	3335
q22	465	425	379	379
Total cold run time: 50219 ms
Total hot run time: 47929 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 167951 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 33c1eb2c83ad9b13c8ea9fba3b735644c19e7f71, data reload: false

query5	4351	625	514	514
query6	313	231	211	211
query7	4213	471	262	262
query8	333	251	230	230
query9	8694	2727	2724	2724
query10	550	383	356	356
query11	6988	5088	4886	4886
query12	189	124	118	118
query13	1260	459	339	339
query14	5678	3695	3464	3464
query14_1	2809	2787	2807	2787
query15	205	197	171	171
query16	974	460	443	443
query17	856	695	588	588
query18	2415	439	336	336
query19	212	208	200	200
query20	133	123	121	121
query21	209	132	110	110
query22	13171	13761	14871	13761
query23	15974	16019	15675	15675
query23_1	15745	15614	15711	15614
query24	7859	1606	1233	1233
query24_1	1219	1236	1256	1236
query25	551	492	426	426
query26	1233	260	159	159
query27	2782	487	303	303
query28	4496	1905	1910	1905
query29	924	586	510	510
query30	305	231	192	192
query31	999	948	872	872
query32	86	75	72	72
query33	544	372	315	315
query34	949	930	562	562
query35	683	707	603	603
query36	1132	1169	996	996
query37	137	102	86	86
query38	2959	2947	2989	2947
query39	917	836	818	818
query39_1	809	788	791	788
query40	232	150	136	136
query41	63	62	60	60
query42	259	257	256	256
query43	250	238	216	216
query44	
query45	199	190	185	185
query46	871	982	623	623
query47	2111	3413	2054	2054
query48	324	327	238	238
query49	677	475	383	383
query50	669	271	212	212
query51	4140	4037	4003	4003
query52	261	265	253	253
query53	297	336	281	281
query54	289	263	266	263
query55	97	91	84	84
query56	315	312	303	303
query57	1959	1579	1598	1579
query58	282	279	262	262
query59	2768	2940	2759	2759
query60	332	341	345	341
query61	149	148	149	148
query62	629	576	521	521
query63	308	287	277	277
query64	5099	1271	1000	1000
query65	
query66	1456	451	351	351
query67	24251	24200	24153	24153
query68	
query69	410	315	287	287
query70	1000	971	916	916
query71	330	296	299	296
query72	2769	2672	2099	2099
query73	541	542	325	325
query74	9570	9542	9362	9362
query75	2888	2764	2454	2454
query76	2295	1023	673	673
query77	369	391	310	310
query78	10858	11102	10488	10488
query79	1115	790	571	571
query80	1354	641	561	561
query81	557	273	225	225
query82	1186	154	119	119
query83	345	264	248	248
query84	302	121	113	113
query85	974	568	530	530
query86	420	305	294	294
query87	3150	3125	3053	3053
query88	3566	2712	2712	2712
query89	434	374	352	352
query90	2066	175	176	175
query91	162	159	136	136
query92	74	74	74	74
query93	909	857	496	496
query94	640	307	288	288
query95	575	395	311	311
query96	646	519	234	234
query97	2458	2493	2449	2449
query98	239	228	218	218
query99	992	988	913	913
Total cold run time: 249881 ms
Total hot run time: 167951 ms

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.65% (19725/37463)
Line Coverage 36.26% (184354/508450)
Region Coverage 32.38% (142210/439204)
Branch Coverage 33.56% (62168/185226)

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 11.86% (7/59) 🎉
Increment coverage report
Complete coverage report

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100% (0/0) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.56% (26239/36669)
Line Coverage 54.34% (275349/506737)
Region Coverage 51.63% (228836/443253)
Branch Coverage 52.97% (98368/185708)

@linrrzqqq
Copy link
Contributor Author

run buildall

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 10.34% (6/58) 🎉
Increment coverage report
Complete coverage report

@doris-robot
Copy link

TPC-H: Total hot run time: 26642 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 3b75b7aa2e8782975b1aa7a1a5776759d9d3742e, 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	17610	4589	4310	4310
q2	q3	10646	797	523	523
q4	4676	353	256	256
q5	7559	1204	1016	1016
q6	175	177	145	145
q7	784	849	665	665
q8	9295	1509	1363	1363
q9	4720	4791	4717	4717
q10	6244	1919	1662	1662
q11	471	260	249	249
q12	685	582	458	458
q13	18037	3002	2182	2182
q14	232	238	215	215
q15	q16	752	756	662	662
q17	747	877	395	395
q18	6167	5393	5135	5135
q19	1119	983	608	608
q20	537	489	374	374
q21	4371	1866	1393	1393
q22	351	507	314	314
Total cold run time: 95178 ms
Total hot run time: 26642 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	4765	4574	4572	4572
q2	q3	3899	4400	3813	3813
q4	964	1213	752	752
q5	4107	4427	4363	4363
q6	193	175	145	145
q7	1782	1666	1523	1523
q8	2565	2711	2617	2617
q9	7795	7381	7427	7381
q10	3817	4063	3622	3622
q11	499	445	412	412
q12	496	590	439	439
q13	2779	3168	2387	2387
q14	307	311	280	280
q15	q16	768	771	708	708
q17	1145	1353	1372	1353
q18	7224	6785	6567	6567
q19	864	895	916	895
q20	2042	2152	2130	2130
q21	4041	3555	3351	3351
q22	549	469	389	389
Total cold run time: 50601 ms
Total hot run time: 47699 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 168294 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 3b75b7aa2e8782975b1aa7a1a5776759d9d3742e, data reload: false

query5	4331	646	523	523
query6	357	240	213	213
query7	4237	495	274	274
query8	352	244	233	233
query9	8740	2709	2698	2698
query10	544	389	342	342
query11	7008	5105	4875	4875
query12	186	132	132	132
query13	1297	460	348	348
query14	5775	3728	3453	3453
query14_1	2837	2806	2850	2806
query15	205	200	181	181
query16	978	487	441	441
query17	906	745	654	654
query18	2453	478	377	377
query19	223	213	188	188
query20	139	130	131	130
query21	216	137	114	114
query22	13275	14105	14683	14105
query23	16427	15732	15783	15732
query23_1	15623	15476	15267	15267
query24	7220	1609	1279	1279
query24_1	1210	1244	1229	1229
query25	549	473	409	409
query26	1246	260	145	145
query27	2776	479	294	294
query28	4462	1857	1866	1857
query29	830	571	479	479
query30	300	230	192	192
query31	1041	951	865	865
query32	90	67	72	67
query33	516	317	282	282
query34	903	871	510	510
query35	649	692	601	601
query36	1087	1188	944	944
query37	141	93	83	83
query38	2975	2947	2907	2907
query39	855	843	800	800
query39_1	791	792	806	792
query40	232	154	136	136
query41	63	62	63	62
query42	260	252	257	252
query43	243	239	227	227
query44	
query45	196	190	182	182
query46	891	967	614	614
query47	3041	2161	2083	2083
query48	319	326	226	226
query49	647	452	377	377
query50	682	274	213	213
query51	4112	4032	4002	4002
query52	263	273	253	253
query53	290	335	285	285
query54	300	268	258	258
query55	95	87	87	87
query56	321	323	312	312
query57	1917	1685	1668	1668
query58	287	272	269	269
query59	2814	2944	2766	2766
query60	340	340	328	328
query61	157	152	158	152
query62	633	588	546	546
query63	314	280	280	280
query64	5062	1290	1009	1009
query65	
query66	1468	460	354	354
query67	24231	24276	24154	24154
query68	
query69	396	317	292	292
query70	935	957	929	929
query71	341	311	310	310
query72	2734	2715	2431	2431
query73	544	544	318	318
query74	9630	9581	9408	9408
query75	2860	2740	2463	2463
query76	2280	1033	695	695
query77	374	364	318	318
query78	10914	11200	10506	10506
query79	1106	823	574	574
query80	808	632	563	563
query81	512	265	223	223
query82	1323	157	125	125
query83	359	277	258	258
query84	295	112	94	94
query85	971	507	449	449
query86	389	296	293	293
query87	3153	3109	3012	3012
query88	3536	2649	2664	2649
query89	425	365	337	337
query90	1864	181	174	174
query91	170	166	146	146
query92	87	77	71	71
query93	921	872	501	501
query94	471	322	284	284
query95	597	356	328	328
query96	663	513	227	227
query97	2483	2489	2396	2396
query98	241	223	221	221
query99	974	959	923	923
Total cold run time: 249689 ms
Total hot run time: 168294 ms

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.65% (19771/37550)
Line Coverage 36.21% (184538/509671)
Region Coverage 32.38% (142348/439662)
Branch Coverage 33.53% (62256/185688)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100% (0/0) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.50% (26279/36756)
Line Coverage 54.32% (275914/507957)
Region Coverage 51.48% (228429/443711)
Branch Coverage 52.95% (98574/186170)

@linrrzqqq
Copy link
Contributor Author

run feut

@zclllyybb
Copy link
Contributor

/review

@github-actions
Copy link
Contributor

Code Review Summary: Feature Support table function json_each, json_each_text

Overall Assessment: No blocking issues found. This is a clean, well-structured feature addition.

This PR adds two new table generating functions (json_each, json_each_text) and their _outer variants, following the established explode_json_object pattern closely while incorporating improvements (const column optimization, explicit nullable handling, template-based code sharing).


Critical Checkpoint Conclusions

1. Goal and correctness:
The goal is to add PostgreSQL-compatible json_each / json_each_text table functions that expand top-level JSON object keys into rows. The implementation correctly accomplishes this. Both BE unit tests and regression tests (30 test cases) prove correctness across normal, edge, and negative cases.

2. Modification scope:
The change is focused and minimal: 4 new FE classes (JsonEach/JsonEachText + Outer variants), 2 new BE files (vjson_each.h/.cpp), registration in 3 existing files, and comprehensive tests. No unrelated modifications.

3. Concurrency:
Not applicable — table functions operate within a single pipeline task context with no shared mutable state across threads.

4. Lifecycle management:
Verified correct. _kv_pairs and _json_column are properly nulled in process_close(), and _cur_size is reset to 0. The process_initprocess_row(0..N)process_close lifecycle is correctly maintained per block. The const column optimization is correct: base class TableFunction::process_row() conditionally preserves _cur_size when _is_const, allowing safe reuse of parsed _kv_pairs across rows within a block.

5. Configuration items:
None added — not applicable.

6. Incompatible changes:
None — this is a purely additive feature with no storage format or protocol changes.

7. Parallel code paths:
The implementation correctly mirrors explode_json_object patterns. All four FE/BE registration points are complete: BuiltinTableGeneratingFunctions, TableGeneratingFunctionVisitor, table_function_factory.cpp, and function_fake.cpp. The _outer suffix is handled by the existing generic framework (suffix stripping + set_outer()).

8. Special conditional checks:
The !jv->isObject() early-return (producing 0 rows for non-objects) correctly implements json_each semantics. The _is_const && _cur_size > 0 optimization has clear intent from context.

9. Test coverage:

  • Regression tests: 30 test cases covering json_each, json_each_text, outer variants, multiple LATERAL VIEWs, and corner cases (deep nesting, special chars, large objects, empty keys, const inputs). Tests follow all Doris standards: ORDER BY for determinism, DROP TABLE IF EXISTS before create, hardcoded table names, auto-generated .out file.
  • BE unit tests: 6 Google Test cases covering both variants, get_same_many_values, outer semantics, NULL/empty/non-object inputs.
  • No FE unit tests, but the FE classes are pure boilerplate (signature + visitor dispatch) with no logic to test.

10. Observability:
Not needed — table functions do not require dedicated metrics or logging beyond what the pipeline framework provides.

11. Transaction/persistence:
Not applicable — no metadata or EditLog changes.

12. Data writes:
Not applicable — read-only table function.

13. FE-BE variable passing:
Function names are passed via Thrift string (TFunction.name.function_name). No new Thrift types needed. Factory registration verified correct for both base and outer variants.

14. Performance:

  • Template design (TEXT_MODE) avoids code duplication with zero runtime cost.
  • Const column optimization avoids redundant JSON re-parsing (improvement over explode_json_object which lacks this).
  • JsonbWriter is reused across iterations (not recreated per key-value pair) in the JSON mode loop.
  • The (int)(_cur_size - _cur_offset) C-style narrowing cast in get_value is consistent with all 9 other table functions in the codebase — not a new concern.
  • compile_check_begin.h / compile_check_end.h are properly paired in both new files.

15. Other observations:

  • The DCHECK→DORIS_CHECK migration in function_fake.cpp is a good improvement (assertions survive release builds).
  • The _is_const field reuse from the base class is correct — the base class conditionally resets _cur_size based on _is_const, and reset() always resets _cur_offset and _eos.
  • ColumnNullable::insert_data() correctly maintains null map sync for both null and non-null insertions — verified against the implementation.

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.

7 participants