Skip to content

Conversation

@liutang123
Copy link
Contributor

@liutang123 liutang123 commented Apr 28, 2025

cherry-pick: #40948
Like mysql, json_search returns the path which point to a json string witch match the pattern.
SELECT JSON_SEARCH('["A",[{"B":"1"}],{"C":"AB"},{"D":"BC"}]', 'one', 'A_') as res;

+----------+
| res      |
+----------+
| "$[2].C" |
+----------+

Like mysql, json_search returns the path which point to a json string
witch match the pattern.
`SELECT JSON_SEARCH('["A",[{"B":"1"}],{"C":"AB"},{"D":"BC"}]', 'one',
'A_') as res;`
```
+----------+
| res      |
+----------+
| "$[2].C" |
+----------+
```
@liutang123 liutang123 requested a review from dataroaring as a code owner April 28, 2025 07:12
@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?

@liutang123
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TeamCity cloud ut coverage result:
Function Coverage: 83.05% (1088/1310)
Line Coverage: 66.04% (18018/27285)
Region Coverage: 65.53% (8869/13534)
Branch Coverage: 55.50% (4793/8636)
Coverage Report: http://coverage.selectdb-in.cc/coverage/5073c4bd29da8c90170c53fc46a501aada231e35_5073c4bd29da8c90170c53fc46a501aada231e35_cloud/report/index.html

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17583	7092	6646	6646
q2	2058	180	188	180
q3	10619	1079	1183	1079
q4	10572	709	764	709
q5	7760	2943	2851	2851
q6	221	135	137	135
q7	999	623	613	613
q8	9370	1993	2091	1993
q9	6615	6436	6430	6430
q10	6997	2224	2312	2224
q11	462	266	264	264
q12	409	227	220	220
q13	17773	2975	3015	2975
q14	228	207	203	203
q15	505	466	454	454
q16	673	582	594	582
q17	999	609	538	538
q18	7416	6746	6661	6661
q19	1441	1067	1045	1045
q20	474	214	210	210
q21	4166	3392	3262	3262
q22	1096	1003	1001	1001
Total cold run time: 108436 ms
Total hot run time: 40275 ms

----- Round 2, with runtime_filter_mode=off -----
q1	6641	6572	6562	6562
q2	331	238	232	232
q3	2923	2744	2981	2744
q4	2055	1778	1832	1778
q5	5877	5771	5737	5737
q6	214	128	133	128
q7	2228	1832	1756	1756
q8	3435	3571	3550	3550
q9	8893	8882	8954	8882
q10	3588	3496	3544	3496
q11	588	500	493	493
q12	811	598	606	598
q13	10131	3166	3164	3164
q14	301	278	279	278
q15	524	468	465	465
q16	687	640	646	640
q17	1871	1663	1651	1651
q18	8218	7767	7736	7736
q19	1709	1608	1554	1554
q20	2081	1811	1895	1811
q21	5577	5420	5372	5372
q22	1128	1057	995	995
Total cold run time: 69811 ms
Total hot run time: 59622 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 197142 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 5073c4bd29da8c90170c53fc46a501aada231e35, data reload: false

query1	1268	920	903	903
query2	6338	2024	2090	2024
query3	10792	4413	4398	4398
query4	60845	28553	23477	23477
query5	5231	464	446	446
query6	395	173	168	168
query7	5525	306	312	306
query8	299	221	210	210
query9	8644	2658	2628	2628
query10	469	288	261	261
query11	18005	15582	15641	15582
query12	157	107	108	107
query13	1482	457	437	437
query14	9761	7010	7451	7010
query15	206	175	203	175
query16	7157	494	478	478
query17	1138	580	593	580
query18	1892	326	327	326
query19	211	166	158	158
query20	121	114	126	114
query21	211	103	104	103
query22	4581	4361	4799	4361
query23	34710	33712	34040	33712
query24	6101	2937	3022	2937
query25	538	437	413	413
query26	655	169	175	169
query27	1706	372	372	372
query28	4156	2476	2452	2452
query29	715	498	437	437
query30	241	159	155	155
query31	999	817	815	815
query32	68	57	62	57
query33	410	275	290	275
query34	929	503	507	503
query35	866	742	703	703
query36	1103	953	933	933
query37	118	65	66	65
query38	4132	4000	3950	3950
query39	1514	1458	1500	1458
query40	207	106	103	103
query41	50	49	50	49
query42	110	99	100	99
query43	545	493	503	493
query44	1216	826	852	826
query45	182	168	169	168
query46	1139	722	728	722
query47	2033	1901	1906	1901
query48	477	387	380	380
query49	747	400	392	392
query50	841	438	442	438
query51	7292	7213	7440	7213
query52	99	88	91	88
query53	261	179	184	179
query54	563	470	464	464
query55	80	78	79	78
query56	269	273	249	249
query57	1277	1165	1142	1142
query58	223	211	218	211
query59	3299	3108	3070	3070
query60	280	265	264	264
query61	108	108	104	104
query62	807	705	695	695
query63	226	195	195	195
query64	1378	660	625	625
query65	3263	3211	3179	3179
query66	709	306	295	295
query67	15828	15541	15509	15509
query68	4387	581	568	568
query69	438	267	269	267
query70	1137	1122	1081	1081
query71	378	272	245	245
query72	6361	4210	3940	3940
query73	764	353	357	353
query74	10183	9047	9326	9047
query75	3345	2623	2645	2623
query76	1897	1167	1039	1039
query77	473	283	276	276
query78	10692	9672	9545	9545
query79	2280	601	610	601
query80	1365	424	431	424
query81	543	246	238	238
query82	1273	86	87	86
query83	287	153	151	151
query84	284	80	85	80
query85	1000	301	289	289
query86	388	286	308	286
query87	4423	4177	4307	4177
query88	3942	2411	2371	2371
query89	421	298	288	288
query90	1984	181	187	181
query91	181	151	168	151
query92	62	50	52	50
query93	2871	555	560	555
query94	794	304	293	293
query95	363	258	263	258
query96	629	281	287	281
query97	3340	3108	3171	3108
query98	211	208	196	196
query99	1605	1321	1305	1305
Total cold run time: 315499 ms
Total hot run time: 197142 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.03
query2	0.06	0.04	0.03
query3	0.23	0.07	0.07
query4	1.62	0.11	0.11
query5	0.51	0.52	0.51
query6	1.14	0.72	0.72
query7	0.02	0.02	0.02
query8	0.04	0.03	0.03
query9	0.57	0.51	0.51
query10	0.56	0.55	0.56
query11	0.15	0.11	0.10
query12	0.14	0.12	0.12
query13	0.60	0.60	0.60
query14	2.84	2.77	2.75
query15	0.89	0.82	0.83
query16	0.39	0.38	0.37
query17	1.06	0.98	1.05
query18	0.24	0.23	0.21
query19	1.97	1.78	1.96
query20	0.01	0.02	0.01
query21	15.36	0.58	0.58
query22	2.36	2.39	1.72
query23	16.94	1.08	0.93
query24	3.04	1.46	1.63
query25	0.13	0.23	0.11
query26	0.52	0.13	0.13
query27	0.05	0.05	0.04
query28	9.50	0.51	0.46
query29	12.54	3.25	3.22
query30	0.24	0.06	0.06
query31	2.87	0.40	0.37
query32	3.24	0.45	0.45
query33	3.00	3.04	3.03
query34	16.82	4.49	4.47
query35	4.49	4.54	4.47
query36	0.67	0.47	0.48
query37	0.09	0.06	0.06
query38	0.05	0.03	0.04
query39	0.03	0.02	0.02
query40	0.16	0.12	0.12
query41	0.08	0.03	0.02
query42	0.03	0.02	0.02
query43	0.05	0.03	0.03
Total cold run time: 105.33 s
Total hot run time: 32.59 s

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 1.25% (5/399) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 40.18% (10559/26281)
Line Coverage 30.96% (89386/288718)
Region Coverage 30.08% (46091/153217)
Branch Coverage 26.60% (23566/88606)

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

@github-actions
Copy link
Contributor

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

@github-actions github-actions bot added approved Indicates a PR has been approved by one committer. reviewed labels Apr 29, 2025
@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@liutang123
Copy link
Contributor Author

run cloud_p0

Copy link
Contributor

@dataroaring dataroaring left a comment

Choose a reason for hiding this comment

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

LGTM

@dataroaring dataroaring merged commit 6251709 into apache:branch-3.0 Apr 30, 2025
31 of 33 checks passed
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. reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants