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) Fix the issue where using convert_tz and ifnull together causes an error. #48029

Merged
merged 1 commit into from
Feb 19, 2025

Conversation

Mryange
Copy link
Contributor

@Mryange Mryange commented Feb 18, 2025

What problem does this PR solve?

In this PR #40366, an optimization was introduced.
However, because ifnull would return const at runtime (even if there was no const column during open), t
his would cause an error: "ConvertTzState is not initialized in function convert_tz".

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 Feb 18, 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 Feb 18, 2025

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17617	5255	5099	5099
q2	2043	305	171	171
q3	10402	1308	734	734
q4	10213	1024	560	560
q5	7556	2378	2372	2372
q6	193	168	134	134
q7	918	761	629	629
q8	9307	1303	1132	1132
q9	4912	4548	4655	4548
q10	6832	2282	1907	1907
q11	477	281	258	258
q12	350	355	226	226
q13	17772	3732	3087	3087
q14	232	232	204	204
q15	509	458	458	458
q16	631	596	587	587
q17	582	874	355	355
q18	6779	6357	6264	6264
q19	1210	956	540	540
q20	322	340	193	193
q21	2849	2157	1987	1987
q22	360	331	319	319
Total cold run time: 102066 ms
Total hot run time: 31764 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5119	5169	5259	5169
q2	230	328	242	242
q3	2149	2652	2265	2265
q4	1407	1854	1397	1397
q5	4220	4151	4148	4148
q6	206	164	124	124
q7	1872	1800	1666	1666
q8	2631	2656	2574	2574
q9	7300	7073	7057	7057
q10	2983	3198	2814	2814
q11	574	512	493	493
q12	676	751	588	588
q13	3452	3885	3299	3299
q14	278	302	263	263
q15	508	467	461	461
q16	624	678	643	643
q17	1147	1627	1328	1328
q18	7577	7312	7268	7268
q19	824	876	990	876
q20	1960	2042	1880	1880
q21	5448	4885	4968	4885
q22	629	594	573	573
Total cold run time: 51814 ms
Total hot run time: 50013 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 183897 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 5329482b399daaae149d74f686a48f3f546a6ef6, data reload: false

query1	963	378	383	378
query2	6532	1954	1906	1906
query3	6800	212	208	208
query4	26451	23315	23521	23315
query5	4320	676	511	511
query6	309	201	175	175
query7	4605	496	307	307
query8	292	246	236	236
query9	8592	2511	2527	2511
query10	450	322	272	272
query11	15608	15176	14901	14901
query12	174	113	108	108
query13	1661	536	404	404
query14	9666	7030	6270	6270
query15	214	194	192	192
query16	7665	618	480	480
query17	1296	716	561	561
query18	2013	405	302	302
query19	198	188	166	166
query20	120	114	116	114
query21	216	127	105	105
query22	4342	4330	4397	4330
query23	34196	33309	32834	32834
query24	7677	2424	2401	2401
query25	520	454	390	390
query26	1226	266	150	150
query27	2154	486	323	323
query28	3965	2415	2382	2382
query29	733	534	408	408
query30	227	185	150	150
query31	931	849	777	777
query32	71	83	63	63
query33	555	349	304	304
query34	789	845	514	514
query35	815	794	725	725
query36	963	982	908	908
query37	120	97	77	77
query38	4109	4182	4086	4086
query39	1449	1386	1382	1382
query40	204	119	102	102
query41	53	53	50	50
query42	134	106	109	106
query43	486	525	483	483
query44	1300	798	802	798
query45	177	175	157	157
query46	892	1038	656	656
query47	1738	1754	1707	1707
query48	369	427	308	308
query49	765	497	418	418
query50	693	741	407	407
query51	4144	4152	4169	4152
query52	110	119	96	96
query53	225	251	189	189
query54	485	487	411	411
query55	84	78	79	78
query56	275	253	262	253
query57	1124	1172	1071	1071
query58	236	230	235	230
query59	2619	2880	2535	2535
query60	288	278	253	253
query61	117	113	113	113
query62	811	717	682	682
query63	232	193	199	193
query64	4397	993	654	654
query65	3202	3109	3161	3109
query66	1054	392	336	336
query67	15631	15482	15551	15482
query68	7731	778	526	526
query69	440	296	269	269
query70	1231	1151	1110	1110
query71	450	296	269	269
query72	5182	3563	3787	3563
query73	748	750	358	358
query74	8890	9129	8932	8932
query75	3494	3174	2727	2727
query76	3373	1174	758	758
query77	737	383	291	291
query78	10100	10086	9278	9278
query79	1965	829	610	610
query80	641	521	458	458
query81	500	275	242	242
query82	278	122	97	97
query83	171	170	154	154
query84	245	99	71	71
query85	812	343	298	298
query86	374	314	289	289
query87	4495	4514	4485	4485
query88	2880	2241	2228	2228
query89	386	315	276	276
query90	1758	194	195	194
query91	133	143	110	110
query92	63	65	55	55
query93	1478	1009	592	592
query94	587	410	278	278
query95	358	269	255	255
query96	484	557	266	266
query97	2719	2879	2728	2728
query98	225	208	197	197
query99	1304	1406	1278	1278
Total cold run time: 269064 ms
Total hot run time: 183897 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.04
query2	0.08	0.03	0.03
query3	0.24	0.07	0.06
query4	1.62	0.10	0.11
query5	0.41	0.41	0.40
query6	1.17	0.67	0.66
query7	0.03	0.02	0.02
query8	0.04	0.03	0.03
query9	0.60	0.52	0.51
query10	0.57	0.58	0.58
query11	0.15	0.10	0.10
query12	0.14	0.11	0.11
query13	0.62	0.59	0.61
query14	2.70	2.71	2.72
query15	0.93	0.85	0.85
query16	0.37	0.38	0.38
query17	1.05	0.99	1.02
query18	0.22	0.20	0.19
query19	1.92	1.79	1.96
query20	0.02	0.01	0.01
query21	15.36	0.92	0.54
query22	0.76	0.99	0.60
query23	15.19	1.38	0.61
query24	9.12	3.23	0.43
query25	0.30	0.23	0.07
query26	0.89	0.19	0.14
query27	0.05	0.04	0.05
query28	7.15	0.80	0.43
query29	12.60	3.92	3.26
query30	0.24	0.09	0.06
query31	2.82	0.59	0.38
query32	3.23	0.55	0.47
query33	3.04	2.99	3.02
query34	15.83	5.16	4.52
query35	4.57	4.56	4.55
query36	0.67	0.50	0.48
query37	0.08	0.06	0.06
query38	0.05	0.04	0.04
query39	0.03	0.03	0.02
query40	0.16	0.14	0.13
query41	0.08	0.02	0.03
query42	0.04	0.02	0.02
query43	0.04	0.03	0.02
Total cold run time: 105.21 s
Total hot run time: 30.02 s

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 43.28% (11488/26544)
Line Coverage: 33.47% (96748/289042)
Region Coverage: 32.56% (49508/152031)
Branch Coverage: 28.33% (24897/87890)
Coverage Report: http://coverage.selectdb-in.cc/coverage/5329482b399daaae149d74f686a48f3f546a6ef6_5329482b399daaae149d74f686a48f3f546a6ef6/report/index.html

@Mryange
Copy link
Contributor Author

Mryange commented Feb 19, 2025

run p0

Copy link
Contributor

@HappenLee HappenLee left a comment

Choose a reason for hiding this comment

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

LGTM

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

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

Copy link
Contributor

PR approved by anyone and no changes requested.

@Gabriel39 Gabriel39 merged commit 3a3c4b9 into apache:master Feb 19, 2025
31 of 32 checks passed
github-actions bot pushed a commit that referenced this pull request Feb 19, 2025
…her causes an error. (#48029)

In this PR #40366, an optimization
was introduced.
However, because ifnull would return const at runtime (even if there was
no const column during open), t
his would cause an error: "ConvertTzState is not initialized in function
convert_tz".
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.x dev/3.1.x reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants