Skip to content

[fix](function) JSON_EXTRACT_STRING should return NULL instead of the string 'null' when encountering a NULL value #51516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 7, 2025

Conversation

mrhhsg
Copy link
Member

@mrhhsg mrhhsg commented Jun 5, 2025

What problem does this PR solve?

Previously, when JSON_EXTRACT_STRING encountered a NULL input value or path, it returned the string "null" instead of a proper SQL NULL value. This behavior could lead to incorrect query results and confusion in downstream processing that expects NULL to be represented as an actual null value rather than a literal string.

This commit adjusts the logic to ensure that JSON_EXTRACT_STRING returns NULL in such cases, aligning with SQL semantics and improving compatibility with systems that rely on strict null-handling behavior.

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 Jun 5, 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?

@mrhhsg
Copy link
Member Author

mrhhsg commented Jun 5, 2025

run buildall

@yiguolei yiguolei added usercase Important user case type label dev/2.1.x dev/3.0.x labels Jun 5, 2025
Copy link
Contributor

@amorynan amorynan left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

github-actions bot commented Jun 5, 2025

PR approved by anyone and no changes requested.

HappenLee
HappenLee previously approved these changes Jun 5, 2025
Copy link
Contributor

@HappenLee HappenLee 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 github-actions bot added the approved Indicates a PR has been approved by one committer. label Jun 5, 2025
Copy link
Contributor

github-actions bot commented Jun 5, 2025

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

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	26155	5102	5018	5018
q2	1956	280	183	183
q3	10526	1250	731	731
q4	10264	982	528	528
q5	7905	2343	2357	2343
q6	181	162	136	136
q7	925	744	611	611
q8	9320	1285	1139	1139
q9	6750	5081	5003	5003
q10	6878	2302	1902	1902
q11	469	289	279	279
q12	347	356	211	211
q13	17792	3720	3112	3112
q14	246	235	212	212
q15	560	503	484	484
q16	449	436	375	375
q17	598	860	352	352
q18	7847	7102	7085	7085
q19	1828	979	559	559
q20	341	351	226	226
q21	3965	3218	2399	2399
q22	1039	1039	950	950
Total cold run time: 116341 ms
Total hot run time: 33838 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5275	5090	5115	5090
q2	238	322	231	231
q3	2179	2686	2353	2353
q4	1382	1800	1499	1499
q5	4447	4426	4404	4404
q6	219	169	129	129
q7	2012	1937	1810	1810
q8	2593	2461	2591	2461
q9	7233	7143	6920	6920
q10	3082	3212	2746	2746
q11	585	513	499	499
q12	689	776	613	613
q13	3580	3986	3255	3255
q14	286	325	267	267
q15	544	486	477	477
q16	452	478	441	441
q17	1151	1528	1414	1414
q18	7838	7617	7447	7447
q19	844	822	865	822
q20	2012	2069	1927	1927
q21	4780	4640	4492	4492
q22	1110	1057	1038	1038
Total cold run time: 52531 ms
Total hot run time: 50335 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 193101 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 90dd2afc4a7389f0b11e0a5a3ea72c0a060fab42, data reload: false

query1	1405	1099	1080	1080
query2	6334	1840	1858	1840
query3	11159	4698	4715	4698
query4	25465	23732	23284	23284
query5	4425	637	487	487
query6	305	221	211	211
query7	3988	513	292	292
query8	262	237	220	220
query9	8769	2664	2684	2664
query10	477	330	283	283
query11	15320	15115	14855	14855
query12	168	106	103	103
query13	1547	535	410	410
query14	9006	6102	6268	6102
query15	208	197	170	170
query16	7304	622	503	503
query17	1179	700	607	607
query18	2012	399	317	317
query19	204	192	171	171
query20	126	126	124	124
query21	212	133	111	111
query22	4426	4566	4234	4234
query23	34696	33682	33933	33682
query24	8661	2493	2468	2468
query25	551	493	459	459
query26	1329	289	161	161
query27	2927	525	353	353
query28	4659	2219	2205	2205
query29	733	598	486	486
query30	286	232	202	202
query31	945	878	777	777
query32	77	70	69	69
query33	566	391	342	342
query34	827	920	531	531
query35	814	840	764	764
query36	969	1003	905	905
query37	112	103	79	79
query38	4186	4203	4146	4146
query39	1524	1480	1461	1461
query40	210	119	111	111
query41	62	57	58	57
query42	130	111	113	111
query43	510	519	489	489
query44	1390	844	833	833
query45	189	176	173	173
query46	852	1028	677	677
query47	1833	1875	1799	1799
query48	411	428	338	338
query49	751	530	423	423
query50	689	718	429	429
query51	4233	4305	4192	4192
query52	118	116	108	108
query53	230	258	184	184
query54	602	607	523	523
query55	83	88	86	86
query56	334	343	289	289
query57	1144	1246	1150	1150
query58	278	273	266	266
query59	2661	2758	2676	2676
query60	352	333	340	333
query61	139	126	149	126
query62	760	727	659	659
query63	231	210	194	194
query64	4051	1047	696	696
query65	4414	4298	4279	4279
query66	1028	402	302	302
query67	15887	15737	15392	15392
query68	8396	884	531	531
query69	466	303	272	272
query70	1211	1158	1116	1116
query71	460	332	295	295
query72	5579	4700	4589	4589
query73	542	558	357	357
query74	8900	9106	8962	8962
query75	4054	3203	2695	2695
query76	3564	1191	764	764
query77	902	371	298	298
query78	10201	10022	9415	9415
query79	4908	835	568	568
query80	718	503	439	439
query81	487	262	216	216
query82	862	134	94	94
query83	278	259	238	238
query84	287	109	94	94
query85	786	356	312	312
query86	384	320	277	277
query87	4354	4488	4323	4323
query88	3942	2281	2283	2281
query89	443	325	286	286
query90	1983	202	224	202
query91	143	141	115	115
query92	75	135	62	62
query93	3261	954	583	583
query94	677	427	268	268
query95	385	300	289	289
query96	493	567	281	281
query97	2697	2724	2652	2652
query98	240	208	211	208
query99	1444	1388	1268	1268
Total cold run time: 284857 ms
Total hot run time: 193101 ms

@doris-robot
Copy link

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

query1	0.03	0.04	0.03
query2	0.13	0.11	0.12
query3	0.25	0.20	0.20
query4	1.59	0.20	0.19
query5	0.46	0.46	0.45
query6	1.21	0.67	0.66
query7	0.02	0.02	0.02
query8	0.04	0.03	0.03
query9	0.60	0.50	0.52
query10	0.57	0.58	0.57
query11	0.15	0.11	0.11
query12	0.15	0.12	0.11
query13	0.62	0.60	0.61
query14	0.81	0.81	0.78
query15	0.89	0.85	0.87
query16	0.38	0.37	0.39
query17	1.00	1.05	0.99
query18	0.22	0.21	0.21
query19	2.00	1.79	1.83
query20	0.01	0.01	0.02
query21	15.40	0.88	0.54
query22	0.75	1.34	0.72
query23	14.81	1.39	0.64
query24	6.82	0.86	0.67
query25	0.46	0.14	0.14
query26	0.59	0.16	0.14
query27	0.05	0.05	0.05
query28	9.97	0.94	0.45
query29	12.62	4.05	3.40
query30	0.25	0.09	0.07
query31	2.81	0.60	0.38
query32	3.23	0.55	0.46
query33	3.17	3.07	3.11
query34	15.75	5.17	4.52
query35	4.58	4.60	4.58
query36	0.67	0.50	0.49
query37	0.09	0.06	0.07
query38	0.05	0.04	0.04
query39	0.02	0.02	0.03
query40	0.17	0.14	0.13
query41	0.08	0.02	0.02
query42	0.03	0.02	0.02
query43	0.03	0.03	0.04
Total cold run time: 103.53 s
Total hot run time: 29.22 s

morningman
morningman previously approved these changes Jun 5, 2025
eldenmoon
eldenmoon previously approved these changes Jun 5, 2025
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

@mrhhsg mrhhsg dismissed stale reviews from eldenmoon, morningman, and HappenLee via 62c2ab5 June 5, 2025 13:35
@mrhhsg mrhhsg force-pushed the fix_json_extract_string branch from 90dd2af to 62c2ab5 Compare June 5, 2025 13:35
@mrhhsg
Copy link
Member Author

mrhhsg commented Jun 5, 2025

run buildall

@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Jun 5, 2025
@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	27018	5081	5051	5051
q2	1975	305	186	186
q3	10330	1267	688	688
q4	10237	991	522	522
q5	7569	2398	2322	2322
q6	187	167	132	132
q7	923	773	617	617
q8	9316	1292	1061	1061
q9	6829	5072	5077	5072
q10	6880	2338	1880	1880
q11	484	300	293	293
q12	341	352	232	232
q13	17792	3702	3104	3104
q14	234	229	216	216
q15	568	483	499	483
q16	435	440	377	377
q17	624	878	374	374
q18	7615	7236	7216	7216
q19	1808	986	556	556
q20	333	340	226	226
q21	3870	3147	2382	2382
q22	1042	1036	956	956
Total cold run time: 116410 ms
Total hot run time: 33946 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5221	5109	5114	5109
q2	239	318	222	222
q3	2166	2640	2310	2310
q4	1370	1816	1454	1454
q5	4452	4411	4402	4402
q6	221	169	129	129
q7	2008	1903	1780	1780
q8	2629	2691	2508	2508
q9	7237	7244	7117	7117
q10	3003	3192	2785	2785
q11	577	517	514	514
q12	693	778	624	624
q13	3460	3911	3365	3365
q14	302	308	297	297
q15	537	491	487	487
q16	445	465	437	437
q17	1164	1622	1349	1349
q18	7759	7668	7464	7464
q19	824	886	1107	886
q20	1972	2027	1856	1856
q21	4875	4489	4440	4440
q22	1106	1080	1018	1018
Total cold run time: 52260 ms
Total hot run time: 50553 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 192988 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 62c2ab589091854529f29815e10c7ea882f59b0f, data reload: false

query1	1449	1100	1044	1044
query2	6242	1804	1813	1804
query3	11017	4581	4384	4384
query4	56045	24654	22991	22991
query5	4987	498	463	463
query6	349	209	207	207
query7	4915	521	296	296
query8	290	231	210	210
query9	5639	2671	2688	2671
query10	467	331	288	288
query11	15080	15386	14811	14811
query12	166	108	105	105
query13	1050	548	437	437
query14	10248	6423	6485	6423
query15	219	199	184	184
query16	7142	619	489	489
query17	1102	784	561	561
query18	1628	406	311	311
query19	199	194	164	164
query20	122	137	125	125
query21	209	125	110	110
query22	4371	4411	4373	4373
query23	34541	33515	33720	33515
query24	6697	2396	2434	2396
query25	467	467	397	397
query26	681	281	152	152
query27	2234	536	354	354
query28	3016	2208	2192	2192
query29	584	606	426	426
query30	267	222	193	193
query31	868	860	798	798
query32	76	63	61	61
query33	437	361	306	306
query34	799	867	540	540
query35	815	828	782	782
query36	957	991	903	903
query37	120	107	81	81
query38	4282	4355	4328	4328
query39	1546	1469	1493	1469
query40	228	127	111	111
query41	66	57	60	57
query42	126	129	118	118
query43	514	520	494	494
query44	1422	857	847	847
query45	185	171	166	166
query46	846	1038	662	662
query47	1877	1851	1810	1810
query48	438	442	333	333
query49	669	510	399	399
query50	678	700	409	409
query51	4178	4210	4256	4210
query52	111	113	103	103
query53	228	266	187	187
query54	586	592	509	509
query55	88	80	82	80
query56	321	296	295	295
query57	1189	1214	1121	1121
query58	286	279	262	262
query59	2787	2833	2733	2733
query60	349	342	328	328
query61	148	144	173	144
query62	759	735	699	699
query63	219	189	186	186
query64	1506	1059	699	699
query65	4229	4166	4165	4165
query66	720	413	305	305
query67	16091	15937	15635	15635
query68	7686	893	530	530
query69	553	297	269	269
query70	1261	1109	1103	1103
query71	504	324	291	291
query72	6040	4849	4912	4849
query73	1471	714	353	353
query74	8849	9242	8728	8728
query75	3800	3208	2683	2683
query76	4274	1201	767	767
query77	609	382	291	291
query78	10092	10359	9495	9495
query79	1894	825	589	589
query80	732	528	439	439
query81	476	249	222	222
query82	418	136	97	97
query83	411	255	234	234
query84	296	121	91	91
query85	791	356	322	322
query86	366	298	280	280
query87	4433	4584	4371	4371
query88	3274	2309	2349	2309
query89	410	319	302	302
query90	1975	220	214	214
query91	147	146	116	116
query92	72	63	56	56
query93	1151	973	592	592
query94	688	424	314	314
query95	364	296	292	292
query96	524	588	286	286
query97	2712	2763	2627	2627
query98	242	210	198	198
query99	1414	1414	1267	1267
Total cold run time: 300096 ms
Total hot run time: 192988 ms

… string 'null' when encountering a NULL value
@mrhhsg mrhhsg force-pushed the fix_json_extract_string branch from 62c2ab5 to c78210d Compare June 5, 2025 15:53
@mrhhsg
Copy link
Member Author

mrhhsg commented Jun 5, 2025

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	26926	5113	5049	5049
q2	1984	292	191	191
q3	10260	1252	692	692
q4	10228	998	544	544
q5	7548	2381	2354	2354
q6	185	167	136	136
q7	925	760	592	592
q8	9305	1286	1063	1063
q9	6765	5163	5052	5052
q10	6823	2343	1892	1892
q11	509	303	293	293
q12	353	370	220	220
q13	17797	3705	3095	3095
q14	249	224	220	220
q15	547	500	504	500
q16	431	453	380	380
q17	617	872	375	375
q18	7608	7198	7009	7009
q19	1238	961	576	576
q20	347	341	227	227
q21	4105	2665	2370	2370
q22	1046	1039	989	989
Total cold run time: 115796 ms
Total hot run time: 33819 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5097	5077	5062	5062
q2	248	323	221	221
q3	2180	2667	2351	2351
q4	1317	1729	1403	1403
q5	4263	4137	4171	4137
q6	211	165	124	124
q7	1889	1872	1661	1661
q8	2629	2582	2398	2398
q9	6835	6768	6762	6762
q10	2902	3109	2644	2644
q11	561	506	481	481
q12	651	726	568	568
q13	3391	3784	3110	3110
q14	260	311	263	263
q15	533	482	489	482
q16	433	473	425	425
q17	1101	1453	1300	1300
q18	7443	7160	6991	6991
q19	800	778	913	778
q20	1911	1995	1818	1818
q21	4777	4402	4401	4401
q22	1123	1013	1025	1013
Total cold run time: 50555 ms
Total hot run time: 48393 ms

@doris-robot
Copy link

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

query1	1028	481	510	481
query2	6574	1823	1770	1770
query3	6756	230	229	229
query4	26489	23725	23113	23113
query5	5377	607	457	457
query6	326	219	197	197
query7	4635	506	293	293
query8	265	236	220	220
query9	8640	2658	2679	2658
query10	509	354	272	272
query11	15559	15034	15008	15008
query12	173	113	109	109
query13	1656	546	415	415
query14	10931	6167	6053	6053
query15	203	192	166	166
query16	7643	615	483	483
query17	1541	722	566	566
query18	2001	395	294	294
query19	197	188	165	165
query20	121	122	113	113
query21	212	127	108	108
query22	4015	4262	4018	4018
query23	34086	32897	33112	32897
query24	8099	2417	2364	2364
query25	523	457	418	418
query26	1243	271	156	156
query27	2703	500	337	337
query28	4295	2134	2130	2130
query29	725	560	438	438
query30	279	205	184	184
query31	903	856	768	768
query32	71	68	63	63
query33	545	376	328	328
query34	803	898	528	528
query35	776	819	727	727
query36	970	956	863	863
query37	121	103	82	82
query38	4156	4141	4016	4016
query39	1511	1403	1390	1390
query40	210	121	105	105
query41	65	84	60	60
query42	128	110	110	110
query43	503	511	474	474
query44	1294	812	807	807
query45	188	186	170	170
query46	844	1113	623	623
query47	1747	1801	1713	1713
query48	393	428	308	308
query49	754	492	389	389
query50	644	721	399	399
query51	4100	4162	4186	4162
query52	113	104	98	98
query53	225	253	186	186
query54	583	570	514	514
query55	87	83	85	83
query56	303	312	274	274
query57	1146	1129	1094	1094
query58	278	268	250	250
query59	2663	2681	2552	2552
query60	343	319	315	315
query61	131	125	124	124
query62	808	709	667	667
query63	220	186	186	186
query64	4234	1004	671	671
query65	4249	4135	4202	4135
query66	1039	432	315	315
query67	15921	15690	15546	15546
query68	7888	908	534	534
query69	492	306	277	277
query70	1190	1145	1143	1143
query71	504	326	350	326
query72	5484	4696	4770	4696
query73	665	583	352	352
query74	8987	8973	8731	8731
query75	3903	3219	2757	2757
query76	3611	1181	744	744
query77	781	373	303	303
query78	9955	10252	9337	9337
query79	1514	840	589	589
query80	613	533	457	457
query81	481	252	218	218
query82	439	131	98	98
query83	271	267	237	237
query84	247	109	97	97
query85	757	348	320	320
query86	348	299	283	283
query87	4395	4518	4276	4276
query88	2860	2262	2267	2262
query89	379	320	279	279
query90	1994	208	207	207
query91	138	145	117	117
query92	76	94	67	67
query93	1111	936	594	594
query94	680	402	319	319
query95	366	299	291	291
query96	505	588	283	283
query97	2769	2762	2663	2663
query98	235	214	199	199
query99	1402	1399	1282	1282
Total cold run time: 274913 ms
Total hot run time: 185545 ms

@doris-robot
Copy link

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

query1	0.03	0.05	0.03
query2	0.13	0.11	0.11
query3	0.26	0.19	0.20
query4	1.60	0.20	0.20
query5	0.47	0.44	0.45
query6	1.18	0.71	0.67
query7	0.02	0.02	0.02
query8	0.05	0.04	0.03
query9	0.60	0.54	0.52
query10	0.57	0.57	0.57
query11	0.16	0.11	0.12
query12	0.15	0.11	0.12
query13	0.62	0.60	0.60
query14	0.80	0.81	0.81
query15	0.86	0.88	0.85
query16	0.38	0.40	0.39
query17	1.06	1.07	1.06
query18	0.23	0.21	0.22
query19	2.01	1.82	1.84
query20	0.01	0.01	0.01
query21	15.40	0.91	0.53
query22	0.77	1.32	1.02
query23	14.72	1.41	0.61
query24	6.59	2.86	0.56
query25	0.49	0.31	0.15
query26	0.50	0.16	0.14
query27	0.05	0.05	0.05
query28	10.30	0.86	0.45
query29	12.57	4.00	3.30
query30	0.26	0.09	0.06
query31	2.82	0.58	0.39
query32	3.23	0.54	0.49
query33	3.09	3.13	3.07
query34	15.63	5.12	4.47
query35	4.54	4.53	4.48
query36	0.70	0.50	0.49
query37	0.09	0.06	0.07
query38	0.05	0.04	0.04
query39	0.03	0.03	0.03
query40	0.18	0.14	0.12
query41	0.10	0.03	0.02
query42	0.03	0.02	0.03
query43	0.04	0.03	0.03
Total cold run time: 103.37 s
Total hot run time: 29.33 s

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 100.00% (1/1) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 56.32% (15094/26802)
Line Coverage 45.08% (134673/298725)
Region Coverage 44.18% (67715/153286)
Branch Coverage 38.72% (34707/89628)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (1/1) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 79.59% (20998/26383)
Line Coverage 72.64% (216933/298622)
Region Coverage 70.88% (127768/180249)
Branch Coverage 64.61% (66196/102450)

Copy link
Contributor

@HappenLee HappenLee 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 github-actions bot added the approved Indicates a PR has been approved by one committer. label Jun 7, 2025
Copy link
Contributor

github-actions bot commented Jun 7, 2025

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

@yiguolei yiguolei merged commit 984f98f into apache:master Jun 7, 2025
25 of 26 checks passed
github-actions bot pushed a commit that referenced this pull request Jun 7, 2025
… string 'null' when encountering a NULL value (#51516)

### What problem does this PR solve?

Previously, when JSON_EXTRACT_STRING encountered a NULL input value or
path, it returned the string "null" instead of a proper SQL NULL value.
This behavior could lead to incorrect query results and confusion in
downstream processing that expects NULL to be represented as an actual
null value rather than a literal string.

This commit adjusts the logic to ensure that JSON_EXTRACT_STRING returns
NULL in such cases, aligning with SQL semantics and improving
compatibility with systems that rely on strict null-handling behavior.
github-actions bot pushed a commit that referenced this pull request Jun 7, 2025
… string 'null' when encountering a NULL value (#51516)

### What problem does this PR solve?

Previously, when JSON_EXTRACT_STRING encountered a NULL input value or
path, it returned the string "null" instead of a proper SQL NULL value.
This behavior could lead to incorrect query results and confusion in
downstream processing that expects NULL to be represented as an actual
null value rather than a literal string.

This commit adjusts the logic to ensure that JSON_EXTRACT_STRING returns
NULL in such cases, aligning with SQL semantics and improving
compatibility with systems that rely on strict null-handling behavior.
dataroaring pushed a commit that referenced this pull request Jun 11, 2025
…stead of the string 'null' when encountering a NULL value #51516 (#51565)

Cherry-picked from #51516

---------

Co-authored-by: Jerry Hu <[email protected]>
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/2.1.x dev/3.0.7-merged kind/behavior-changed reviewed usercase Important user case type label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants