Skip to content

Conversation

@amorynan
Copy link
Contributor

@amorynan amorynan commented Feb 8, 2025

What problem does this PR solve?

This PR enhances the value parameter of the json_object function as a complex type which refer to postgresql
https://www.postgresql.org/docs/current/functions-json.html

json_object ( [ { key_expression { VALUE | ':' } value_expression [ FORMAT JSON [ ENCODING UTF8 ] ] }[, ...] ] [ { NULL | ABSENT } ON NULL ] [ { WITH | WITHOUT } UNIQUE [ KEYS ] ] [ RETURNING data_type [ FORMAT JSON [ ENCODING UTF8 ] ] ])

Constructs a JSON object of all the key/value pairs given, or an empty object if none are given. key_expression is a scalar expression defining the JSON key, which is converted to the text type. It cannot be NULL nor can it belong to a type that has a cast to the json type. If WITH UNIQUE KEYS is specified, there must not be any duplicate key_expression. Any pair for which the value_expression evaluates to NULL is omitted from the output if ABSENT ON NULL is specified; if NULL ON NULL is specified or the clause omitted, the key is included with value NULL.

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

Release note

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

@Thearas
Copy link
Contributor

Thearas commented Feb 8, 2025

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?

@amorynan
Copy link
Contributor Author

amorynan commented Feb 8, 2025

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17637	5228	5082	5082
q2	2043	303	168	168
q3	10707	1251	741	741
q4	10529	1000	509	509
q5	7512	2414	2277	2277
q6	185	162	132	132
q7	914	742	591	591
q8	9328	1268	954	954
q9	4940	4726	4846	4726
q10	6820	2303	1872	1872
q11	489	275	255	255
q12	346	345	217	217
q13	17825	3707	3072	3072
q14	239	223	205	205
q15	508	469	467	467
q16	634	620	583	583
q17	574	858	347	347
q18	7094	6257	6132	6132
q19	1195	973	545	545
q20	307	318	188	188
q21	2730	2261	1985	1985
q22	358	333	297	297
Total cold run time: 102914 ms
Total hot run time: 31345 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5148	5101	5088	5088
q2	229	323	231	231
q3	2185	2700	2286	2286
q4	1431	1805	1354	1354
q5	4197	4218	4155	4155
q6	208	174	126	126
q7	1948	1899	1777	1777
q8	2680	2602	2623	2602
q9	7339	7264	7283	7264
q10	3068	3281	2835	2835
q11	570	515	479	479
q12	685	814	650	650
q13	3413	3969	3230	3230
q14	287	289	297	289
q15	523	458	465	458
q16	648	686	650	650
q17	1129	1591	1368	1368
q18	7591	7382	7359	7359
q19	760	753	798	753
q20	1996	2039	1929	1929
q21	5453	4969	4657	4657
q22	598	571	538	538
Total cold run time: 52086 ms
Total hot run time: 50078 ms

@doris-robot
Copy link

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

query1	1317	954	926	926
query2	6356	1906	1882	1882
query3	10977	4538	4554	4538
query4	53241	24494	23470	23470
query5	5217	640	474	474
query6	331	198	185	185
query7	4883	498	294	294
query8	316	248	232	232
query9	6342	2646	2654	2646
query10	463	343	276	276
query11	15687	15472	15302	15302
query12	409	107	104	104
query13	1981	517	397	397
query14	13053	6398	6479	6398
query15	215	203	173	173
query16	7141	661	456	456
query17	1075	700	541	541
query18	1530	399	305	305
query19	197	189	154	154
query20	130	126	127	126
query21	211	126	111	111
query22	4576	4725	4450	4450
query23	34090	33513	33333	33333
query24	5790	2435	2400	2400
query25	471	445	385	385
query26	740	280	158	158
query27	1860	479	333	333
query28	2802	2428	2439	2428
query29	566	585	463	463
query30	205	189	163	163
query31	886	894	845	845
query32	89	62	66	62
query33	446	345	284	284
query34	777	860	503	503
query35	846	835	740	740
query36	1001	1037	930	930
query37	123	108	86	86
query38	4441	4449	4360	4360
query39	1504	1417	1430	1417
query40	203	111	109	109
query41	60	60	55	55
query42	123	105	109	105
query43	541	526	501	501
query44	1311	820	798	798
query45	184	178	171	171
query46	890	1081	665	665
query47	1898	1893	1794	1794
query48	391	417	345	345
query49	674	498	425	425
query50	709	747	418	418
query51	4240	4337	4227	4227
query52	111	102	92	92
query53	232	259	187	187
query54	480	512	406	406
query55	88	77	77	77
query56	268	277	247	247
query57	1165	1188	1128	1128
query58	234	241	241	241
query59	2885	2915	2743	2743
query60	288	281	258	258
query61	128	121	116	116
query62	741	776	677	677
query63	225	184	189	184
query64	1752	1031	681	681
query65	3280	3250	3128	3128
query66	794	405	314	314
query67	15742	15696	15516	15516
query68	4959	768	516	516
query69	468	310	271	271
query70	1228	1110	1184	1110
query71	427	298	273	273
query72	6443	3622	3726	3622
query73	1241	729	342	342
query74	9100	9324	8914	8914
query75	3205	3207	2757	2757
query76	3644	1177	718	718
query77	493	378	273	273
query78	10090	10144	9223	9223
query79	1657	812	570	570
query80	1531	525	433	433
query81	539	266	236	236
query82	405	150	120	120
query83	250	173	149	149
query84	281	95	73	73
query85	773	334	362	334
query86	376	303	295	295
query87	4403	4476	4503	4476
query88	2816	2197	2172	2172
query89	386	305	289	289
query90	1547	188	189	188
query91	130	139	112	112
query92	56	62	60	60
query93	1328	1013	569	569
query94	692	405	286	286
query95	340	263	258	258
query96	482	548	265	265
query97	2820	2917	2744	2744
query98	240	205	204	204
query99	1323	1370	1240	1240
Total cold run time: 295595 ms
Total hot run time: 191030 ms

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 42.60% (11159/26197)
Line Coverage: 32.63% (93875/287732)
Region Coverage: 31.80% (48157/151436)
Branch Coverage: 27.72% (24311/87712)
Coverage Report: http://coverage.selectdb-in.cc/coverage/fb1a582ecf429f88759eb9016521e52aae9b6dca_fb1a582ecf429f88759eb9016521e52aae9b6dca/report/index.html

@doris-robot
Copy link

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

query1	0.04	0.03	0.02
query2	0.07	0.03	0.04
query3	0.24	0.06	0.06
query4	1.63	0.11	0.10
query5	0.40	0.40	0.39
query6	1.16	0.66	0.65
query7	0.02	0.02	0.01
query8	0.04	0.03	0.03
query9	0.58	0.52	0.54
query10	0.57	0.57	0.58
query11	0.15	0.10	0.11
query12	0.14	0.12	0.12
query13	0.61	0.61	0.61
query14	2.68	2.68	2.80
query15	0.92	0.86	0.86
query16	0.38	0.38	0.38
query17	1.03	1.02	1.03
query18	0.23	0.19	0.19
query19	1.94	1.82	2.00
query20	0.01	0.01	0.02
query21	15.36	0.89	0.55
query22	0.76	1.21	0.74
query23	14.78	1.37	0.66
query24	6.74	1.71	1.37
query25	0.49	0.23	0.05
query26	0.56	0.16	0.14
query27	0.06	0.05	0.05
query28	9.85	0.82	0.41
query29	12.54	3.99	3.34
query30	0.24	0.08	0.06
query31	2.82	0.58	0.38
query32	3.23	0.55	0.46
query33	2.96	3.00	3.03
query34	15.80	5.10	4.47
query35	4.53	4.50	4.52
query36	0.65	0.49	0.47
query37	0.09	0.06	0.06
query38	0.06	0.04	0.04
query39	0.03	0.03	0.02
query40	0.17	0.14	0.12
query41	0.08	0.02	0.02
query42	0.04	0.02	0.02
query43	0.03	0.04	0.02
Total cold run time: 104.71 s
Total hot run time: 31.12 s

@amorynan
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17726	5226	5077	5077
q2	2052	313	172	172
q3	10511	1241	740	740
q4	10218	1021	531	531
q5	7875	2370	2319	2319
q6	185	167	143	143
q7	908	768	603	603
q8	9342	1215	1096	1096
q9	4926	4694	4679	4679
q10	6820	2292	1902	1902
q11	491	279	251	251
q12	357	351	221	221
q13	18405	3702	3058	3058
q14	220	241	205	205
q15	526	472	461	461
q16	632	626	579	579
q17	575	849	349	349
q18	6753	6275	6259	6259
q19	1198	943	565	565
q20	316	327	194	194
q21	2929	2206	1983	1983
q22	363	330	296	296
Total cold run time: 103328 ms
Total hot run time: 31683 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5133	5135	5202	5135
q2	238	333	243	243
q3	2162	2699	2255	2255
q4	1410	1825	1391	1391
q5	4251	4088	4182	4088
q6	207	167	127	127
q7	1899	1791	1758	1758
q8	2580	2587	2611	2587
q9	7106	7089	7042	7042
q10	2999	3205	2827	2827
q11	578	538	501	501
q12	735	792	672	672
q13	3702	4176	3605	3605
q14	308	298	285	285
q15	545	477	462	462
q16	644	699	672	672
q17	1169	1669	1366	1366
q18	7991	7532	7290	7290
q19	2089	900	891	891
q20	1975	2028	1876	1876
q21	5492	4882	4990	4882
q22	646	601	544	544
Total cold run time: 53859 ms
Total hot run time: 50499 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 190649 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 4d6f2b31fdbb7cec466db1db520bdab1d11699f3, data reload: false

query1	1325	957	933	933
query2	6442	1908	1921	1908
query3	10929	4605	4556	4556
query4	56071	25519	22956	22956
query5	5202	561	493	493
query6	371	196	188	188
query7	5053	505	298	298
query8	325	251	220	220
query9	6305	2471	2468	2468
query10	416	318	247	247
query11	15120	15005	15026	15005
query12	158	105	107	105
query13	1137	549	385	385
query14	10176	6689	7005	6689
query15	218	211	185	185
query16	7090	641	497	497
query17	1110	756	570	570
query18	1579	432	319	319
query19	209	197	175	175
query20	135	127	134	127
query21	216	138	113	113
query22	4370	4571	4297	4297
query23	34163	33585	33431	33431
query24	5891	2409	2451	2409
query25	482	482	401	401
query26	694	279	162	162
query27	1806	479	351	351
query28	2807	2455	2379	2379
query29	618	561	434	434
query30	212	195	151	151
query31	905	862	807	807
query32	72	66	59	59
query33	438	382	302	302
query34	787	861	527	527
query35	788	827	762	762
query36	986	1029	938	938
query37	134	104	80	80
query38	4232	4404	4184	4184
query39	1520	1451	1429	1429
query40	210	121	107	107
query41	51	54	50	50
query42	125	105	106	105
query43	516	532	501	501
query44	1369	827	821	821
query45	182	171	165	165
query46	888	1080	673	673
query47	1867	1904	1785	1785
query48	399	425	319	319
query49	697	509	434	434
query50	735	759	428	428
query51	4244	4331	4247	4247
query52	113	109	95	95
query53	247	262	192	192
query54	493	523	424	424
query55	89	82	83	82
query56	278	289	293	289
query57	1149	1207	1092	1092
query58	248	239	255	239
query59	2916	2852	2691	2691
query60	304	284	277	277
query61	120	118	117	117
query62	746	730	709	709
query63	232	185	202	185
query64	1735	1058	698	698
query65	3294	3184	3143	3143
query66	757	394	344	344
query67	15784	15523	15471	15471
query68	5393	792	527	527
query69	518	294	268	268
query70	1226	1112	1109	1109
query71	431	305	266	266
query72	6007	3715	3792	3715
query73	1227	753	362	362
query74	9145	9095	8858	8858
query75	3290	3132	2680	2680
query76	3887	1186	750	750
query77	546	372	295	295
query78	10013	9860	9388	9388
query79	2615	808	609	609
query80	624	527	484	484
query81	496	282	240	240
query82	521	149	124	124
query83	171	174	160	160
query84	283	92	75	75
query85	784	349	303	303
query86	410	303	282	282
query87	4415	4600	4420	4420
query88	3583	2221	2210	2210
query89	415	329	278	278
query90	1917	192	198	192
query91	137	143	109	109
query92	66	64	59	59
query93	1979	1032	590	590
query94	680	413	290	290
query95	354	275	259	259
query96	483	619	271	271
query97	2841	2858	2717	2717
query98	238	226	195	195
query99	1671	1370	1341	1341
Total cold run time: 296646 ms
Total hot run time: 190649 ms

@eldenmoon
Copy link
Member

need to modify document

@doris-robot
Copy link

ClickBench: Total hot run time: 30.74 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 4d6f2b31fdbb7cec466db1db520bdab1d11699f3, data reload: false

query1	0.03	0.03	0.05
query2	0.08	0.03	0.03
query3	0.23	0.06	0.07
query4	1.63	0.10	0.10
query5	0.42	0.41	0.40
query6	1.17	0.65	0.66
query7	0.02	0.01	0.02
query8	0.04	0.03	0.03
query9	0.60	0.51	0.51
query10	0.56	0.56	0.56
query11	0.15	0.11	0.10
query12	0.15	0.11	0.11
query13	0.62	0.60	0.61
query14	2.72	2.83	2.84
query15	0.92	0.84	0.84
query16	0.38	0.38	0.37
query17	1.01	1.03	1.04
query18	0.21	0.19	0.20
query19	1.91	1.74	1.94
query20	0.01	0.01	0.01
query21	15.36	0.90	0.54
query22	0.74	1.19	0.71
query23	14.91	1.39	0.59
query24	7.27	1.06	0.99
query25	0.50	0.13	0.25
query26	0.69	0.17	0.13
query27	0.05	0.04	0.04
query28	9.84	0.85	0.42
query29	12.55	4.02	3.36
query30	0.25	0.09	0.06
query31	2.82	0.61	0.38
query32	3.24	0.54	0.46
query33	2.95	3.02	3.02
query34	15.66	5.12	4.44
query35	4.52	4.50	4.50
query36	0.66	0.49	0.47
query37	0.09	0.06	0.06
query38	0.05	0.04	0.03
query39	0.03	0.02	0.02
query40	0.16	0.13	0.13
query41	0.08	0.02	0.02
query42	0.03	0.02	0.02
query43	0.04	0.03	0.02
Total cold run time: 105.35 s
Total hot run time: 30.74 s

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 42.61% (11170/26216)
Line Coverage: 32.64% (93968/287936)
Region Coverage: 31.79% (48197/151604)
Branch Coverage: 27.71% (24338/87838)
Coverage Report: http://coverage.selectdb-in.cc/coverage/4d6f2b31fdbb7cec466db1db520bdab1d11699f3_4d6f2b31fdbb7cec466db1db520bdab1d11699f3/report/index.html

@amorynan
Copy link
Contributor Author

run buildall

@amorynan
Copy link
Contributor Author

need to modify document

add pr doc : apache/doris-website#2008

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17578	5101	5024	5024
q2	2046	312	174	174
q3	10378	1237	742	742
q4	10210	1019	539	539
q5	7537	2385	2303	2303
q6	189	166	136	136
q7	918	751	601	601
q8	9294	1286	1068	1068
q9	4863	4793	4859	4793
q10	6795	2327	1886	1886
q11	486	269	256	256
q12	341	350	219	219
q13	18054	3729	3083	3083
q14	222	225	214	214
q15	518	456	459	456
q16	634	606	590	590
q17	571	868	346	346
q18	6925	6295	6247	6247
q19	1211	951	561	561
q20	310	328	198	198
q21	2781	2196	1975	1975
q22	353	320	310	310
Total cold run time: 102214 ms
Total hot run time: 31721 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5119	5127	5131	5127
q2	240	325	226	226
q3	2210	2721	2354	2354
q4	1506	1824	1363	1363
q5	4266	4161	4203	4161
q6	207	164	126	126
q7	1851	1856	1731	1731
q8	2656	2650	2588	2588
q9	7277	7322	7214	7214
q10	3046	3314	2919	2919
q11	595	532	498	498
q12	721	826	678	678
q13	3616	4165	3563	3563
q14	296	296	299	296
q15	530	474	472	472
q16	672	711	683	683
q17	1153	1647	1365	1365
q18	7791	7343	7389	7343
q19	784	850	859	850
q20	1961	2131	1885	1885
q21	5328	5050	4842	4842
q22	669	603	573	573
Total cold run time: 52494 ms
Total hot run time: 50857 ms

@doris-robot
Copy link

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

query1	1314	958	948	948
query2	6232	1926	1917	1917
query3	10999	4496	4389	4389
query4	25484	23771	23465	23465
query5	5098	661	490	490
query6	309	197	194	194
query7	3994	484	313	313
query8	313	235	234	234
query9	8536	2499	2482	2482
query10	498	296	250	250
query11	15701	15004	14912	14912
query12	178	111	106	106
query13	1645	509	377	377
query14	10030	6661	6098	6098
query15	205	187	172	172
query16	7603	621	461	461
query17	1167	717	569	569
query18	2019	392	306	306
query19	195	187	165	165
query20	118	131	124	124
query21	209	134	106	106
query22	4567	4625	4596	4596
query23	34461	33614	33440	33440
query24	6267	2415	2412	2412
query25	518	491	418	418
query26	736	280	155	155
query27	2162	490	336	336
query28	2921	2452	2379	2379
query29	639	606	450	450
query30	222	195	211	195
query31	889	917	813	813
query32	73	65	61	61
query33	483	354	301	301
query34	808	881	482	482
query35	838	841	743	743
query36	1022	1016	908	908
query37	129	103	79	79
query38	4283	4348	4258	4258
query39	1509	1464	1453	1453
query40	214	116	102	102
query41	52	50	54	50
query42	127	99	101	99
query43	502	523	497	497
query44	1281	773	789	773
query45	189	173	166	166
query46	896	1059	658	658
query47	1941	1961	1810	1810
query48	396	426	314	314
query49	723	534	439	439
query50	699	758	419	419
query51	4308	4358	4169	4169
query52	106	103	99	99
query53	226	257	185	185
query54	498	490	410	410
query55	88	83	78	78
query56	263	267	241	241
query57	1159	1231	1174	1174
query58	245	247	246	246
query59	2829	2950	2694	2694
query60	284	279	270	270
query61	115	113	114	113
query62	785	731	677	677
query63	220	193	194	193
query64	2880	1041	668	668
query65	3343	3235	3239	3235
query66	792	403	299	299
query67	16095	15612	15391	15391
query68	8168	749	495	495
query69	488	300	267	267
query70	1202	1120	1103	1103
query71	461	296	259	259
query72	5138	3541	3722	3541
query73	716	721	337	337
query74	9231	8987	8805	8805
query75	3194	3161	2677	2677
query76	3191	1166	714	714
query77	527	365	275	275
query78	10095	9998	9328	9328
query79	2701	792	582	582
query80	651	518	444	444
query81	510	292	250	250
query82	218	150	117	117
query83	173	165	146	146
query84	245	87	70	70
query85	737	348	308	308
query86	380	302	306	302
query87	4346	4471	4359	4359
query88	3960	2191	2238	2191
query89	388	313	284	284
query90	1756	187	191	187
query91	139	139	109	109
query92	70	58	52	52
query93	2259	1000	564	564
query94	670	410	288	288
query95	350	256	255	255
query96	483	559	273	273
query97	2796	2815	2766	2766
query98	229	208	191	191
query99	1352	1406	1256	1256
Total cold run time: 272454 ms
Total hot run time: 189821 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.06
query2	0.07	0.03	0.03
query3	0.24	0.07	0.07
query4	1.61	0.10	0.10
query5	0.41	0.41	0.39
query6	1.17	0.66	0.67
query7	0.03	0.02	0.01
query8	0.04	0.03	0.04
query9	0.59	0.52	0.52
query10	0.57	0.59	0.57
query11	0.15	0.10	0.11
query12	0.15	0.11	0.12
query13	0.61	0.60	0.60
query14	2.69	2.78	2.72
query15	0.92	0.85	0.86
query16	0.38	0.38	0.38
query17	1.01	1.06	1.02
query18	0.21	0.20	0.19
query19	1.92	1.78	1.99
query20	0.01	0.01	0.01
query21	15.42	0.90	0.54
query22	0.77	1.37	0.82
query23	14.72	1.41	0.62
query24	6.99	2.18	0.41
query25	0.30	0.14	0.14
query26	0.64	0.17	0.14
query27	0.05	0.05	0.04
query28	8.61	0.81	0.43
query29	12.54	3.95	3.31
query30	0.24	0.09	0.06
query31	2.84	0.60	0.38
query32	3.23	0.54	0.46
query33	2.95	3.14	3.02
query34	15.70	5.10	4.48
query35	4.56	4.51	4.47
query36	0.67	0.49	0.48
query37	0.09	0.06	0.06
query38	0.04	0.04	0.04
query39	0.03	0.02	0.02
query40	0.18	0.14	0.14
query41	0.08	0.03	0.03
query42	0.04	0.02	0.02
query43	0.03	0.03	0.03
Total cold run time: 103.53 s
Total hot run time: 30.31 s

@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Feb 10, 2025
@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@amorynan
Copy link
Contributor Author

run beut

@amorynan
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17637	5220	5073	5073
q2	2043	296	169	169
q3	10419	1259	751	751
q4	10197	987	520	520
q5	7528	2434	2269	2269
q6	189	164	132	132
q7	894	737	606	606
q8	9293	1280	1056	1056
q9	4830	4617	4740	4617
q10	6806	2307	1871	1871
q11	479	268	257	257
q12	347	354	210	210
q13	17774	3693	3050	3050
q14	231	235	202	202
q15	504	460	472	460
q16	649	625	566	566
q17	567	864	345	345
q18	7040	6291	6203	6203
q19	1681	958	532	532
q20	319	309	184	184
q21	2773	2176	1945	1945
q22	364	329	297	297
Total cold run time: 102564 ms
Total hot run time: 31315 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5160	5143	5126	5126
q2	244	332	230	230
q3	2167	2678	2274	2274
q4	1386	1823	1378	1378
q5	4246	4127	4179	4127
q6	215	169	124	124
q7	1827	1812	1672	1672
q8	2598	2701	2618	2618
q9	7231	7203	7162	7162
q10	3017	3225	2789	2789
q11	569	532	505	505
q12	715	788	645	645
q13	3352	3961	3311	3311
q14	308	288	263	263
q15	519	471	473	471
q16	626	701	635	635
q17	1127	1622	1315	1315
q18	7442	7450	7224	7224
q19	802	821	918	821
q20	1953	2039	1875	1875
q21	5478	4941	4696	4696
q22	620	580	531	531
Total cold run time: 51602 ms
Total hot run time: 49792 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 189206 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 81661d7b87947b28c9daa41117491c3a79a8e7c6, data reload: false

query1	1286	958	946	946
query2	6227	1854	1825	1825
query3	10994	4412	4254	4254
query4	54600	25727	22869	22869
query5	4806	545	496	496
query6	333	200	190	190
query7	5161	521	304	304
query8	303	244	226	226
query9	5484	2510	2482	2482
query10	433	313	254	254
query11	15021	14961	15017	14961
query12	164	108	107	107
query13	1043	529	414	414
query14	10170	6585	6259	6259
query15	204	198	193	193
query16	7107	647	496	496
query17	1071	741	584	584
query18	1554	438	342	342
query19	216	204	172	172
query20	135	135	120	120
query21	206	127	109	109
query22	4604	4535	4280	4280
query23	33910	33400	33505	33400
query24	6190	2406	2425	2406
query25	455	463	409	409
query26	711	290	155	155
query27	1910	490	333	333
query28	3105	2450	2407	2407
query29	585	607	430	430
query30	220	187	157	157
query31	913	893	808	808
query32	90	67	59	59
query33	435	364	304	304
query34	776	852	522	522
query35	797	847	772	772
query36	993	1002	875	875
query37	129	105	79	79
query38	4265	4513	4334	4334
query39	1495	1462	1402	1402
query40	214	117	116	116
query41	50	49	50	49
query42	119	106	109	106
query43	497	512	483	483
query44	1346	818	811	811
query45	185	169	162	162
query46	902	1082	674	674
query47	1839	1948	1791	1791
query48	382	423	314	314
query49	683	527	435	435
query50	731	756	425	425
query51	4315	4268	4237	4237
query52	109	107	102	102
query53	248	268	192	192
query54	478	502	399	399
query55	82	82	81	81
query56	272	282	272	272
query57	1187	1199	1159	1159
query58	252	246	251	246
query59	2898	2811	2703	2703
query60	306	285	265	265
query61	121	123	137	123
query62	764	765	695	695
query63	225	198	187	187
query64	1718	1047	675	675
query65	3271	3137	3155	3137
query66	725	394	302	302
query67	16030	15657	15366	15366
query68	5604	772	521	521
query69	520	303	268	268
query70	1256	1113	1124	1113
query71	458	291	267	267
query72	6340	3619	3821	3619
query73	1385	762	357	357
query74	9000	9194	8748	8748
query75	3229	3171	2671	2671
query76	3749	1164	746	746
query77	561	372	329	329
query78	10127	10090	9264	9264
query79	2700	818	611	611
query80	825	515	454	454
query81	537	286	235	235
query82	494	148	124	124
query83	191	167	151	151
query84	292	87	80	80
query85	774	344	302	302
query86	406	301	307	301
query87	4458	4520	4311	4311
query88	3752	2200	2179	2179
query89	411	314	301	301
query90	1782	194	193	193
query91	139	136	108	108
query92	79	61	57	57
query93	2579	1010	577	577
query94	688	393	294	294
query95	341	263	262	262
query96	516	555	276	276
query97	2863	2834	2783	2783
query98	243	207	202	202
query99	1331	1378	1260	1260
Total cold run time: 295680 ms
Total hot run time: 189206 ms

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 42.80% (11261/26310)
Line Coverage: 32.77% (94575/288574)
Region Coverage: 31.93% (48480/151838)
Branch Coverage: 27.80% (24452/87944)
Coverage Report: http://coverage.selectdb-in.cc/coverage/81661d7b87947b28c9daa41117491c3a79a8e7c6_81661d7b87947b28c9daa41117491c3a79a8e7c6/report/index.html

@doris-robot
Copy link

ClickBench: Total hot run time: 30.62 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 81661d7b87947b28c9daa41117491c3a79a8e7c6, data reload: false

query1	0.04	0.04	0.04
query2	0.08	0.03	0.03
query3	0.23	0.08	0.06
query4	1.61	0.10	0.10
query5	0.43	0.42	0.40
query6	1.17	0.66	0.65
query7	0.02	0.02	0.02
query8	0.04	0.04	0.03
query9	0.60	0.53	0.54
query10	0.57	0.58	0.58
query11	0.16	0.11	0.11
query12	0.14	0.11	0.11
query13	0.63	0.60	0.61
query14	2.84	2.73	2.75
query15	0.92	0.86	0.85
query16	0.37	0.37	0.37
query17	1.05	1.01	1.06
query18	0.22	0.19	0.19
query19	1.89	1.79	1.98
query20	0.01	0.01	0.01
query21	15.41	0.93	0.55
query22	0.78	1.37	0.76
query23	14.74	1.39	0.58
query24	7.40	1.07	0.78
query25	0.50	0.15	0.17
query26	0.58	0.16	0.13
query27	0.05	0.05	0.05
query28	9.44	0.90	0.42
query29	12.55	3.93	3.23
query30	0.25	0.08	0.06
query31	2.82	0.58	0.38
query32	3.22	0.55	0.47
query33	2.99	3.02	3.04
query34	15.76	5.14	4.52
query35	4.51	4.50	4.57
query36	0.66	0.49	0.49
query37	0.09	0.06	0.06
query38	0.05	0.04	0.04
query39	0.03	0.02	0.02
query40	0.18	0.14	0.13
query41	0.08	0.03	0.02
query42	0.04	0.02	0.03
query43	0.03	0.03	0.03
Total cold run time: 105.18 s
Total hot run time: 30.62 s

@amorynan
Copy link
Contributor Author

run cloud_p0

Copy link
Member

@eldenmoon eldenmoon left a comment

Choose a reason for hiding this comment

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

LGTM

@eldenmoon eldenmoon merged commit 3c1d7d2 into apache:master Feb 11, 2025
23 of 24 checks passed
github-actions bot pushed a commit that referenced this pull request Feb 11, 2025
This PR enhances the value parameter of the json_object function as a
complex type which refer to postgresql
https://www.postgresql.org/docs/current/functions-json.html 
```
json_object ( [ { key_expression { VALUE | ':' } value_expression [ FORMAT JSON [ ENCODING UTF8 ] ] }[, ...] ] [ { NULL | ABSENT } ON NULL ] [ { WITH | WITHOUT } UNIQUE [ KEYS ] ] [ RETURNING data_type [ FORMAT JSON [ ENCODING UTF8 ] ] ])

Constructs a JSON object of all the key/value pairs given, or an empty object if none are given. key_expression is a scalar expression defining the JSON key, which is converted to the text type. It cannot be NULL nor can it belong to a type that has a cast to the json type. If WITH UNIQUE KEYS is specified, there must not be any duplicate key_expression. Any pair for which the value_expression evaluates to NULL is omitted from the output if ABSENT ON NULL is specified; if NULL ON NULL is specified or the clause omitted, the key is included with value NULL.
```
github-actions bot pushed a commit that referenced this pull request Feb 11, 2025
This PR enhances the value parameter of the json_object function as a
complex type which refer to postgresql
https://www.postgresql.org/docs/current/functions-json.html 
```
json_object ( [ { key_expression { VALUE | ':' } value_expression [ FORMAT JSON [ ENCODING UTF8 ] ] }[, ...] ] [ { NULL | ABSENT } ON NULL ] [ { WITH | WITHOUT } UNIQUE [ KEYS ] ] [ RETURNING data_type [ FORMAT JSON [ ENCODING UTF8 ] ] ])

Constructs a JSON object of all the key/value pairs given, or an empty object if none are given. key_expression is a scalar expression defining the JSON key, which is converted to the text type. It cannot be NULL nor can it belong to a type that has a cast to the json type. If WITH UNIQUE KEYS is specified, there must not be any duplicate key_expression. Any pair for which the value_expression evaluates to NULL is omitted from the output if ABSENT ON NULL is specified; if NULL ON NULL is specified or the clause omitted, the key is included with value NULL.
```
amorynan pushed a commit to amorynan/doris that referenced this pull request Feb 21, 2025
This PR enhances the value parameter of the json_object function as a
complex type which refer to postgresql
https://www.postgresql.org/docs/current/functions-json.html 
```
json_object ( [ { key_expression { VALUE | ':' } value_expression [ FORMAT JSON [ ENCODING UTF8 ] ] }[, ...] ] [ { NULL | ABSENT } ON NULL ] [ { WITH | WITHOUT } UNIQUE [ KEYS ] ] [ RETURNING data_type [ FORMAT JSON [ ENCODING UTF8 ] ] ])

Constructs a JSON object of all the key/value pairs given, or an empty object if none are given. key_expression is a scalar expression defining the JSON key, which is converted to the text type. It cannot be NULL nor can it belong to a type that has a cast to the json type. If WITH UNIQUE KEYS is specified, there must not be any duplicate key_expression. Any pair for which the value_expression evaluates to NULL is omitted from the output if ABSENT ON NULL is specified; if NULL ON NULL is specified or the clause omitted, the key is included with value NULL.
```
dataroaring pushed a commit that referenced this pull request Feb 21, 2025
…47627 (#47779)

Cherry-picked from #47627

Co-authored-by: amory <wangqiannan@selectdb.com>
lzyy2024 pushed a commit to lzyy2024/doris that referenced this pull request Feb 21, 2025
This PR enhances the value parameter of the json_object function as a
complex type which refer to postgresql
https://www.postgresql.org/docs/current/functions-json.html 
```
json_object ( [ { key_expression { VALUE | ':' } value_expression [ FORMAT JSON [ ENCODING UTF8 ] ] }[, ...] ] [ { NULL | ABSENT } ON NULL ] [ { WITH | WITHOUT } UNIQUE [ KEYS ] ] [ RETURNING data_type [ FORMAT JSON [ ENCODING UTF8 ] ] ])

Constructs a JSON object of all the key/value pairs given, or an empty object if none are given. key_expression is a scalar expression defining the JSON key, which is converted to the text type. It cannot be NULL nor can it belong to a type that has a cast to the json type. If WITH UNIQUE KEYS is specified, there must not be any duplicate key_expression. Any pair for which the value_expression evaluates to NULL is omitted from the output if ABSENT ON NULL is specified; if NULL ON NULL is specified or the clause omitted, the key is included with value NULL.
```
@eldenmoon eldenmoon added the usercase Important user case type label label Mar 4, 2025
@shuke987 shuke987 removed the dev/2.1.x label Mar 5, 2025
koarz pushed a commit to koarz/doris that referenced this pull request Jun 4, 2025
This PR enhances the value parameter of the json_object function as a
complex type which refer to postgresql
https://www.postgresql.org/docs/current/functions-json.html 
```
json_object ( [ { key_expression { VALUE | ':' } value_expression [ FORMAT JSON [ ENCODING UTF8 ] ] }[, ...] ] [ { NULL | ABSENT } ON NULL ] [ { WITH | WITHOUT } UNIQUE [ KEYS ] ] [ RETURNING data_type [ FORMAT JSON [ ENCODING UTF8 ] ] ])

Constructs a JSON object of all the key/value pairs given, or an empty object if none are given. key_expression is a scalar expression defining the JSON key, which is converted to the text type. It cannot be NULL nor can it belong to a type that has a cast to the json type. If WITH UNIQUE KEYS is specified, there must not be any duplicate key_expression. Any pair for which the value_expression evaluates to NULL is omitted from the output if ABSENT ON NULL is specified; if NULL ON NULL is specified or the clause omitted, the key is included with value NULL.
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. dev/3.0.5-merged kind/behavior-changed reviewed usercase Important user case type label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants