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](compile)fix mac compile : std no member numbers error. #41075

Merged
merged 1 commit into from
Sep 21, 2024

Conversation

hubgeter
Copy link
Contributor

before pr : #40695

Proposed changes

Fix the bug that be will have this error when compiling on mac.

be/src/vec/functions/math.cpp:416:39: error: no member named 'numbers' in namespace 'std'
        constexpr double sqrt2 = std::numbers::sqrt2;
                                 ~~~~~^
1 error generated.

@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.

@hubgeter
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 37.25% (9598/25769)
Line Coverage: 28.63% (79325/277032)
Region Coverage: 28.10% (41048/146100)
Branch Coverage: 24.72% (20914/84588)
Coverage Report: http://coverage.selectdb-in.cc/coverage/aa7441d29e2d4368f54ab752db7ff50c020b9c73_aa7441d29e2d4368f54ab752db7ff50c020b9c73/report/index.html

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17574	7457	7272	7272
q2	2034	166	156	156
q3	10667	1064	1166	1064
q4	10569	730	768	730
q5	7770	3066	3089	3066
q6	240	154	155	154
q7	1013	644	585	585
q8	9461	2006	2063	2006
q9	6827	6396	6370	6370
q10	7025	2275	2270	2270
q11	445	245	247	245
q12	411	212	215	212
q13	17771	2989	2979	2979
q14	233	221	205	205
q15	578	529	543	529
q16	696	630	623	623
q17	985	811	787	787
q18	7223	6785	6752	6752
q19	1413	1099	1020	1020
q20	570	291	283	283
q21	4133	3249	3139	3139
q22	1121	1010	1017	1010
Total cold run time: 108759 ms
Total hot run time: 41457 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7257	7275	7220	7220
q2	339	228	233	228
q3	3013	2930	3015	2930
q4	2026	1827	1843	1827
q5	5598	5575	5567	5567
q6	239	147	146	146
q7	2207	1798	1757	1757
q8	3321	3461	3448	3448
q9	8801	8912	8762	8762
q10	3551	3419	3489	3419
q11	580	482	498	482
q12	810	595	591	591
q13	10654	3179	3152	3152
q14	291	270	268	268
q15	605	527	536	527
q16	732	683	686	683
q17	1820	1598	1562	1562
q18	8161	7750	7744	7744
q19	1731	1544	1562	1544
q20	2125	1862	1863	1862
q21	5700	5340	5336	5336
q22	1191	1070	1047	1047
Total cold run time: 70752 ms
Total hot run time: 60102 ms

@doris-robot
Copy link

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

query1	1274	871	877	871
query2	6399	2002	2020	2002
query3	10800	3867	3927	3867
query4	64335	26679	23519	23519
query5	5203	468	459	459
query6	416	183	158	158
query7	5548	312	293	293
query8	317	228	223	223
query9	8714	2627	2631	2627
query10	479	293	289	289
query11	17851	15162	15856	15162
query12	164	105	106	105
query13	1507	418	427	418
query14	10885	7650	7631	7631
query15	212	185	184	184
query16	7049	478	475	475
query17	1143	665	621	621
query18	1895	331	322	322
query19	211	155	161	155
query20	131	110	115	110
query21	215	109	106	106
query22	4816	4428	4677	4428
query23	34914	33978	34169	33978
query24	6017	2884	2926	2884
query25	514	419	431	419
query26	650	159	164	159
query27	1655	283	288	283
query28	4295	2454	2423	2423
query29	694	433	437	433
query30	239	152	164	152
query31	978	797	823	797
query32	76	56	57	56
query33	403	311	319	311
query34	918	509	503	503
query35	833	751	724	724
query36	1069	931	965	931
query37	149	87	87	87
query38	3951	3872	3886	3872
query39	1499	1411	1425	1411
query40	214	99	97	97
query41	52	48	50	48
query42	113	99	96	96
query43	534	483	471	471
query44	1184	811	801	801
query45	201	163	165	163
query46	1137	791	781	781
query47	1950	1856	1820	1820
query48	486	353	359	353
query49	710	409	409	409
query50	842	432	408	408
query51	7023	6814	6961	6814
query52	96	88	86	86
query53	260	183	179	179
query54	569	449	449	449
query55	80	76	79	76
query56	274	267	250	250
query57	1209	1082	1057	1057
query58	218	232	231	231
query59	3227	2902	2790	2790
query60	300	272	270	270
query61	107	106	107	106
query62	762	652	658	652
query63	213	185	180	180
query64	1682	652	639	639
query65	3258	3162	3160	3160
query66	609	298	298	298
query67	15889	15713	15488	15488
query68	4373	575	580	575
query69	514	292	294	292
query70	1218	1132	1133	1132
query71	395	271	274	271
query72	7537	3971	4025	3971
query73	778	328	329	328
query74	10564	8973	9037	8973
query75	3425	2690	2685	2685
query76	2221	888	872	872
query77	560	298	288	288
query78	10070	9146	9139	9139
query79	2249	545	562	545
query80	1180	446	448	446
query81	569	239	245	239
query82	1314	151	145	145
query83	316	132	135	132
query84	290	80	77	77
query85	1097	294	299	294
query86	450	311	313	311
query87	4457	4295	4316	4295
query88	3141	2321	2331	2321
query89	408	285	279	279
query90	1978	189	190	189
query91	176	143	144	143
query92	70	50	47	47
query93	3100	539	536	536
query94	862	284	270	270
query95	354	260	248	248
query96	638	284	284	284
query97	3244	3117	3080	3080
query98	217	193	197	193
query99	1694	1300	1279	1279
Total cold run time: 321076 ms
Total hot run time: 195499 ms

@doris-robot
Copy link

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

query1	0.05	0.04	0.04
query2	0.07	0.03	0.02
query3	0.23	0.06	0.06
query4	1.66	0.10	0.10
query5	0.53	0.52	0.51
query6	1.13	0.72	0.73
query7	0.02	0.01	0.02
query8	0.05	0.03	0.02
query9	0.57	0.48	0.50
query10	0.56	0.58	0.54
query11	0.15	0.11	0.11
query12	0.14	0.11	0.11
query13	0.61	0.60	0.59
query14	3.06	3.02	2.95
query15	0.89	0.83	0.81
query16	0.38	0.40	0.38
query17	0.98	1.04	1.01
query18	0.19	0.20	0.19
query19	1.98	1.88	2.03
query20	0.01	0.01	0.01
query21	15.38	0.60	0.58
query22	2.23	2.27	2.58
query23	17.50	0.78	0.79
query24	2.89	0.87	0.87
query25	0.27	0.21	0.03
query26	0.34	0.12	0.12
query27	0.04	0.04	0.04
query28	10.98	1.10	1.06
query29	12.53	3.34	3.26
query30	0.26	0.07	0.06
query31	2.86	0.39	0.36
query32	3.27	0.47	0.46
query33	2.97	2.98	3.08
query34	16.94	4.42	4.41
query35	4.51	4.41	4.38
query36	0.66	0.48	0.48
query37	0.09	0.06	0.06
query38	0.05	0.04	0.03
query39	0.03	0.03	0.01
query40	0.15	0.12	0.13
query41	0.08	0.02	0.02
query42	0.03	0.02	0.02
query43	0.03	0.03	0.03
Total cold run time: 107.35 s
Total hot run time: 32.97 s

Copy link
Contributor

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

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Sep 21, 2024
Copy link
Contributor

PR approved by anyone and no changes requested.

@yiguolei yiguolei merged commit d348d83 into apache:master Sep 21, 2024
24 of 29 checks passed
hubgeter added a commit to hubgeter/doris that referenced this pull request Oct 9, 2024
…41075)

before pr : apache#40695 
## Proposed changes

Fix the bug that be will have this error when compiling on mac.
```
be/src/vec/functions/math.cpp:416:39: error: no member named 'numbers' in namespace 'std'
        constexpr double sqrt2 = std::numbers::sqrt2;
                                 ~~~~~^
1 error generated.
```
morningman pushed a commit that referenced this pull request Oct 11, 2024
…_iso8601_date (#40695 and #41075) (#41600)

bp #40695 and #41075
#41075 : fix  #40695 mac compile 

## Proposed changes
Added three functions: `normal_cdf`, `to_iso8601`, `from_iso8601_date`

1. `normal_cdf(mean, sd, v) → double` : 
Compute the Normal cdf with given mean and standard deviation (sd): P(N
< value; mean, sd). The mean and value must be real values and the
standard deviation must be a real and positive value (all of type
DOUBLE).


2. `to_iso8601(DATE/DATETIME) → string`
For `DATE` type, it will be converted to `YYYY-MM-DD`.
For `DATETIME` type, it will be converted to
`YYYY-MM-DDThh:mm:ss.xxxxxx`.


3. `from_iso8601_date(string) →  DATE`
Convert iso8601 string to `DATE` type.
The supported iso8601 string formats are as follows:
    a.  Year : YYYY
    b. Calendar dates : YYYY-MM-DD   , YYYYMMDD ,   YYYY-MM 
    c. Week dates : YYYY-Www  , YYYYWww  , YYYY-Www-D , YYYYWwwD
    d. Ordinal dates : YYYY-DDD , YYYYDDD
You can refer to this [document](https://en.wikipedia.org/wiki/ISO_8601)
to understand what these formats mean
Please note that:
a. Each date and time value has a fixed number of digits that must be
padded with leading zeros.
     b. The range of YYYY is 0001-9999.
outside these rules, the correctness of the results is not guaranteed.


For illegal values, the result is NULL.
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.7-merged dev/3.0.3-merged reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants