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

[Refactor](timezone) refactor tzdata load to accelerate and unify timezone parsing #37062

Merged
merged 7 commits into from
Jul 4, 2024

Conversation

zclllyybb
Copy link
Contributor

@zclllyybb zclllyybb commented Jul 1, 2024

Proposed changes

Issue Number: close #xxx

  1. revert [chore](be) Add default timezone files #25097. we decide to rely on OS. not maintain independent tzdata anymore to keep result consistency
  2. refactor timezone load. removed rwlock.

before:

mysql [optest]>select count(convert_tz(d, 'Asia/Shanghai', 'America/Los_Angeles')), count(convert_tz(dt, 'America/Los_Angeles', '+00:00')) from dates; 
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
| count(convert_tz(cast(d as DATETIMEV2(6)), 'Asia/Shanghai', 'America/Los_Angeles')) | count(convert_tz(dt, 'America/Los_Angeles', '+00:00')) |
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
|                                                                            16000000 |                                               16000000 |
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
1 row in set (6.88 sec)

now:

mysql [optest]>select count(convert_tz(d, 'Asia/Shanghai', 'America/Los_Angeles')), count(convert_tz(dt, 'America/Los_Angeles', '+00:00')) from dates; 
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
| count(convert_tz(cast(d as DATETIMEV2(6)), 'Asia/Shanghai', 'America/Los_Angeles')) | count(convert_tz(dt, 'America/Los_Angeles', '+00:00')) |
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
|                                                                            16000000 |                                               16000000 |
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
1 row in set (2.61 sec)
  1. now don't support timezone offset format string like 'UTC+8', like we already said in https://doris.apache.org/docs/dev/query/query-variables/time-zone/#usage
  2. support case-insensitive timezone parsing in nereids.
  3. a bug when parse timezone using nereids. should check DST by input, but wrongly by now before. now fixed.

doc pr: apache/doris-website#810

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

@zclllyybb zclllyybb changed the title [Refactor](timezone) [Refactor](timezone) refactor tzdata load to accelerate Jul 1, 2024
@zclllyybb
Copy link
Contributor Author

run buildall

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

be/src/util/timezone_utils.h Outdated Show resolved Hide resolved
@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17603	4482	4306	4306
q2	2019	191	190	190
q3	10487	1230	1181	1181
q4	10207	765	844	765
q5	7513	2687	2646	2646
q6	230	141	141	141
q7	971	603	612	603
q8	9222	2099	2097	2097
q9	8693	6535	6487	6487
q10	8955	3724	3719	3719
q11	444	234	241	234
q12	453	234	236	234
q13	17774	2982	2986	2982
q14	269	227	222	222
q15	534	480	473	473
q16	494	379	376	376
q17	975	675	722	675
q18	8114	7431	7404	7404
q19	7457	1622	1427	1427
q20	686	322	325	322
q21	4857	3226	3307	3226
q22	394	342	335	335
Total cold run time: 118351 ms
Total hot run time: 40045 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4538	4287	4276	4276
q2	368	274	268	268
q3	3003	2872	2910	2872
q4	1978	1642	1733	1642
q5	5576	5517	5484	5484
q6	229	135	133	133
q7	2226	1885	1822	1822
q8	3298	3439	3455	3439
q9	8689	8698	8752	8698
q10	4108	3869	3754	3754
q11	588	516	505	505
q12	843	649	652	649
q13	16134	3214	3206	3206
q14	302	296	275	275
q15	541	471	482	471
q16	489	455	438	438
q17	1839	1510	1512	1510
q18	8087	8027	7680	7680
q19	1780	1636	1566	1566
q20	2251	1870	1876	1870
q21	5169	4984	4778	4778
q22	633	566	564	564
Total cold run time: 72669 ms
Total hot run time: 55900 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 174569 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 3561e6c7072c5ad1348ccdde8095c06e787fb6fd, data reload: false

query1	920	388	378	378
query2	6436	2457	2380	2380
query3	6633	214	217	214
query4	18888	17586	17351	17351
query5	3651	467	475	467
query6	263	165	177	165
query7	4584	293	291	291
query8	316	284	284	284
query9	8541	2421	2403	2403
query10	580	301	290	290
query11	10643	9968	9988	9968
query12	117	91	84	84
query13	1649	387	386	386
query14	10038	7651	7579	7579
query15	244	193	182	182
query16	7945	278	294	278
query17	1887	578	567	567
query18	2060	282	281	281
query19	215	163	164	163
query20	92	82	91	82
query21	216	133	125	125
query22	4345	3983	3992	3983
query23	33875	33522	33681	33522
query24	10661	2926	2833	2833
query25	637	423	387	387
query26	705	156	157	156
query27	2191	329	331	329
query28	6014	2181	2181	2181
query29	920	670	642	642
query30	266	171	164	164
query31	970	764	754	754
query32	102	56	60	56
query33	685	311	301	301
query34	890	493	484	484
query35	763	636	668	636
query36	1140	998	989	989
query37	141	85	84	84
query38	2927	2855	2792	2792
query39	905	855	825	825
query40	220	136	137	136
query41	56	52	53	52
query42	116	105	176	105
query43	609	527	541	527
query44	1085	760	740	740
query45	189	164	163	163
query46	1080	709	712	709
query47	1822	1760	1757	1757
query48	402	304	299	299
query49	860	408	424	408
query50	770	384	382	382
query51	6816	6839	6821	6821
query52	107	94	94	94
query53	377	294	284	284
query54	943	446	454	446
query55	74	74	72	72
query56	285	263	259	259
query57	1113	1055	1049	1049
query58	264	248	242	242
query59	3413	3228	3311	3228
query60	301	281	277	277
query61	94	92	89	89
query62	600	452	460	452
query63	315	286	287	286
query64	8521	2276	1765	1765
query65	3171	3103	3111	3103
query66	748	327	361	327
query67	15598	15047	14751	14751
query68	8110	573	561	561
query69	743	472	327	327
query70	1230	1156	1028	1028
query71	493	271	283	271
query72	9141	5386	5717	5386
query73	1014	335	332	332
query74	5909	5500	5496	5496
query75	5148	2729	2659	2659
query76	4605	992	932	932
query77	781	306	300	300
query78	10646	9732	9672	9672
query79	7484	524	523	523
query80	2206	495	466	466
query81	585	222	219	219
query82	789	105	103	103
query83	281	169	169	169
query84	273	84	81	81
query85	1258	324	264	264
query86	403	325	329	325
query87	3259	3114	3106	3106
query88	4446	2464	2443	2443
query89	499	371	386	371
query90	1933	188	187	187
query91	129	98	100	98
query92	63	48	48	48
query93	5924	519	515	515
query94	1213	187	185	185
query95	402	312	322	312
query96	603	269	274	269
query97	3212	3053	3015	3015
query98	219	202	200	200
query99	1191	847	859	847
Total cold run time: 288196 ms
Total hot run time: 174569 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.03
query2	0.08	0.04	0.04
query3	0.22	0.05	0.05
query4	1.67	0.08	0.08
query5	0.50	0.48	0.49
query6	1.16	0.73	0.72
query7	0.02	0.01	0.02
query8	0.05	0.04	0.04
query9	0.55	0.49	0.49
query10	0.55	0.55	0.54
query11	0.15	0.11	0.12
query12	0.15	0.12	0.12
query13	0.60	0.58	0.61
query14	0.75	0.78	0.79
query15	0.86	0.81	0.81
query16	0.36	0.35	0.34
query17	0.94	1.00	0.96
query18	0.23	0.24	0.24
query19	1.82	1.75	1.70
query20	0.01	0.01	0.01
query21	15.44	0.73	0.63
query22	4.42	6.96	2.41
query23	18.32	1.43	1.26
query24	2.13	0.22	0.23
query25	0.15	0.08	0.09
query26	0.28	0.17	0.17
query27	0.08	0.08	0.09
query28	13.26	1.00	0.99
query29	12.58	3.47	3.49
query30	0.26	0.06	0.05
query31	2.88	0.38	0.38
query32	3.30	0.47	0.47
query33	2.90	2.91	3.00
query34	17.19	4.38	4.41
query35	4.49	4.47	4.60
query36	0.64	0.47	0.47
query37	0.18	0.15	0.16
query38	0.15	0.14	0.15
query39	0.04	0.03	0.04
query40	0.17	0.15	0.15
query41	0.10	0.05	0.04
query42	0.06	0.05	0.04
query43	0.05	0.04	0.04
Total cold run time: 109.77 s
Total hot run time: 31.16 s

@zclllyybb
Copy link
Contributor Author

run buildall

Copy link
Contributor

github-actions bot commented Jul 1, 2024

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

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17808	5306	4435	4435
q2	2640	193	203	193
q3	11855	1216	1073	1073
q4	10545	822	783	783
q5	7553	2716	2636	2636
q6	226	144	144	144
q7	977	610	619	610
q8	9464	2067	2075	2067
q9	9008	6494	6467	6467
q10	8965	3681	3677	3677
q11	466	238	240	238
q12	442	235	238	235
q13	17887	3002	2967	2967
q14	265	216	222	216
q15	515	487	486	486
q16	507	386	368	368
q17	968	667	736	667
q18	8048	7495	7487	7487
q19	4958	1536	1515	1515
q20	670	318	343	318
q21	5000	3172	3324	3172
q22	402	337	345	337
Total cold run time: 119169 ms
Total hot run time: 40091 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4384	4227	4269	4227
q2	378	277	265	265
q3	2993	2753	2776	2753
q4	1917	1634	1551	1551
q5	5248	5289	5287	5287
q6	220	131	135	131
q7	2097	1691	1741	1691
q8	3172	3321	3304	3304
q9	8357	8268	8353	8268
q10	3897	3668	3652	3652
q11	580	481	484	481
q12	796	623	652	623
q13	17444	2974	2956	2956
q14	291	274	254	254
q15	509	469	481	469
q16	458	407	424	407
q17	1788	1506	1471	1471
q18	7655	7627	7457	7457
q19	1719	1624	1515	1515
q20	2001	1758	1776	1758
q21	5020	5074	4793	4793
q22	615	537	529	529
Total cold run time: 71539 ms
Total hot run time: 53842 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 172492 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 349f9440746a558453360427f4f1d187a6690f27, data reload: false

query1	931	395	379	379
query2	6487	2423	2366	2366
query3	6653	209	217	209
query4	19402	17437	17258	17258
query5	4167	487	474	474
query6	292	179	167	167
query7	4615	311	289	289
query8	308	291	298	291
query9	8421	2387	2344	2344
query10	609	291	277	277
query11	10460	10103	9983	9983
query12	130	93	80	80
query13	1644	355	358	355
query14	9358	7544	7371	7371
query15	244	183	193	183
query16	7791	282	263	263
query17	1901	535	516	516
query18	1913	269	275	269
query19	185	145	151	145
query20	113	85	80	80
query21	211	131	122	122
query22	4418	4038	4047	4038
query23	33785	32895	32931	32895
query24	11064	2908	2939	2908
query25	639	355	365	355
query26	1410	150	155	150
query27	2977	311	312	311
query28	7622	2077	2038	2038
query29	947	640	606	606
query30	286	158	152	152
query31	962	715	743	715
query32	92	55	53	53
query33	766	290	281	281
query34	970	453	475	453
query35	730	641	634	634
query36	1119	921	930	921
query37	149	79	73	73
query38	2865	2721	2746	2721
query39	881	794	772	772
query40	215	127	122	122
query41	54	55	51	51
query42	122	102	108	102
query43	570	557	539	539
query44	1177	713	714	713
query45	192	164	165	164
query46	1080	743	696	696
query47	1847	1778	1741	1741
query48	395	295	296	295
query49	1079	413	411	411
query50	762	374	381	374
query51	6839	6702	6843	6702
query52	108	89	91	89
query53	356	287	290	287
query54	943	440	443	440
query55	72	75	73	73
query56	292	259	267	259
query57	1162	1034	1032	1032
query58	255	239	248	239
query59	3427	3352	3089	3089
query60	302	269	277	269
query61	95	91	112	91
query62	644	436	456	436
query63	319	290	326	290
query64	8950	2204	1717	1717
query65	3463	3094	3086	3086
query66	1390	333	330	330
query67	15468	15264	14812	14812
query68	4585	536	540	536
query69	473	295	302	295
query70	1166	1119	1033	1033
query71	419	278	279	278
query72	7123	5864	5604	5604
query73	737	323	324	323
query74	6050	5571	5523	5523
query75	3531	2614	2650	2614
query76	2900	989	917	917
query77	439	296	304	296
query78	10309	9917	9625	9625
query79	2372	504	510	504
query80	921	482	468	468
query81	585	220	218	218
query82	1027	103	103	103
query83	267	168	165	165
query84	240	84	89	84
query85	1589	278	271	271
query86	480	331	293	293
query87	3232	3086	3076	3076
query88	4281	2352	2358	2352
query89	473	383	378	378
query90	1844	187	182	182
query91	124	167	101	101
query92	64	50	50	50
query93	2294	500	495	495
query94	1195	182	179	179
query95	392	308	315	308
query96	598	264	261	261
query97	3182	3077	2987	2987
query98	213	206	189	189
query99	1132	838	844	838
Total cold run time: 273332 ms
Total hot run time: 172492 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.03
query2	0.09	0.05	0.04
query3	0.23	0.05	0.04
query4	1.58	0.07	0.09
query5	0.49	0.48	0.49
query6	1.13	0.73	0.73
query7	0.02	0.02	0.01
query8	0.05	0.04	0.04
query9	0.56	0.49	0.49
query10	0.55	0.54	0.56
query11	0.16	0.12	0.11
query12	0.14	0.13	0.13
query13	0.60	0.59	0.61
query14	0.78	0.80	0.78
query15	0.84	0.80	0.80
query16	0.37	0.38	0.37
query17	1.03	1.04	0.97
query18	0.22	0.23	0.24
query19	1.80	1.83	1.74
query20	0.02	0.01	0.01
query21	15.45	0.75	0.67
query22	4.24	7.26	1.77
query23	18.27	1.33	1.30
query24	2.18	0.22	0.23
query25	0.16	0.09	0.09
query26	0.28	0.17	0.18
query27	0.08	0.08	0.08
query28	13.18	1.01	1.02
query29	12.59	3.28	3.27
query30	0.26	0.06	0.06
query31	2.90	0.39	0.39
query32	3.24	0.48	0.48
query33	2.86	2.93	2.90
query34	17.35	4.42	4.42
query35	4.48	4.49	4.53
query36	0.66	0.46	0.48
query37	0.19	0.16	0.16
query38	0.16	0.15	0.15
query39	0.04	0.04	0.03
query40	0.19	0.14	0.15
query41	0.10	0.05	0.05
query42	0.05	0.05	0.05
query43	0.05	0.04	0.04
Total cold run time: 109.66 s
Total hot run time: 30.6 s

@zclllyybb zclllyybb changed the title [Refactor](timezone) refactor tzdata load to accelerate [Refactor](timezone) refactor tzdata load to accelerate and unify timezone parsing Jul 1, 2024
@zclllyybb
Copy link
Contributor Author

run buildall

Copy link
Contributor

github-actions bot commented Jul 1, 2024

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

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17603	4373	4315	4315
q2	2007	192	189	189
q3	10446	1260	1116	1116
q4	10206	805	784	784
q5	8408	2823	2816	2816
q6	227	140	139	139
q7	963	589	606	589
q8	9224	2111	2091	2091
q9	8956	6551	6518	6518
q10	8920	3754	3735	3735
q11	442	241	253	241
q12	418	242	236	236
q13	18157	2976	2993	2976
q14	263	233	235	233
q15	534	500	505	500
q16	528	388	381	381
q17	985	661	735	661
q18	8145	7570	7434	7434
q19	6501	1602	1517	1517
q20	702	335	336	335
q21	4999	3195	3213	3195
q22	400	336	335	335
Total cold run time: 119034 ms
Total hot run time: 40336 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4425	4289	4280	4280
q2	397	269	276	269
q3	3011	2736	2675	2675
q4	1947	1577	1677	1577
q5	5315	5310	5296	5296
q6	219	130	130	130
q7	2136	1732	1698	1698
q8	3212	3383	3353	3353
q9	8369	8319	8378	8319
q10	3876	3699	3675	3675
q11	586	498	487	487
q12	808	646	599	599
q13	17416	2990	2997	2990
q14	294	266	270	266
q15	529	480	488	480
q16	482	422	416	416
q17	1789	1480	1453	1453
q18	7655	7530	7580	7530
q19	1697	1497	1615	1497
q20	1994	1794	1773	1773
q21	4962	4615	4725	4615
q22	611	563	541	541
Total cold run time: 71730 ms
Total hot run time: 53919 ms

@doris-robot
Copy link

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

query1	915	382	387	382
query2	6476	2411	2358	2358
query3	6660	211	220	211
query4	18727	17579	17309	17309
query5	4230	474	485	474
query6	290	186	184	184
query7	4615	292	294	292
query8	306	285	278	278
query9	8648	2382	2364	2364
query10	613	294	300	294
query11	10448	10065	10063	10063
query12	137	92	89	89
query13	1640	367	383	367
query14	10317	6297	7511	6297
query15	231	189	182	182
query16	7799	270	272	270
query17	1901	526	531	526
query18	1876	269	287	269
query19	205	145	148	145
query20	89	83	82	82
query21	211	136	133	133
query22	4253	3920	3964	3920
query23	33561	33016	33190	33016
query24	10997	2808	2814	2808
query25	642	369	369	369
query26	1663	152	156	152
query27	2920	314	318	314
query28	7642	2058	2055	2055
query29	1036	633	622	622
query30	280	150	151	150
query31	988	747	743	743
query32	101	51	56	51
query33	769	290	286	286
query34	955	470	481	470
query35	734	629	614	614
query36	1091	899	944	899
query37	157	77	75	75
query38	2879	2755	2740	2740
query39	879	798	809	798
query40	283	125	125	125
query41	54	52	66	52
query42	122	99	98	98
query43	579	532	540	532
query44	1266	724	722	722
query45	186	162	170	162
query46	1075	741	704	704
query47	1840	1752	1767	1752
query48	364	296	298	296
query49	1175	410	412	410
query50	764	400	397	397
query51	6875	6769	6748	6748
query52	98	92	92	92
query53	371	286	288	286
query54	932	448	436	436
query55	73	81	74	74
query56	283	263	268	263
query57	1151	1055	1040	1040
query58	273	249	242	242
query59	3494	3252	3075	3075
query60	298	276	276	276
query61	96	93	149	93
query62	657	455	445	445
query63	325	290	293	290
query64	9865	2199	1754	1754
query65	3378	3114	3129	3114
query66	1377	340	333	333
query67	15342	14987	15130	14987
query68	4633	549	552	549
query69	499	323	309	309
query70	1177	1070	1165	1070
query71	396	281	276	276
query72	7248	5124	2822	2822
query73	789	334	324	324
query74	6007	5548	5535	5535
query75	3405	2703	2703	2703
query76	2929	913	974	913
query77	479	299	310	299
query78	10263	9831	9768	9768
query79	2263	524	526	524
query80	916	482	469	469
query81	577	227	220	220
query82	759	114	104	104
query83	260	172	179	172
query84	241	86	89	86
query85	1849	286	274	274
query86	479	310	299	299
query87	3254	3098	3117	3098
query88	4356	2396	2378	2378
query89	474	381	373	373
query90	1827	192	194	192
query91	138	110	114	110
query92	58	50	51	50
query93	2309	512	510	510
query94	1223	209	207	207
query95	427	331	325	325
query96	676	275	274	274
query97	3174	3056	3000	3000
query98	233	217	194	194
query99	1323	843	861	843
Total cold run time: 275118 ms
Total hot run time: 169719 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.03
query2	0.08	0.03	0.04
query3	0.23	0.04	0.05
query4	1.67	0.08	0.06
query5	0.48	0.47	0.47
query6	1.15	0.73	0.71
query7	0.02	0.01	0.01
query8	0.06	0.05	0.05
query9	0.53	0.48	0.48
query10	0.55	0.54	0.54
query11	0.14	0.12	0.11
query12	0.14	0.12	0.12
query13	0.60	0.59	0.58
query14	0.81	0.77	0.78
query15	0.83	0.80	0.81
query16	0.37	0.37	0.37
query17	1.01	1.00	0.96
query18	0.22	0.25	0.25
query19	1.78	1.73	1.78
query20	0.01	0.01	0.01
query21	15.46	0.75	0.65
query22	4.63	7.09	1.94
query23	18.28	1.39	1.32
query24	2.08	0.22	0.24
query25	0.14	0.09	0.08
query26	0.27	0.17	0.18
query27	0.08	0.08	0.08
query28	13.25	1.03	1.00
query29	12.63	3.29	3.26
query30	0.26	0.06	0.05
query31	2.88	0.38	0.39
query32	3.28	0.48	0.48
query33	2.86	2.94	2.84
query34	17.07	4.43	4.45
query35	4.47	4.51	4.48
query36	0.64	0.48	0.48
query37	0.19	0.16	0.16
query38	0.16	0.15	0.15
query39	0.05	0.03	0.04
query40	0.16	0.14	0.16
query41	0.10	0.05	0.05
query42	0.05	0.04	0.05
query43	0.04	0.05	0.04
Total cold run time: 109.75 s
Total hot run time: 30.59 s

morrySnow
morrySnow previously approved these changes Jul 2, 2024
Copy link
Contributor

github-actions bot commented Jul 2, 2024

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 Jul 2, 2024
Copy link
Contributor

github-actions bot commented Jul 2, 2024

PR approved by anyone and no changes requested.

@doris-robot
Copy link

TPC-DS: Total hot run time: 172596 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 015c15853a52cfe8c729a2d817803c7dd85bc0b8, data reload: false

query1	938	388	394	388
query2	6478	2591	2417	2417
query3	6657	210	216	210
query4	19713	17543	17383	17383
query5	4256	490	498	490
query6	261	174	159	159
query7	4598	299	297	297
query8	318	284	298	284
query9	8465	2410	2391	2391
query10	606	309	286	286
query11	10626	10010	10009	10009
query12	136	93	83	83
query13	1647	377	373	373
query14	10207	7685	6850	6850
query15	234	189	183	183
query16	7805	277	270	270
query17	1903	555	538	538
query18	1964	285	287	285
query19	209	162	160	160
query20	95	84	82	82
query21	215	132	130	130
query22	4327	4142	4059	4059
query23	33962	33084	32716	32716
query24	12106	2929	2850	2850
query25	688	390	391	390
query26	1796	162	173	162
query27	2947	326	321	321
query28	7525	2096	2079	2079
query29	1133	682	640	640
query30	271	163	156	156
query31	1020	740	742	740
query32	93	54	57	54
query33	788	312	300	300
query34	957	483	480	480
query35	759	648	643	643
query36	1123	945	940	940
query37	288	79	78	78
query38	2865	2720	2721	2720
query39	844	835	826	826
query40	277	136	132	132
query41	55	55	52	52
query42	123	102	103	102
query43	603	592	561	561
query44	1195	731	771	731
query45	199	167	159	159
query46	1078	714	729	714
query47	1808	1754	1775	1754
query48	363	311	297	297
query49	1226	432	435	432
query50	768	393	400	393
query51	6894	6777	6691	6691
query52	107	93	98	93
query53	369	301	304	301
query54	1003	453	450	450
query55	78	82	76	76
query56	305	277	286	277
query57	1187	1053	1019	1019
query58	277	245	272	245
query59	3541	3405	3288	3288
query60	344	278	296	278
query61	90	91	111	91
query62	643	458	459	458
query63	329	307	298	298
query64	9895	2264	1750	1750
query65	3286	3126	3104	3104
query66	1377	336	364	336
query67	15823	15052	14824	14824
query68	7453	542	540	540
query69	674	441	357	357
query70	1223	1080	1149	1080
query71	518	279	298	279
query72	8676	5220	5076	5076
query73	814	325	321	321
query74	5906	5515	5482	5482
query75	5080	2687	2667	2667
query76	4897	1001	904	904
query77	792	323	301	301
query78	10545	9877	9688	9688
query79	7890	510	525	510
query80	1002	488	477	477
query81	555	225	241	225
query82	789	114	110	110
query83	345	176	170	170
query84	270	88	87	87
query85	1418	322	267	267
query86	439	319	285	285
query87	3283	3058	3102	3058
query88	5227	2349	2373	2349
query89	538	397	397	397
query90	2029	195	192	192
query91	131	97	103	97
query92	68	51	53	51
query93	6034	507	511	507
query94	1310	192	187	187
query95	409	316	321	316
query96	607	266	270	266
query97	3171	3011	3049	3011
query98	226	202	196	196
query99	1254	841	815	815
Total cold run time: 297639 ms
Total hot run time: 172596 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.02
query2	0.08	0.04	0.04
query3	0.22	0.05	0.04
query4	1.68	0.07	0.07
query5	0.48	0.47	0.49
query6	1.14	0.73	0.72
query7	0.02	0.02	0.01
query8	0.05	0.04	0.05
query9	0.54	0.49	0.50
query10	0.54	0.54	0.54
query11	0.14	0.11	0.11
query12	0.14	0.13	0.12
query13	0.60	0.60	0.59
query14	0.78	0.78	0.78
query15	0.85	0.82	0.82
query16	0.36	0.36	0.36
query17	0.97	1.05	1.00
query18	0.24	0.25	0.24
query19	1.85	1.74	1.78
query20	0.01	0.02	0.01
query21	15.47	0.77	0.65
query22	4.73	6.66	2.15
query23	18.27	1.51	1.23
query24	2.10	0.24	0.25
query25	0.14	0.09	0.08
query26	0.26	0.18	0.17
query27	0.09	0.08	0.08
query28	13.21	1.02	1.01
query29	12.70	3.25	3.28
query30	0.25	0.06	0.05
query31	2.87	0.41	0.40
query32	3.24	0.50	0.49
query33	2.84	2.99	2.92
query34	16.94	4.38	4.38
query35	4.51	4.45	4.50
query36	0.65	0.46	0.47
query37	0.19	0.15	0.17
query38	0.16	0.15	0.15
query39	0.04	0.04	0.04
query40	0.17	0.17	0.15
query41	0.08	0.04	0.04
query42	0.06	0.05	0.04
query43	0.04	0.04	0.04
Total cold run time: 109.74 s
Total hot run time: 30.83 s

@zclllyybb
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17633	4351	4268	4268
q2	2010	195	186	186
q3	10448	1169	1148	1148
q4	10190	744	730	730
q5	7504	2640	2654	2640
q6	225	141	138	138
q7	965	592	601	592
q8	9224	2083	2053	2053
q9	9058	6543	6561	6543
q10	8961	3721	4039	3721
q11	468	235	249	235
q12	516	242	226	226
q13	18222	3009	3017	3009
q14	270	232	222	222
q15	541	493	486	486
q16	512	380	374	374
q17	960	660	675	660
q18	8588	7994	7899	7899
q19	11571	1522	1413	1413
q20	697	336	338	336
q21	5065	3100	3875	3100
q22	404	352	346	346
Total cold run time: 124032 ms
Total hot run time: 40325 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4451	4334	4482	4334
q2	371	270	258	258
q3	3194	2863	2910	2863
q4	1997	1674	1674	1674
q5	5496	5490	5543	5490
q6	237	138	133	133
q7	2201	1853	1859	1853
q8	3235	3394	3414	3394
q9	8693	8697	8739	8697
q10	3978	3876	3824	3824
q11	594	512	523	512
q12	807	618	607	607
q13	15976	3153	3129	3129
q14	319	279	301	279
q15	535	488	482	482
q16	490	425	416	416
q17	1821	1519	1509	1509
q18	8180	7885	7748	7748
q19	1776	1614	1655	1614
q20	2385	1855	1902	1855
q21	5250	4856	4813	4813
q22	666	565	574	565
Total cold run time: 72652 ms
Total hot run time: 56049 ms

@doris-robot
Copy link

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

query1	928	396	382	382
query2	6374	2622	2508	2508
query3	6639	203	218	203
query4	19655	17460	17397	17397
query5	3756	479	471	471
query6	258	175	174	174
query7	4582	288	290	288
query8	303	279	278	278
query9	8570	2427	2395	2395
query10	584	300	280	280
query11	10442	10117	10086	10086
query12	113	84	83	83
query13	1668	366	363	363
query14	10362	6910	6971	6910
query15	219	184	190	184
query16	7780	268	283	268
query17	1897	561	546	546
query18	1962	279	275	275
query19	205	154	164	154
query20	101	84	84	84
query21	211	130	126	126
query22	4349	4024	3954	3954
query23	33825	33483	33533	33483
query24	11125	2822	2921	2822
query25	625	392	372	372
query26	1241	161	152	152
query27	2479	321	319	319
query28	7320	2155	2147	2147
query29	895	642	638	638
query30	262	160	162	160
query31	959	760	756	756
query32	99	56	58	56
query33	753	299	282	282
query34	1037	461	472	461
query35	751	620	633	620
query36	1109	972	985	972
query37	157	77	79	77
query38	2970	2843	2864	2843
query39	888	823	825	823
query40	224	129	124	124
query41	54	52	52	52
query42	108	104	107	104
query43	627	545	563	545
query44	1164	744	732	732
query45	198	163	164	163
query46	1067	704	701	701
query47	1840	1818	1779	1779
query48	363	297	305	297
query49	915	413	410	410
query50	758	374	380	374
query51	6895	6721	6840	6721
query52	106	90	89	89
query53	368	284	285	284
query54	860	433	435	433
query55	76	73	72	72
query56	289	266	285	266
query57	1138	1050	1068	1050
query58	239	250	239	239
query59	3769	3266	3207	3207
query60	315	272	271	271
query61	94	87	94	87
query62	604	426	469	426
query63	316	292	290	290
query64	8838	2309	1795	1795
query65	3361	3114	3090	3090
query66	862	323	320	320
query67	15444	15106	15124	15106
query68	4539	523	527	523
query69	577	351	323	323
query70	1175	1141	1169	1141
query71	388	271	270	270
query72	7206	5307	5075	5075
query73	738	323	317	317
query74	5883	5477	5478	5477
query75	3386	2627	2656	2627
query76	2349	853	963	853
query77	583	299	303	299
query78	10398	9902	9739	9739
query79	3183	515	531	515
query80	1383	531	474	474
query81	554	218	217	217
query82	799	109	104	104
query83	319	168	170	168
query84	256	89	85	85
query85	1735	287	267	267
query86	470	313	313	313
query87	3264	3107	3075	3075
query88	3863	2343	2337	2337
query89	459	388	381	381
query90	1705	188	185	185
query91	126	103	97	97
query92	63	48	50	48
query93	2895	505	506	505
query94	1116	187	183	183
query95	407	313	302	302
query96	603	271	261	261
query97	3163	3051	3077	3051
query98	236	212	198	198
query99	1158	854	853	853
Total cold run time: 273324 ms
Total hot run time: 173682 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.03
query2	0.07	0.04	0.03
query3	0.22	0.04	0.05
query4	1.68	0.08	0.08
query5	0.49	0.50	0.50
query6	1.12	0.73	0.72
query7	0.02	0.01	0.01
query8	0.06	0.04	0.04
query9	0.54	0.49	0.49
query10	0.55	0.54	0.54
query11	0.16	0.11	0.11
query12	0.15	0.13	0.13
query13	0.60	0.59	0.58
query14	0.75	0.78	0.78
query15	0.84	0.81	0.82
query16	0.37	0.37	0.37
query17	0.98	1.00	1.03
query18	0.24	0.26	0.24
query19	1.79	1.71	1.79
query20	0.01	0.01	0.01
query21	15.45	0.77	0.65
query22	4.14	7.34	1.84
query23	18.31	1.48	1.36
query24	2.19	0.23	0.22
query25	0.15	0.10	0.08
query26	0.27	0.18	0.17
query27	0.08	0.08	0.08
query28	13.23	1.02	1.00
query29	12.64	3.25	3.24
query30	0.26	0.06	0.05
query31	2.88	0.37	0.38
query32	3.27	0.47	0.46
query33	2.89	2.95	2.91
query34	16.94	4.42	4.41
query35	4.45	4.48	4.51
query36	0.66	0.46	0.50
query37	0.19	0.15	0.16
query38	0.15	0.15	0.14
query39	0.04	0.04	0.03
query40	0.17	0.14	0.14
query41	0.10	0.04	0.05
query42	0.05	0.05	0.05
query43	0.04	0.04	0.04
Total cold run time: 109.23 s
Total hot run time: 30.59 s

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

github-actions bot commented Jul 3, 2024

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

@HappenLee HappenLee merged commit d582f11 into apache:master Jul 4, 2024
26 of 29 checks passed
zclllyybb added a commit to zclllyybb/doris that referenced this pull request Jul 4, 2024
…ezone parsing (apache#37062)

1. revert apache#25097. we decide to rely
on OS. not maintain independent tzdata anymore to keep result
consistency
2. refactor timezone load. removed rwlock.

before:
```sql
mysql [optest]>select count(convert_tz(d, 'Asia/Shanghai', 'America/Los_Angeles')), count(convert_tz(dt, 'America/Los_Angeles', '+00:00')) from dates;
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
| count(convert_tz(cast(d as DATETIMEV2(6)), 'Asia/Shanghai', 'America/Los_Angeles')) | count(convert_tz(dt, 'America/Los_Angeles', '+00:00')) |
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
|                                                                            16000000 |                                               16000000 |
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
1 row in set (6.88 sec)
```
now:
```sql
mysql [optest]>select count(convert_tz(d, 'Asia/Shanghai', 'America/Los_Angeles')), count(convert_tz(dt, 'America/Los_Angeles', '+00:00')) from dates;
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
| count(convert_tz(cast(d as DATETIMEV2(6)), 'Asia/Shanghai', 'America/Los_Angeles')) | count(convert_tz(dt, 'America/Los_Angeles', '+00:00')) |
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
|                                                                            16000000 |                                               16000000 |
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
1 row in set (2.61 sec)
```
3. now don't support timezone offset format string like 'UTC+8', like we
already said in
https://doris.apache.org/docs/dev/query/query-variables/time-zone/#usage
4. support case-insensitive timezone parsing in nereids.
5. a bug when parse timezone using nereids. should check DST by input,
but wrongly by now before. now fixed.

doc pr: apache/doris-website#810
zclllyybb added a commit to zclllyybb/doris that referenced this pull request Jul 4, 2024
…ezone parsing (apache#37062)

1. revert apache#25097. we decide to rely
on OS. not maintain independent tzdata anymore to keep result
consistency
2. refactor timezone load. removed rwlock.

before:
```sql
mysql [optest]>select count(convert_tz(d, 'Asia/Shanghai', 'America/Los_Angeles')), count(convert_tz(dt, 'America/Los_Angeles', '+00:00')) from dates;
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
| count(convert_tz(cast(d as DATETIMEV2(6)), 'Asia/Shanghai', 'America/Los_Angeles')) | count(convert_tz(dt, 'America/Los_Angeles', '+00:00')) |
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
|                                                                            16000000 |                                               16000000 |
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
1 row in set (6.88 sec)
```
now:
```sql
mysql [optest]>select count(convert_tz(d, 'Asia/Shanghai', 'America/Los_Angeles')), count(convert_tz(dt, 'America/Los_Angeles', '+00:00')) from dates;
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
| count(convert_tz(cast(d as DATETIMEV2(6)), 'Asia/Shanghai', 'America/Los_Angeles')) | count(convert_tz(dt, 'America/Los_Angeles', '+00:00')) |
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
|                                                                            16000000 |                                               16000000 |
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
1 row in set (2.61 sec)
```
3. now don't support timezone offset format string like 'UTC+8', like we
already said in
https://doris.apache.org/docs/dev/query/query-variables/time-zone/#usage
4. support case-insensitive timezone parsing in nereids.
5. a bug when parse timezone using nereids. should check DST by input,
but wrongly by now before. now fixed.

doc pr: apache/doris-website#810
BiteTheDDDDt pushed a commit to apache/doris-website that referenced this pull request Jul 4, 2024
Remove the tzfiles come with Doris and clarify some timezone parsing
restrictions.

move them from query-variables to cluster-management

code pr: apache/doris#37062

---------

Co-authored-by: Luzhijing <82810928+luzhijing@users.noreply.github.com>
yiguolei pushed a commit that referenced this pull request Jul 15, 2024
…imezone parsing (#37062) (#37269)

pick #37062

1. revert #25097. we decide to rely
on OS. not maintain independent tzdata anymore to keep result
consistency
2. refactor timezone load. removed rwlock.

before:
```sql
mysql [optest]>select count(convert_tz(d, 'Asia/Shanghai', 'America/Los_Angeles')), count(convert_tz(dt, 'America/Los_Angeles', '+00:00')) from dates;
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
| count(convert_tz(cast(d as DATETIMEV2(6)), 'Asia/Shanghai', 'America/Los_Angeles')) | count(convert_tz(dt, 'America/Los_Angeles', '+00:00')) |
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
|                                                                            16000000 |                                               16000000 |
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
1 row in set (6.88 sec)
```
now:
```sql
mysql [optest]>select count(convert_tz(d, 'Asia/Shanghai', 'America/Los_Angeles')), count(convert_tz(dt, 'America/Los_Angeles', '+00:00')) from dates;
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
| count(convert_tz(cast(d as DATETIMEV2(6)), 'Asia/Shanghai', 'America/Los_Angeles')) | count(convert_tz(dt, 'America/Los_Angeles', '+00:00')) |
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
|                                                                            16000000 |                                               16000000 |
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
1 row in set (2.61 sec)
```
3. now don't support timezone offset format string like 'UTC+8', like we
already said in
https://doris.apache.org/docs/dev/query/query-variables/time-zone/#usage
4. support case-insensitive timezone parsing in nereids.
5. a bug when parse timezone using nereids. should check DST by input,
but wrongly by now before. now fixed.

doc pr: apache/doris-website#810
@zclllyybb zclllyybb deleted the opt_timezone branch July 17, 2024 09:59
dataroaring pushed a commit that referenced this pull request Jul 17, 2024
…ezone parsing (#37062)

1. revert #25097. we decide to rely
on OS. not maintain independent tzdata anymore to keep result
consistency
2. refactor timezone load. removed rwlock.

before:
```sql
mysql [optest]>select count(convert_tz(d, 'Asia/Shanghai', 'America/Los_Angeles')), count(convert_tz(dt, 'America/Los_Angeles', '+00:00')) from dates; 
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
| count(convert_tz(cast(d as DATETIMEV2(6)), 'Asia/Shanghai', 'America/Los_Angeles')) | count(convert_tz(dt, 'America/Los_Angeles', '+00:00')) |
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
|                                                                            16000000 |                                               16000000 |
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
1 row in set (6.88 sec)
```
now:
```sql
mysql [optest]>select count(convert_tz(d, 'Asia/Shanghai', 'America/Los_Angeles')), count(convert_tz(dt, 'America/Los_Angeles', '+00:00')) from dates; 
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
| count(convert_tz(cast(d as DATETIMEV2(6)), 'Asia/Shanghai', 'America/Los_Angeles')) | count(convert_tz(dt, 'America/Los_Angeles', '+00:00')) |
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
|                                                                            16000000 |                                               16000000 |
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
1 row in set (2.61 sec)
```
3. now don't support timezone offset format string like 'UTC+8', like we
already said in
https://doris.apache.org/docs/dev/query/query-variables/time-zone/#usage
4. support case-insensitive timezone parsing in nereids.
5. a bug when parse timezone using nereids. should check DST by input,
but wrongly by now before. now fixed.

doc pr: apache/doris-website#810
@yiguolei yiguolei mentioned this pull request Jul 19, 2024
1 task
xiaokang pushed a commit that referenced this pull request Jul 31, 2024
…imezone parsing (#37062) (#37270)

pick #37062

1. revert #25097. we decide to rely
on OS. not maintain independent tzdata anymore to keep result
consistency
2. refactor timezone load. removed rwlock.

before:
```sql
mysql [optest]>select count(convert_tz(d, 'Asia/Shanghai', 'America/Los_Angeles')), count(convert_tz(dt, 'America/Los_Angeles', '+00:00')) from dates;
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
| count(convert_tz(cast(d as DATETIMEV2(6)), 'Asia/Shanghai', 'America/Los_Angeles')) | count(convert_tz(dt, 'America/Los_Angeles', '+00:00')) |
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
|                                                                            16000000 |                                               16000000 |
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
1 row in set (6.88 sec)
```
now:
```sql
mysql [optest]>select count(convert_tz(d, 'Asia/Shanghai', 'America/Los_Angeles')), count(convert_tz(dt, 'America/Los_Angeles', '+00:00')) from dates;
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
| count(convert_tz(cast(d as DATETIMEV2(6)), 'Asia/Shanghai', 'America/Los_Angeles')) | count(convert_tz(dt, 'America/Los_Angeles', '+00:00')) |
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
|                                                                            16000000 |                                               16000000 |
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
1 row in set (2.61 sec)
```
3. now don't support timezone offset format string like 'UTC+8', like we
already said in
https://doris.apache.org/docs/dev/query/query-variables/time-zone/#usage
4. support case-insensitive timezone parsing in nereids.
5. a bug when parse timezone using nereids. should check DST by input,
but wrongly by now before. now fixed.

doc pr: apache/doris-website#810
mongo360 pushed a commit to mongo360/doris that referenced this pull request Dec 11, 2024
…imezone parsing (apache#37062) (apache#37270)

pick apache#37062

1. revert apache#25097. we decide to rely
on OS. not maintain independent tzdata anymore to keep result
consistency
2. refactor timezone load. removed rwlock.

before:
```sql
mysql [optest]>select count(convert_tz(d, 'Asia/Shanghai', 'America/Los_Angeles')), count(convert_tz(dt, 'America/Los_Angeles', '+00:00')) from dates;
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
| count(convert_tz(cast(d as DATETIMEV2(6)), 'Asia/Shanghai', 'America/Los_Angeles')) | count(convert_tz(dt, 'America/Los_Angeles', '+00:00')) |
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
|                                                                            16000000 |                                               16000000 |
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
1 row in set (6.88 sec)
```
now:
```sql
mysql [optest]>select count(convert_tz(d, 'Asia/Shanghai', 'America/Los_Angeles')), count(convert_tz(dt, 'America/Los_Angeles', '+00:00')) from dates;
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
| count(convert_tz(cast(d as DATETIMEV2(6)), 'Asia/Shanghai', 'America/Los_Angeles')) | count(convert_tz(dt, 'America/Los_Angeles', '+00:00')) |
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
|                                                                            16000000 |                                               16000000 |
+-------------------------------------------------------------------------------------+--------------------------------------------------------+
1 row in set (2.61 sec)
```
3. now don't support timezone offset format string like 'UTC+8', like we
already said in
https://doris.apache.org/docs/dev/query/query-variables/time-zone/#usage
4. support case-insensitive timezone parsing in nereids.
5. a bug when parse timezone using nereids. should check DST by input,
but wrongly by now before. now fixed.

doc pr: apache/doris-website#810
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants