Skip to content

Conversation

@Mryange
Copy link
Contributor

@Mryange Mryange commented Mar 3, 2025

What problem does this PR solve?

#47068
In this PR, a check was performed, but it was not comprehensive. If the parameter is for a non-nullable column, the check will be bypassed.

drop table if exists t01;
create table t01(a int, b int not null) properties ("replication_num" = "1");
insert into t01 values (10, 100), (20,200), (30, 300), (40, 400);
select percentile(1, -1) from t01;


mysql> select percentile(a, -1) from t01;
ERROR 1105 (HY000): errCode = 2, detailMessage = (127.0.0.1)[INVALID_ARGUMENT]quantile in func percentile should in [0, 1], but real data is:-1.000000
mysql> select percentile(b, -1) from t01;
ERROR 1105 (HY000): RpcException, msg: send fragments failed. io.grpc.StatusRuntimeException: UNAVAILABLE: io exception, host: 127.0.0.1

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 Mar 3, 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?

@Mryange
Copy link
Contributor Author

Mryange commented Mar 3, 2025

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17611	5231	5069	5069
q2	2045	310	167	167
q3	10397	1346	700	700
q4	10235	1002	546	546
q5	7528	2378	2373	2373
q6	184	166	136	136
q7	913	738	599	599
q8	9300	1296	1055	1055
q9	4899	4737	4982	4737
q10	6831	2333	1900	1900
q11	473	283	255	255
q12	350	353	219	219
q13	17774	3701	3081	3081
q14	229	227	217	217
q15	500	484	450	450
q16	630	620	582	582
q17	569	858	342	342
q18	7010	6196	6203	6196
q19	1219	944	538	538
q20	321	332	195	195
q21	2816	2221	1931	1931
q22	369	341	299	299
Total cold run time: 102203 ms
Total hot run time: 31587 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5119	5109	5108	5108
q2	232	330	233	233
q3	2153	2725	2297	2297
q4	1465	1816	1383	1383
q5	4206	4114	4200	4114
q6	210	162	122	122
q7	1845	1836	1676	1676
q8	2653	2693	2568	2568
q9	7286	6981	7140	6981
q10	3042	3218	2740	2740
q11	561	525	506	506
q12	687	762	647	647
q13	3479	4003	3334	3334
q14	276	289	258	258
q15	488	463	451	451
q16	643	675	616	616
q17	1147	1599	1348	1348
q18	7686	7415	7393	7393
q19	773	777	827	777
q20	1962	2039	1870	1870
q21	5271	4887	4833	4833
q22	640	625	633	625
Total cold run time: 51824 ms
Total hot run time: 49880 ms

@doris-robot
Copy link

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

query1	890	393	373	373
query2	6522	1885	1885	1885
query3	6795	216	208	208
query4	24970	23611	23017	23017
query5	4368	653	510	510
query6	303	235	190	190
query7	4609	498	295	295
query8	295	240	238	238
query9	8608	2556	2563	2556
query10	478	325	263	263
query11	15862	15047	14845	14845
query12	161	112	110	110
query13	1660	524	412	412
query14	9496	6328	6201	6201
query15	214	206	177	177
query16	7294	633	484	484
query17	1193	716	552	552
query18	1972	410	310	310
query19	202	189	162	162
query20	123	120	117	117
query21	220	121	104	104
query22	4050	4199	4411	4199
query23	34551	33706	33319	33319
query24	8522	2425	2437	2425
query25	539	480	403	403
query26	1293	271	155	155
query27	2968	492	336	336
query28	4897	2484	2430	2430
query29	771	585	423	423
query30	226	194	158	158
query31	954	881	826	826
query32	73	69	64	64
query33	557	348	294	294
query34	818	858	492	492
query35	775	824	747	747
query36	962	969	889	889
query37	111	99	71	71
query38	4241	4156	4144	4144
query39	1459	1411	1555	1411
query40	207	115	103	103
query41	52	53	50	50
query42	125	106	104	104
query43	515	493	479	479
query44	1267	788	791	788
query45	181	170	161	161
query46	882	1033	647	647
query47	1783	1807	1730	1730
query48	377	403	295	295
query49	765	501	414	414
query50	694	721	427	427
query51	4144	4144	4108	4108
query52	112	106	95	95
query53	228	251	191	191
query54	482	496	407	407
query55	88	77	82	77
query56	257	282	252	252
query57	1114	1130	1075	1075
query58	250	240	239	239
query59	2616	2640	2702	2640
query60	309	279	256	256
query61	134	136	147	136
query62	799	716	683	683
query63	220	189	186	186
query64	4396	1005	665	665
query65	3201	3132	3171	3132
query66	1122	394	298	298
query67	15878	15383	15355	15355
query68	8301	874	503	503
query69	476	306	263	263
query70	1198	1165	1118	1118
query71	474	306	253	253
query72	5500	3596	3796	3596
query73	768	741	353	353
query74	9087	9100	8678	8678
query75	3953	3186	2734	2734
query76	3618	1164	756	756
query77	796	368	289	289
query78	10012	10102	9290	9290
query79	2680	853	607	607
query80	657	531	460	460
query81	493	277	245	245
query82	530	126	99	99
query83	202	174	163	163
query84	289	95	76	76
query85	784	370	314	314
query86	398	308	287	287
query87	4448	4497	4339	4339
query88	3859	2212	2216	2212
query89	389	335	288	288
query90	1834	193	195	193
query91	142	140	112	112
query92	74	73	63	63
query93	2102	1054	566	566
query94	673	406	300	300
query95	353	275	262	262
query96	491	563	274	274
query97	3338	3406	3286	3286
query98	232	202	206	202
query99	1418	1418	1252	1252
Total cold run time: 275769 ms
Total hot run time: 184221 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.04
query2	0.07	0.03	0.04
query3	0.23	0.07	0.06
query4	1.61	0.10	0.10
query5	0.56	0.56	0.53
query6	1.20	0.73	0.72
query7	0.02	0.02	0.02
query8	0.04	0.03	0.04
query9	0.58	0.53	0.54
query10	0.59	0.56	0.56
query11	0.14	0.11	0.11
query12	0.14	0.11	0.12
query13	0.61	0.60	0.61
query14	2.81	2.69	2.79
query15	0.93	0.86	0.84
query16	0.39	0.39	0.39
query17	1.00	1.00	1.01
query18	0.21	0.20	0.20
query19	1.85	1.87	1.95
query20	0.02	0.01	0.01
query21	15.36	0.90	0.54
query22	0.75	1.22	0.69
query23	14.83	1.37	0.60
query24	6.74	1.89	1.00
query25	0.53	0.24	0.19
query26	0.63	0.16	0.13
query27	0.05	0.05	0.04
query28	9.93	0.85	0.42
query29	12.54	3.97	3.30
query30	0.26	0.09	0.06
query31	2.82	0.60	0.38
query32	3.23	0.56	0.47
query33	2.98	3.04	3.01
query34	15.79	5.14	4.49
query35	4.52	4.53	4.50
query36	0.67	0.50	0.49
query37	0.10	0.06	0.06
query38	0.05	0.04	0.04
query39	0.03	0.03	0.02
query40	0.17	0.14	0.14
query41	0.08	0.03	0.02
query42	0.03	0.03	0.02
query43	0.04	0.03	0.03
Total cold run time: 105.17 s
Total hot run time: 31.07 s

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 0.00% (0/1) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 45.44% (12129/26690)
Line Coverage 34.98% (102323/292547)
Region Coverage 34.13% (52396/153517)
Branch Coverage 29.82% (26490/88832)

@Mryange
Copy link
Contributor Author

Mryange commented Mar 3, 2025

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17586	5199	5078	5078
q2	2051	296	168	168
q3	10413	1338	722	722
q4	10226	1036	537	537
q5	7538	2356	2357	2356
q6	186	169	132	132
q7	909	737	618	618
q8	9303	1279	1051	1051
q9	5050	4530	4831	4530
q10	6818	2315	1903	1903
q11	467	272	267	267
q12	348	346	218	218
q13	17758	3746	3187	3187
q14	233	240	210	210
q15	513	477	455	455
q16	628	628	596	596
q17	600	876	360	360
q18	6763	6369	6383	6369
q19	1221	973	559	559
q20	332	334	199	199
q21	2954	2259	1942	1942
q22	366	344	306	306
Total cold run time: 102263 ms
Total hot run time: 31763 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5142	5110	5123	5110
q2	233	326	224	224
q3	2205	2681	2316	2316
q4	1459	1813	1375	1375
q5	4205	4150	4167	4150
q6	210	168	126	126
q7	1886	1835	1763	1763
q8	2647	2576	2563	2563
q9	7376	7048	7142	7048
q10	3004	3230	2733	2733
q11	563	515	484	484
q12	693	781	609	609
q13	3579	3938	3235	3235
q14	281	303	292	292
q15	492	466	452	452
q16	650	689	652	652
q17	1128	1627	1333	1333
q18	7550	7383	7218	7218
q19	775	824	875	824
q20	1991	2018	1874	1874
q21	5445	5151	4924	4924
q22	651	614	565	565
Total cold run time: 52165 ms
Total hot run time: 49870 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 184570 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 190b794c1781257a70d0f0737c4fd214b14dcfe7, data reload: false

query1	988	382	382	382
query2	6534	1917	1865	1865
query3	6790	209	216	209
query4	27105	23242	22973	22973
query5	4368	742	516	516
query6	314	225	217	217
query7	4610	525	292	292
query8	294	235	230	230
query9	8614	2549	2543	2543
query10	468	329	260	260
query11	15609	15091	15043	15043
query12	173	113	107	107
query13	1653	536	415	415
query14	10405	6314	6504	6314
query15	208	189	180	180
query16	7173	675	488	488
query17	1167	717	553	553
query18	1455	381	291	291
query19	196	209	156	156
query20	117	116	115	115
query21	214	131	110	110
query22	4170	4397	4180	4180
query23	34042	32908	32928	32908
query24	7883	2412	2431	2412
query25	512	481	388	388
query26	1219	290	160	160
query27	2431	500	326	326
query28	4195	2418	2412	2412
query29	652	572	434	434
query30	242	190	155	155
query31	948	910	804	804
query32	78	75	63	63
query33	553	377	334	334
query34	819	912	504	504
query35	832	863	744	744
query36	992	1045	896	896
query37	120	106	78	78
query38	4278	4271	4130	4130
query39	1481	1596	1553	1553
query40	223	128	116	116
query41	60	55	58	55
query42	129	116	115	115
query43	505	522	495	495
query44	1347	811	826	811
query45	186	171	171	171
query46	953	1126	645	645
query47	1761	1814	1666	1666
query48	388	423	302	302
query49	815	553	437	437
query50	747	792	425	425
query51	4179	4173	4198	4173
query52	112	116	98	98
query53	275	276	185	185
query54	492	496	435	435
query55	78	79	81	79
query56	283	279	247	247
query57	1175	1179	1058	1058
query58	251	234	239	234
query59	2598	2770	2653	2653
query60	285	276	282	276
query61	127	123	132	123
query62	841	769	651	651
query63	244	198	191	191
query64	4256	1039	685	685
query65	3225	3142	3135	3135
query66	1047	448	305	305
query67	15668	15751	15079	15079
query68	8108	894	502	502
query69	468	308	269	269
query70	1221	1125	1126	1125
query71	468	299	264	264
query72	5722	3707	3871	3707
query73	775	740	364	364
query74	9140	9181	8999	8999
query75	3755	3225	2697	2697
query76	3653	1315	784	784
query77	780	387	299	299
query78	9993	10118	9283	9283
query79	2679	864	588	588
query80	706	549	448	448
query81	491	288	244	244
query82	663	135	99	99
query83	211	182	155	155
query84	294	136	77	77
query85	771	369	311	311
query86	360	316	307	307
query87	4527	4447	4424	4424
query88	3320	2245	2226	2226
query89	385	327	286	286
query90	1956	208	195	195
query91	141	143	113	113
query92	76	61	59	59
query93	1276	1071	585	585
query94	679	432	297	297
query95	361	272	267	267
query96	490	611	266	266
query97	3359	3396	3255	3255
query98	231	207	202	202
query99	1464	1413	1288	1288
Total cold run time: 274675 ms
Total hot run time: 184570 ms

@Mryange Mryange marked this pull request as ready for review March 3, 2025 12:34
@doris-robot
Copy link

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

query1	0.03	0.03	0.03
query2	0.06	0.04	0.03
query3	0.23	0.06	0.08
query4	1.62	0.10	0.10
query5	0.56	0.54	0.56
query6	1.17	0.70	0.72
query7	0.02	0.02	0.01
query8	0.04	0.03	0.03
query9	0.59	0.52	0.52
query10	0.58	0.58	0.58
query11	0.15	0.11	0.11
query12	0.15	0.12	0.12
query13	0.62	0.59	0.60
query14	2.67	2.79	2.70
query15	0.92	0.84	0.87
query16	0.38	0.39	0.37
query17	1.01	1.05	1.03
query18	0.21	0.20	0.20
query19	1.88	1.83	2.02
query20	0.02	0.02	0.02
query21	15.35	0.90	0.55
query22	0.76	1.09	0.88
query23	14.73	1.41	0.61
query24	7.27	1.62	0.49
query25	0.50	0.25	0.15
query26	0.62	0.16	0.14
query27	0.05	0.06	0.06
query28	9.52	0.80	0.42
query29	12.54	3.94	3.29
query30	0.25	0.08	0.06
query31	2.83	0.61	0.38
query32	3.23	0.56	0.46
query33	3.00	2.97	3.00
query34	15.81	5.10	4.50
query35	4.58	4.55	4.53
query36	0.66	0.52	0.48
query37	0.09	0.07	0.06
query38	0.05	0.04	0.04
query39	0.04	0.02	0.02
query40	0.17	0.13	0.13
query41	0.08	0.03	0.03
query42	0.03	0.02	0.02
query43	0.03	0.04	0.03
Total cold run time: 105.1 s
Total hot run time: 30.71 s

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 0.00% (0/1) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 45.45% (12129/26689)
Line Coverage 34.97% (102295/292546)
Region Coverage 34.13% (52401/153516)
Branch Coverage 29.82% (26493/88832)

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2025

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 Mar 4, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2025

PR approved by anyone and no changes requested.

@HappenLee HappenLee merged commit 7ad5d5b into apache:master Mar 4, 2025
28 of 29 checks passed
github-actions bot pushed a commit that referenced this pull request Mar 4, 2025
dataroaring pushed a commit that referenced this pull request Mar 10, 2025
…non nullable negative number #48563 (#48605)

Cherry-picked from #48563

Co-authored-by: Mryange <yanxuecheng@selectdb.com>
@gavinchou gavinchou mentioned this pull request Apr 23, 2025
koarz pushed a commit to koarz/doris that referenced this pull request Jun 4, 2025
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 reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants