Skip to content
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

[fix](function) stddev with DecimalV2 type will result in an error (#… #39073

Closed
wants to merge 1 commit into from

Conversation

Mryange
Copy link
Contributor

@Mryange Mryange commented Aug 8, 2024

…38731)
#38731
The stddev function has a separate implementation for the DecimalV2 type, but there are issues with the implementation. Given that there is almost no existing data for DecimalV2, it will be removed here. For be, upgrading to this situation will result in an error directly.

SELECT STDDEV(data) FROM DECIMALV2_10_0_DATA;
ERROR 1105 (HY000): errCode = 2, detailMessage = (127.0.0.1)[INTERNAL_ERROR]Agg Function stddev(decimal(10,0)) is not implemented

After removing DecimalV2, parameters of type DecimalV2 will be converted to double for calculations.

Proposed changes

Issue Number: close #xxx

…pache#38731)

The stddev function has a separate implementation for the DecimalV2
type, but there are issues with the implementation. Given that there is
almost no existing data for DecimalV2, it will be removed here. For be,
upgrading to this situation will result in an error directly.
```
SELECT STDDEV(data) FROM DECIMALV2_10_0_DATA;
ERROR 1105 (HY000): errCode = 2, detailMessage = (127.0.0.1)[INTERNAL_ERROR]Agg Function stddev(decimal(10,0)) is not implemented
```
After removing DecimalV2, parameters of type DecimalV2 will be converted
to double for calculations.
@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@Mryange
Copy link
Contributor Author

Mryange commented Aug 8, 2024

run buildall

Copy link
Contributor

github-actions bot commented Aug 8, 2024

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17707	4476	4389	4389
q2	2085	155	148	148
q3	10315	1935	1960	1935
q4	10109	1277	1329	1277
q5	8498	3881	3931	3881
q6	248	144	123	123
q7	2068	1598	1644	1598
q8	9263	2780	2745	2745
q9	10786	10488	10241	10241
q10	8632	3583	3575	3575
q11	425	246	244	244
q12	476	312	309	309
q13	18349	3982	4049	3982
q14	350	329	336	329
q15	533	461	466	461
q16	681	584	575	575
q17	1158	986	963	963
q18	7285	6988	6949	6949
q19	1802	1653	1631	1631
q20	535	303	314	303
q21	4496	4096	4097	4096
q22	532	452	451	451
Total cold run time: 116333 ms
Total hot run time: 50205 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4361	4323	4347	4323
q2	321	238	216	216
q3	4237	4156	4182	4156
q4	2766	2770	2776	2770
q5	7206	7058	7147	7058
q6	239	122	119	119
q7	3324	2920	2841	2841
q8	4388	4484	4495	4484
q9	16973	17035	16812	16812
q10	4253	4271	4310	4271
q11	761	681	702	681
q12	1022	841	860	841
q13	7549	3757	3751	3751
q14	454	418	429	418
q15	499	449	466	449
q16	743	693	685	685
q17	3758	3897	3880	3880
q18	8750	8657	8779	8657
q19	1762	1727	1673	1673
q20	2370	2132	2189	2132
q21	8516	8520	8516	8516
q22	1058	986	979	979
Total cold run time: 85310 ms
Total hot run time: 79712 ms

@doris-robot
Copy link

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

query1	929	403	418	403
query2	6555	2841	2671	2671
query3	6920	219	200	200
query4	21557	17981	17949	17949
query5	19735	6553	6584	6553
query6	303	225	244	225
query7	4160	308	310	308
query8	411	437	414	414
query9	3111	2666	2621	2621
query10	403	305	300	300
query11	11306	10813	10778	10778
query12	128	75	76	75
query13	5643	707	710	707
query14	17280	13755	14010	13755
query15	359	244	246	244
query16	6473	288	284	284
query17	1675	1436	886	886
query18	2327	413	417	413
query19	206	152	164	152
query20	74	80	79	79
query21	189	98	101	98
query22	5341	5026	4971	4971
query23	32552	31923	31801	31801
query24	7048	6550	6521	6521
query25	518	449	427	427
query26	662	173	162	162
query27	2076	307	298	298
query28	6208	2384	2344	2344
query29	2939	2751	2849	2751
query30	245	174	170	170
query31	925	746	780	746
query32	69	63	61	61
query33	403	259	258	258
query34	862	467	481	467
query35	1134	884	957	884
query36	1161	1426	1107	1107
query37	91	58	61	58
query38	3086	2890	2955	2890
query39	1381	1342	1323	1323
query40	312	97	96	96
query41	48	45	44	44
query42	89	87	84	84
query43	716	643	854	643
query44	1138	733	740	733
query45	248	236	237	236
query46	1229	964	967	964
query47	1839	1786	1850	1786
query48	1027	730	714	714
query49	646	372	364	364
query50	865	616	602	602
query51	4691	4670	4652	4652
query52	106	99	89	89
query53	450	334	317	317
query54	2644	2430	2474	2430
query55	86	83	86	83
query56	233	245	216	216
query57	1244	1042	1096	1042
query58	224	217	215	215
query59	4092	3939	4336	3939
query60	218	219	218	218
query61	98	92	97	92
query62	701	496	518	496
query63	477	347	340	340
query64	2711	1574	1444	1444
query65	3642	3575	3550	3550
query66	795	391	375	375
query67	17771	15602	15930	15602
query68	9467	670	635	635
query69	588	381	347	347
query70	1630	1631	1442	1442
query71	423	326	314	314
query72	6559	3511	3535	3511
query73	744	338	331	331
query74	6257	5827	5867	5827
query75	5369	3760	3701	3701
query76	5867	1190	1219	1190
query77	974	268	257	257
query78	12757	11990	11481	11481
query79	8714	667	657	657
query80	1384	403	411	403
query81	497	244	235	235
query82	1580	102	98	98
query83	179	135	133	133
query84	267	72	69	69
query85	897	333	337	333
query86	328	291	292	291
query87	3264	3014	3006	3006
query88	4745	2459	2448	2448
query89	475	290	291	290
query90	1957	217	202	202
query91	172	145	143	143
query92	64	52	53	52
query93	6587	583	575	575
query94	712	210	206	206
query95	1144	1080	1059	1059
query96	653	339	342	339
query97	6436	6390	6275	6275
query98	200	181	181	181
query99	3009	880	857	857
Total cold run time: 318684 ms
Total hot run time: 204608 ms

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 37.76% (8102/21456)
Line Coverage: 29.39% (66351/225796)
Region Coverage: 28.89% (34240/118508)
Branch Coverage: 24.77% (17593/71030)
Coverage Report: http://coverage.selectdb-in.cc/coverage/7b06e6bf77b8052fc0bdc4d86436f394cb5466a6_7b06e6bf77b8052fc0bdc4d86436f394cb5466a6/report/index.html

@doris-robot
Copy link

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

query1	0.02	0.02	0.02
query2	0.07	0.03	0.03
query3	0.24	0.04	0.05
query4	1.82	0.06	0.07
query5	0.55	0.53	0.52
query6	1.30	0.61	0.61
query7	0.01	0.00	0.01
query8	0.03	0.02	0.02
query9	0.52	0.50	0.48
query10	0.55	0.52	0.52
query11	0.14	0.09	0.09
query12	0.12	0.09	0.09
query13	0.63	0.61	0.61
query14	0.79	0.80	0.79
query15	0.78	0.76	0.75
query16	0.37	0.37	0.36
query17	1.00	0.98	1.00
query18	0.22	0.27	0.22
query19	1.93	1.82	1.86
query20	0.01	0.00	0.00
query21	15.47	0.55	0.56
query22	2.03	2.26	1.43
query23	17.01	1.09	0.98
query24	5.47	1.43	0.98
query25	0.36	0.12	0.05
query26	0.69	0.16	0.16
query27	0.04	0.05	0.04
query28	7.26	0.79	0.72
query29	12.63	2.37	2.35
query30	0.58	0.52	0.53
query31	2.81	0.39	0.38
query32	3.37	0.52	0.50
query33	3.06	3.07	3.07
query34	15.27	4.80	4.79
query35	4.87	4.84	4.83
query36	1.06	1.02	1.00
query37	0.06	0.05	0.05
query38	0.03	0.03	0.02
query39	0.02	0.01	0.02
query40	0.17	0.14	0.14
query41	0.07	0.02	0.01
query42	0.02	0.01	0.02
query43	0.02	0.02	0.01
Total cold run time: 103.47 s
Total hot run time: 30.61 s

@doris-robot
Copy link

Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'

Load test result on commit 7b06e6bf77b8052fc0bdc4d86436f394cb5466a6 with default session variables
Stream load json:         19 seconds loaded 2358488459 Bytes, about 118 MB/s
Stream load orc:          58 seconds loaded 1101869774 Bytes, about 18 MB/s
Stream load parquet:      31 seconds loaded 861443392 Bytes, about 26 MB/s
Insert into select:       21.4 seconds inserted 10000000 Rows, about 467K ops/s

@Mryange Mryange closed this Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants