Skip to content

Conversation

@HappenLee
Copy link
Contributor

@HappenLee HappenLee commented Jan 16, 2025

What problem does this PR solve?

Fix Percentile* func core when percent args is negative number

After the pr, can check the percent args is in [0,1], else throw exception

start BE in local mode
*** Query id: cdf31a0f13d04a55-8b84a72628d5a8a0 ***
*** is nereids: 1 ***
*** tablet id: 0 ***
*** Aborted at 1736941916 (unix time) try "date -d @1736941916" if you are using GNU date ***
*** Current BE git commitID: 77031acda0 ***
*** SIGSEGV address not mapped to object (@0x7fba49150840) received by PID 7647 (TID 10021 OR 0x7fb14659f640) from PID 1226115136; stack trace: ***
 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/common/signal_handler.h:421
 1# PosixSignals::chained_handler(int, siginfo*, void*) [clone .part.0] in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so
 2# JVM_handle_linux_signal in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so
 3# 0x00007FB26EB4E520 in /lib/x86_64-linux-gnu/libc.so.6
 4# doris::Counts::terminate(double) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/util/counts.h:207
 5# doris::vectorized::AggregateFunctionPercentileArray::insert_result_into(char const*, doris::vectorized::IColumn&) const at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/vec/aggregate_functions/aggregate_function_percentile.h:528
 6# doris::pipeline::AggLocalState::_get_without_key_result(doris::RuntimeState*, doris::vectorized::Block*, bool*) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/pipeline/exec/aggregation_source_operator.cpp:385
 7# std::_Function_handler, std::_Placeholder<2>, std::_Placeholder<3>))(doris::RuntimeState*, doris::vectorized::Block*, bool*)> >::_M_invoke(std::_Any_data const&, doris::RuntimeState*&&, doris::vectorized::Block*&&, bool*&&) at /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_function.h:291
 8# doris::pipeline::AggSourceOperatorX::get_block(doris::RuntimeState*, doris::vectorized::Block*, bool*) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/pipeline/exec/aggregation_source_operator.cpp:438
 9# doris::pipeline::OperatorXBase::get_block_after_projects(doris::RuntimeState*, doris::vectorized::Block*, bool*) in /mnt/hdd01/ci/doris-deploy-branch-3.0-local/be/lib/doris_be
10# doris::pipeline::PipelineTask::execute(bool*) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/pipeline/pipeline_task.cpp:376
11# doris::pipeline::TaskScheduler::_do_work(unsigned long) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/pipeline/task_scheduler.cpp:138
12# doris::ThreadPool::dispatch_thread() in /mnt/hdd01/ci/doris-deploy-branch-3.0-local/be/lib/doris_be
13# doris::Thread::supervise_thread(void*) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/util/thread.cpp:499
14# start_thread at ./nptl/pthread_create.c:442
15# 0x00007FB26EC32850 at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:83
172.20.48.199 last coredump sql: 2025-01-15 19:52:25,410 [query] Query cdf31a0f13d04a55-8b84a72628d5a8a0 1 times with new query id: 171586b2ada34e68-b90ec1fa65013f9f
2025-01-15 19:52:57,126 [query] Query cdf31a0f13d04a55-8b84a72628d5a8a0 2 times with new query id: a44ad498175f4b2d-b3eb8478dc70fa97 

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 Jan 16, 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?

@HappenLee
Copy link
Contributor Author

run buildall

@HappenLee
Copy link
Contributor Author

run buildall

@HappenLee
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 41.52% (10820/26059)
Line Coverage: 31.92% (91439/286454)
Region Coverage: 31.06% (46838/150793)
Branch Coverage: 27.16% (23724/87354)
Coverage Report: http://coverage.selectdb-in.cc/coverage/fdf88387a05ba5a55ed5bb5d5296bdbcb49e66c2_fdf88387a05ba5a55ed5bb5d5296bdbcb49e66c2/report/index.html

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17583	5510	5425	5425
q2	2069	307	173	173
q3	10519	1242	732	732
q4	10236	982	530	530
q5	8006	2413	2162	2162
q6	197	163	131	131
q7	907	776	617	617
q8	9241	1370	1150	1150
q9	5268	4952	4920	4920
q10	6845	2360	1893	1893
q11	467	272	251	251
q12	339	352	214	214
q13	17761	3675	3115	3115
q14	232	221	199	199
q15	512	458	464	458
q16	625	601	592	592
q17	561	873	317	317
q18	7027	6613	6385	6385
q19	2007	962	540	540
q20	302	314	184	184
q21	2793	2188	1970	1970
q22	356	335	313	313
Total cold run time: 103853 ms
Total hot run time: 32271 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5640	5470	5466	5466
q2	230	333	231	231
q3	2291	2644	2314	2314
q4	1458	1819	1368	1368
q5	4302	4712	4637	4637
q6	166	159	132	132
q7	2038	1946	1834	1834
q8	2624	2808	2718	2718
q9	7287	7249	7300	7249
q10	3043	3286	2800	2800
q11	586	515	505	505
q12	653	711	593	593
q13	3449	3990	3290	3290
q14	290	302	260	260
q15	524	467	468	467
q16	680	697	648	648
q17	1222	1725	1252	1252
q18	7731	7491	7382	7382
q19	814	1140	1145	1140
q20	1990	2101	1891	1891
q21	5842	5274	4828	4828
q22	625	658	579	579
Total cold run time: 53485 ms
Total hot run time: 51584 ms

@doris-robot
Copy link

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

query1	1346	951	922	922
query2	6469	2085	2040	2040
query3	11166	4448	4541	4448
query4	61671	34085	23035	23035
query5	5602	614	450	450
query6	355	194	195	194
query7	5031	501	314	314
query8	331	239	230	230
query9	6533	2596	2577	2577
query10	432	300	251	251
query11	15366	15144	15394	15144
query12	169	112	120	112
query13	1032	549	441	441
query14	10782	6371	7534	6371
query15	205	193	192	192
query16	7049	622	451	451
query17	1151	711	559	559
query18	1720	400	310	310
query19	203	191	162	162
query20	122	112	115	112
query21	215	122	108	108
query22	4702	4562	4491	4491
query23	34098	33340	33482	33340
query24	5568	2390	2270	2270
query25	468	461	403	403
query26	642	272	155	155
query27	1666	476	335	335
query28	4303	2493	2455	2455
query29	518	592	428	428
query30	211	183	153	153
query31	931	907	832	832
query32	65	54	57	54
query33	427	386	302	302
query34	737	862	511	511
query35	810	855	753	753
query36	1011	1057	947	947
query37	129	104	79	79
query38	4194	4310	4263	4263
query39	1504	1458	1495	1458
query40	209	109	100	100
query41	51	52	46	46
query42	120	106	102	102
query43	526	535	481	481
query44	1365	827	807	807
query45	202	178	174	174
query46	888	1077	680	680
query47	1951	1943	1852	1852
query48	384	412	327	327
query49	705	487	390	390
query50	680	667	404	404
query51	7129	7035	7115	7035
query52	105	103	92	92
query53	240	249	180	180
query54	476	496	411	411
query55	83	80	80	80
query56	260	275	245	245
query57	1237	1215	1164	1164
query58	242	226	232	226
query59	3011	3042	2916	2916
query60	274	253	253	253
query61	149	108	107	107
query62	745	712	672	672
query63	233	183	184	183
query64	1281	999	650	650
query65	3257	3174	3158	3158
query66	700	390	288	288
query67	15852	15733	15602	15602
query68	4991	835	530	530
query69	497	292	258	258
query70	1195	1112	1119	1112
query71	435	281	254	254
query72	5303	3909	3910	3909
query73	798	749	358	358
query74	10196	8952	9029	8952
query75	3206	3149	2637	2637
query76	3798	1180	761	761
query77	509	360	269	269
query78	10284	9992	9328	9328
query79	3551	811	586	586
query80	1661	527	430	430
query81	556	274	239	239
query82	356	157	110	110
query83	276	171	149	149
query84	389	94	76	76
query85	769	349	298	298
query86	459	302	295	295
query87	4353	4507	4396	4396
query88	3906	2161	2128	2128
query89	400	319	284	284
query90	1566	186	184	184
query91	139	131	104	104
query92	66	63	55	55
query93	2774	861	527	527
query94	752	421	295	295
query95	330	264	248	248
query96	493	630	276	276
query97	2867	2882	2758	2758
query98	216	202	203	202
query99	1423	1371	1259	1259
Total cold run time: 309803 ms
Total hot run time: 193544 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.03
query2	0.07	0.03	0.03
query3	0.24	0.07	0.07
query4	1.61	0.10	0.10
query5	0.42	0.42	0.40
query6	1.16	0.65	0.65
query7	0.02	0.01	0.02
query8	0.04	0.04	0.03
query9	0.58	0.51	0.51
query10	0.56	0.56	0.55
query11	0.15	0.10	0.10
query12	0.14	0.10	0.12
query13	0.61	0.60	0.59
query14	2.70	2.78	2.75
query15	0.90	0.83	0.83
query16	0.38	0.38	0.39
query17	1.06	1.07	1.06
query18	0.21	0.20	0.21
query19	1.90	1.82	2.03
query20	0.01	0.01	0.01
query21	15.39	0.95	0.58
query22	0.76	0.74	0.90
query23	15.09	1.39	0.52
query24	2.85	1.26	2.09
query25	0.17	0.17	0.11
query26	0.19	0.15	0.14
query27	0.04	0.06	0.03
query28	14.39	0.96	0.42
query29	12.61	3.93	3.25
query30	0.25	0.09	0.06
query31	2.82	0.60	0.39
query32	3.23	0.55	0.45
query33	3.01	3.02	3.08
query34	16.62	5.17	4.50
query35	4.62	4.57	4.56
query36	0.64	0.48	0.50
query37	0.09	0.07	0.06
query38	0.04	0.04	0.03
query39	0.03	0.03	0.02
query40	0.18	0.14	0.13
query41	0.08	0.03	0.02
query42	0.04	0.02	0.02
query43	0.03	0.03	0.03
Total cold run time: 105.96 s
Total hot run time: 31.04 s

@HappenLee
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17586	5524	5390	5390
q2	2051	302	166	166
q3	10509	1286	725	725
q4	10247	967	536	536
q5	8218	2429	2168	2168
q6	200	164	135	135
q7	923	761	597	597
q8	9259	1343	1164	1164
q9	5218	4887	4934	4887
q10	6839	2319	1910	1910
q11	483	279	261	261
q12	348	361	217	217
q13	17793	3672	3084	3084
q14	230	225	213	213
q15	519	480	456	456
q16	625	628	584	584
q17	577	870	325	325
q18	7110	6519	6536	6519
q19	1547	964	549	549
q20	326	321	186	186
q21	3016	2188	1992	1992
q22	381	327	312	312
Total cold run time: 104005 ms
Total hot run time: 32376 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5477	5444	5457	5444
q2	236	338	243	243
q3	2287	2611	2352	2352
q4	1397	1783	1369	1369
q5	4323	4765	4640	4640
q6	167	160	131	131
q7	2139	1938	1856	1856
q8	2624	2830	2715	2715
q9	7236	7121	7279	7121
q10	2942	3270	2758	2758
q11	577	498	522	498
q12	690	766	591	591
q13	3618	3834	3366	3366
q14	271	302	287	287
q15	507	475	467	467
q16	637	678	627	627
q17	1233	1745	1243	1243
q18	7644	7343	7463	7343
q19	789	1192	1033	1033
q20	2010	2032	1887	1887
q21	5666	5109	4987	4987
q22	582	575	536	536
Total cold run time: 53052 ms
Total hot run time: 51494 ms

@doris-robot
Copy link

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

query1	974	374	372	372
query2	6524	2052	2097	2052
query3	6788	221	215	215
query4	33087	23670	23079	23079
query5	4381	617	486	486
query6	293	204	209	204
query7	4601	496	306	306
query8	298	240	233	233
query9	9463	2596	2604	2596
query10	496	325	256	256
query11	18077	15148	14881	14881
query12	168	111	108	108
query13	1651	513	415	415
query14	10679	7257	6765	6765
query15	242	191	179	179
query16	7637	652	450	450
query17	1600	711	549	549
query18	1931	368	295	295
query19	226	178	161	161
query20	141	109	110	109
query21	206	119	101	101
query22	4324	4339	4298	4298
query23	33728	33432	32697	32697
query24	6446	2325	2217	2217
query25	497	465	380	380
query26	1216	269	152	152
query27	2017	462	335	335
query28	5109	2421	2400	2400
query29	706	545	422	422
query30	233	188	167	167
query31	944	852	809	809
query32	101	59	60	59
query33	531	361	298	298
query34	773	850	508	508
query35	818	819	722	722
query36	984	1025	959	959
query37	119	96	80	80
query38	4072	4187	4072	4072
query39	1466	1400	1385	1385
query40	204	119	100	100
query41	52	54	50	50
query42	113	100	110	100
query43	511	535	489	489
query44	1320	803	826	803
query45	176	173	163	163
query46	856	1031	645	645
query47	1824	1872	1764	1764
query48	381	412	321	321
query49	778	496	393	393
query50	621	647	395	395
query51	7078	6829	6731	6731
query52	100	102	90	90
query53	233	253	197	197
query54	469	500	444	444
query55	83	79	78	78
query56	258	265	259	259
query57	1168	1132	1074	1074
query58	249	234	245	234
query59	3015	3023	3048	3023
query60	269	275	258	258
query61	119	115	117	115
query62	777	709	648	648
query63	220	189	186	186
query64	4624	1007	652	652
query65	3279	3149	3177	3149
query66	853	410	304	304
query67	15941	15744	15359	15359
query68	5458	812	532	532
query69	461	290	261	261
query70	1232	1165	1137	1137
query71	389	285	307	285
query72	5904	3816	3790	3790
query73	655	745	357	357
query74	10370	9193	8746	8746
query75	3182	3202	2705	2705
query76	3285	1204	767	767
query77	470	359	277	277
query78	10298	9999	9385	9385
query79	2698	799	615	615
query80	678	535	442	442
query81	516	284	239	239
query82	218	153	127	127
query83	178	176	151	151
query84	234	87	74	74
query85	747	337	302	302
query86	386	314	297	297
query87	4377	4417	4294	4294
query88	4583	2178	2148	2148
query89	392	335	288	288
query90	1887	192	193	192
query91	135	150	108	108
query92	70	59	53	53
query93	2363	908	544	544
query94	654	399	295	295
query95	334	268	275	268
query96	498	616	284	284
query97	2777	2919	2750	2750
query98	228	207	202	202
query99	1269	1378	1301	1301
Total cold run time: 286044 ms
Total hot run time: 187012 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 cdfc5aaaaad5c6f173d20d84c05b23f55c128d74, data reload: false

query1	0.03	0.03	0.04
query2	0.07	0.03	0.04
query3	0.24	0.07	0.06
query4	1.62	0.11	0.10
query5	0.44	0.43	0.40
query6	1.16	0.65	0.64
query7	0.02	0.01	0.01
query8	0.04	0.03	0.03
query9	0.59	0.50	0.49
query10	0.54	0.56	0.55
query11	0.14	0.10	0.10
query12	0.14	0.11	0.11
query13	0.61	0.62	0.60
query14	2.71	2.83	2.73
query15	0.91	0.84	0.81
query16	0.39	0.37	0.37
query17	1.03	1.00	1.02
query18	0.24	0.20	0.21
query19	1.89	1.98	1.89
query20	0.01	0.01	0.01
query21	15.36	0.95	0.56
query22	0.75	0.86	0.73
query23	15.17	1.50	0.56
query24	3.51	1.91	1.39
query25	0.14	0.14	0.07
query26	0.32	0.16	0.13
query27	0.05	0.05	0.05
query28	14.22	0.92	0.44
query29	12.61	3.99	3.31
query30	0.24	0.08	0.06
query31	2.84	0.59	0.39
query32	3.22	0.54	0.45
query33	3.01	3.02	3.04
query34	16.64	5.09	4.48
query35	4.52	4.50	4.48
query36	0.67	0.48	0.47
query37	0.10	0.06	0.06
query38	0.04	0.03	0.03
query39	0.03	0.02	0.03
query40	0.17	0.13	0.13
query41	0.08	0.03	0.03
query42	0.04	0.02	0.02
query43	0.04	0.03	0.04
Total cold run time: 106.59 s
Total hot run time: 31.07 s

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 41.52% (10820/26061)
Line Coverage: 31.91% (91419/286487)
Region Coverage: 31.06% (46847/150807)
Branch Coverage: 27.16% (23730/87364)
Coverage Report: http://coverage.selectdb-in.cc/coverage/cdfc5aaaaad5c6f173d20d84c05b23f55c128d74_cdfc5aaaaad5c6f173d20d84c05b23f55c128d74/report/index.html

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

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

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.


@Override
public void checkLegalityBeforeTypeCoercion() {
if (!getArgument(1).isConstant()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

If the limit is constant, can we also add the limit of not null and [0,1] value range?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

now FE can't sure the const fold ready in FE, so union check in BE

@HappenLee HappenLee merged commit 1b9262c into apache:master Jan 20, 2025
27 of 31 checks passed
github-actions bot pushed a commit that referenced this pull request Jan 20, 2025
…#47068)

### What problem does this PR solve?

Fix Percentile* func core when percent args is negative number

After the pr, can check the percent args is in [0,1], else throw
exception

```
start BE in local mode
*** Query id: cdf31a0f13d04a55-8b84a72628d5a8a0 ***
*** is nereids: 1 ***
*** tablet id: 0 ***
*** Aborted at 1736941916 (unix time) try "date -d @1736941916" if you are using GNU date ***
*** Current BE git commitID: 77031ac ***
*** SIGSEGV address not mapped to object (@0x7fba49150840) received by PID 7647 (TID 10021 OR 0x7fb14659f640) from PID 1226115136; stack trace: ***
 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/common/signal_handler.h:421
 1# PosixSignals::chained_handler(int, siginfo*, void*) [clone .part.0] in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so
 2# JVM_handle_linux_signal in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so
 3# 0x00007FB26EB4E520 in /lib/x86_64-linux-gnu/libc.so.6
 4# doris::Counts::terminate(double) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/util/counts.h:207
 5# doris::vectorized::AggregateFunctionPercentileArray::insert_result_into(char const*, doris::vectorized::IColumn&) const at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/vec/aggregate_functions/aggregate_function_percentile.h:528
 6# doris::pipeline::AggLocalState::_get_without_key_result(doris::RuntimeState*, doris::vectorized::Block*, bool*) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/pipeline/exec/aggregation_source_operator.cpp:385
 7# std::_Function_handler, std::_Placeholder<2>, std::_Placeholder<3>))(doris::RuntimeState*, doris::vectorized::Block*, bool*)> >::_M_invoke(std::_Any_data const&, doris::RuntimeState*&&, doris::vectorized::Block*&&, bool*&&) at /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_function.h:291
 8# doris::pipeline::AggSourceOperatorX::get_block(doris::RuntimeState*, doris::vectorized::Block*, bool*) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/pipeline/exec/aggregation_source_operator.cpp:438
 9# doris::pipeline::OperatorXBase::get_block_after_projects(doris::RuntimeState*, doris::vectorized::Block*, bool*) in /mnt/hdd01/ci/doris-deploy-branch-3.0-local/be/lib/doris_be
10# doris::pipeline::PipelineTask::execute(bool*) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/pipeline/pipeline_task.cpp:376
11# doris::pipeline::TaskScheduler::_do_work(unsigned long) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/pipeline/task_scheduler.cpp:138
12# doris::ThreadPool::dispatch_thread() in /mnt/hdd01/ci/doris-deploy-branch-3.0-local/be/lib/doris_be
13# doris::Thread::supervise_thread(void*) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/util/thread.cpp:499
14# start_thread at ./nptl/pthread_create.c:442
15# 0x00007FB26EC32850 at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:83
172.20.48.199 last coredump sql: 2025-01-15 19:52:25,410 [query] Query cdf31a0f13d04a55-8b84a72628d5a8a0 1 times with new query id: 171586b2ada34e68-b90ec1fa65013f9f
2025-01-15 19:52:57,126 [query] Query cdf31a0f13d04a55-8b84a72628d5a8a0 2 times with new query id: a44ad498175f4b2d-b3eb8478dc70fa97 
```
@wm1581066 wm1581066 added the p0_c label Jan 21, 2025
HappenLee added a commit that referenced this pull request Feb 7, 2025
…ative number #47068 (#47219)

Cherry-picked from #47068

Co-authored-by: HappenLee <happenlee@selectdb.com>
@gavinchou gavinchou mentioned this pull request Feb 18, 2025
lzyy2024 pushed a commit to lzyy2024/doris that referenced this pull request Feb 21, 2025
…apache#47068)

### What problem does this PR solve?

Fix Percentile* func core when percent args is negative number

After the pr, can check the percent args is in [0,1], else throw
exception

```
start BE in local mode
*** Query id: cdf31a0f13d04a55-8b84a72628d5a8a0 ***
*** is nereids: 1 ***
*** tablet id: 0 ***
*** Aborted at 1736941916 (unix time) try "date -d @1736941916" if you are using GNU date ***
*** Current BE git commitID: 77031ac ***
*** SIGSEGV address not mapped to object (@0x7fba49150840) received by PID 7647 (TID 10021 OR 0x7fb14659f640) from PID 1226115136; stack trace: ***
 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/common/signal_handler.h:421
 1# PosixSignals::chained_handler(int, siginfo*, void*) [clone .part.0] in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so
 2# JVM_handle_linux_signal in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so
 3# 0x00007FB26EB4E520 in /lib/x86_64-linux-gnu/libc.so.6
 4# doris::Counts::terminate(double) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/util/counts.h:207
 5# doris::vectorized::AggregateFunctionPercentileArray::insert_result_into(char const*, doris::vectorized::IColumn&) const at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/vec/aggregate_functions/aggregate_function_percentile.h:528
 6# doris::pipeline::AggLocalState::_get_without_key_result(doris::RuntimeState*, doris::vectorized::Block*, bool*) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/pipeline/exec/aggregation_source_operator.cpp:385
 7# std::_Function_handler, std::_Placeholder<2>, std::_Placeholder<3>))(doris::RuntimeState*, doris::vectorized::Block*, bool*)> >::_M_invoke(std::_Any_data const&, doris::RuntimeState*&&, doris::vectorized::Block*&&, bool*&&) at /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_function.h:291
 8# doris::pipeline::AggSourceOperatorX::get_block(doris::RuntimeState*, doris::vectorized::Block*, bool*) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/pipeline/exec/aggregation_source_operator.cpp:438
 9# doris::pipeline::OperatorXBase::get_block_after_projects(doris::RuntimeState*, doris::vectorized::Block*, bool*) in /mnt/hdd01/ci/doris-deploy-branch-3.0-local/be/lib/doris_be
10# doris::pipeline::PipelineTask::execute(bool*) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/pipeline/pipeline_task.cpp:376
11# doris::pipeline::TaskScheduler::_do_work(unsigned long) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/pipeline/task_scheduler.cpp:138
12# doris::ThreadPool::dispatch_thread() in /mnt/hdd01/ci/doris-deploy-branch-3.0-local/be/lib/doris_be
13# doris::Thread::supervise_thread(void*) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/util/thread.cpp:499
14# start_thread at ./nptl/pthread_create.c:442
15# 0x00007FB26EC32850 at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:83
172.20.48.199 last coredump sql: 2025-01-15 19:52:25,410 [query] Query cdf31a0f13d04a55-8b84a72628d5a8a0 1 times with new query id: 171586b2ada34e68-b90ec1fa65013f9f
2025-01-15 19:52:57,126 [query] Query cdf31a0f13d04a55-8b84a72628d5a8a0 2 times with new query id: a44ad498175f4b2d-b3eb8478dc70fa97 
```
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.4-merged p0_c reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants