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](Nereids) fix bug for TimestampArithmetic.equals() #45924

Open
wants to merge 1 commit into
base: branch-3.0
Choose a base branch
from

Conversation

englefly
Copy link
Contributor

What problem does this PR solve?

pr #45106 triggers this bug on regression case tpcds_sf1_unique_p1/sql/q24_1.sql

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

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 Dec 25, 2024

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?

@englefly
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17571	7398	7296	7296
q2	2048	178	168	168
q3	10915	1062	1169	1062
q4	10546	806	780	780
q5	7742	2848	2782	2782
q6	235	143	140	140
q7	988	610	610	610
q8	9354	1976	2030	1976
q9	6634	6436	6435	6435
q10	7037	2288	2303	2288
q11	469	268	272	268
q12	412	216	212	212
q13	17804	3012	2985	2985
q14	250	211	204	204
q15	556	521	529	521
q16	682	631	598	598
q17	988	595	572	572
q18	7220	6684	6582	6582
q19	1441	1095	1045	1045
q20	472	214	205	205
q21	3996	3288	3083	3083
q22	1078	1011	994	994
Total cold run time: 108438 ms
Total hot run time: 40806 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7306	7192	7210	7192
q2	322	239	231	231
q3	2939	2914	2967	2914
q4	2007	1807	1798	1798
q5	5719	5716	5737	5716
q6	226	141	139	139
q7	2317	1805	1852	1805
q8	3349	3581	3521	3521
q9	8790	8886	8827	8827
q10	3595	3539	3532	3532
q11	616	499	495	495
q12	814	613	631	613
q13	12867	3220	3204	3204
q14	328	272	289	272
q15	564	527	516	516
q16	721	655	658	655
q17	1884	1603	1609	1603
q18	8267	7811	7484	7484
q19	1685	1592	1607	1592
q20	2120	1904	1866	1866
q21	5524	5358	5387	5358
q22	1124	1041	1039	1039
Total cold run time: 73084 ms
Total hot run time: 60372 ms

@doris-robot
Copy link

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

query1	1296	940	911	911
query2	6231	2113	2121	2113
query3	10839	4184	4253	4184
query4	66188	29178	23422	23422
query5	5016	459	442	442
query6	390	170	168	168
query7	5595	318	310	310
query8	317	230	229	229
query9	8809	2689	2692	2689
query10	462	265	265	265
query11	17543	15145	15888	15145
query12	146	103	104	103
query13	1548	442	439	439
query14	9864	7334	7255	7255
query15	200	179	179	179
query16	7042	466	483	466
query17	1052	559	547	547
query18	1929	329	312	312
query19	200	147	162	147
query20	122	111	111	111
query21	194	108	107	107
query22	4700	4630	4479	4479
query23	35196	34027	34262	34027
query24	6413	2864	2925	2864
query25	525	428	424	424
query26	657	172	167	167
query27	1860	300	316	300
query28	4313	2531	2520	2520
query29	692	463	463	463
query30	248	172	164	164
query31	1026	811	847	811
query32	69	58	60	58
query33	430	308	298	298
query34	930	507	518	507
query35	856	754	747	747
query36	1091	978	976	976
query37	124	76	70	70
query38	4110	4041	4002	4002
query39	1518	1486	1464	1464
query40	210	104	102	102
query41	52	51	49	49
query42	123	103	104	103
query43	526	484	506	484
query44	1228	881	849	849
query45	184	177	169	169
query46	1132	746	727	727
query47	2032	1887	1895	1887
query48	477	393	383	383
query49	726	378	409	378
query50	824	428	425	425
query51	7392	7140	7205	7140
query52	98	86	90	86
query53	253	181	183	181
query54	550	451	451	451
query55	76	76	78	76
query56	249	246	239	239
query57	1202	1091	1069	1069
query58	205	204	201	201
query59	3084	3041	2858	2858
query60	278	249	253	249
query61	119	107	107	107
query62	754	671	644	644
query63	215	192	199	192
query64	1357	675	629	629
query65	3236	3202	3192	3192
query66	613	290	299	290
query67	15988	15516	15607	15516
query68	4115	596	586	586
query69	413	253	266	253
query70	1199	1138	1122	1122
query71	338	258	260	258
query72	6388	4162	4001	4001
query73	752	355	342	342
query74	10140	8937	8963	8937
query75	3368	2615	2695	2615
query76	1929	1008	1089	1008
query77	487	265	277	265
query78	10555	9610	9724	9610
query79	1480	596	592	592
query80	871	441	419	419
query81	520	243	234	234
query82	1169	117	109	109
query83	165	141	154	141
query84	282	80	79	79
query85	837	293	294	293
query86	336	310	298	298
query87	4491	4278	4375	4278
query88	3726	2402	2358	2358
query89	411	282	291	282
query90	1874	189	186	186
query91	177	147	148	147
query92	61	49	47	47
query93	1810	570	568	568
query94	727	302	293	293
query95	355	255	259	255
query96	608	277	277	277
query97	3369	3197	3160	3160
query98	216	203	200	200
query99	1588	1317	1307	1307
Total cold run time: 317681 ms
Total hot run time: 197081 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.04
query2	0.07	0.03	0.02
query3	0.23	0.06	0.06
query4	1.62	0.10	0.10
query5	0.51	0.51	0.50
query6	1.13	0.72	0.73
query7	0.02	0.02	0.02
query8	0.04	0.02	0.03
query9	0.57	0.48	0.50
query10	0.55	0.55	0.56
query11	0.15	0.10	0.10
query12	0.13	0.11	0.11
query13	0.60	0.59	0.59
query14	2.92	2.93	2.92
query15	0.90	0.81	0.82
query16	0.40	0.38	0.39
query17	1.03	1.03	1.01
query18	0.23	0.22	0.21
query19	1.94	1.88	1.94
query20	0.01	0.02	0.01
query21	15.36	0.60	0.57
query22	2.47	2.00	1.80
query23	17.03	0.97	0.87
query24	3.30	1.90	1.20
query25	0.25	0.07	0.18
query26	0.60	0.13	0.14
query27	0.05	0.03	0.04
query28	9.61	1.12	1.08
query29	12.53	3.23	3.24
query30	0.25	0.05	0.06
query31	2.85	0.37	0.38
query32	3.27	0.46	0.46
query33	2.99	3.01	2.97
query34	17.05	4.49	4.47
query35	4.53	4.47	4.48
query36	0.67	0.50	0.48
query37	0.09	0.06	0.07
query38	0.04	0.03	0.04
query39	0.04	0.02	0.02
query40	0.16	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: 106.36 s
Total hot run time: 33.07 s

Copy link
Member

@airborne12 airborne12 left a comment

Choose a reason for hiding this comment

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

LGTM

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 Dec 26, 2024
Copy link
Contributor

PR approved by anyone and no changes requested.

@englefly
Copy link
Contributor Author

run p0

@englefly
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17746	7704	7459	7459
q2	2701	179	166	166
q3	12142	1138	1161	1138
q4	10634	777	798	777
q5	7782	2818	2893	2818
q6	241	152	149	149
q7	993	649	614	614
q8	9898	1958	2017	1958
q9	6662	6368	6380	6368
q10	6994	2365	2348	2348
q11	460	267	262	262
q12	392	212	210	210
q13	17761	2991	3049	2991
q14	240	210	216	210
q15	559	512	530	512
q16	669	628	609	609
q17	948	612	541	541
q18	7161	6701	6691	6691
q19	1383	1040	1003	1003
q20	479	201	195	195
q21	4015	3171	3153	3153
q22	1098	972	1014	972
Total cold run time: 110958 ms
Total hot run time: 41144 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7392	7368	7349	7349
q2	326	246	241	241
q3	3234	2983	2952	2952
q4	2069	1810	1752	1752
q5	5639	5777	5650	5650
q6	218	137	140	137
q7	2252	1817	1776	1776
q8	3313	3537	3474	3474
q9	8812	8855	8815	8815
q10	3644	3551	3552	3551
q11	597	516	496	496
q12	795	586	624	586
q13	5801	3139	3082	3082
q14	273	255	257	255
q15	577	505	512	505
q16	701	655	645	645
q17	1778	1581	1568	1568
q18	7832	7502	7446	7446
q19	1648	1648	1455	1455
q20	2072	1811	1808	1808
q21	5400	5249	5242	5242
q22	1120	1005	1032	1005
Total cold run time: 65493 ms
Total hot run time: 59790 ms

@doris-robot
Copy link

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

query1	994	373	369	369
query2	6517	2250	2095	2095
query3	6707	211	223	211
query4	34274	23454	23482	23454
query5	4390	448	436	436
query6	256	164	166	164
query7	4629	303	323	303
query8	289	242	233	233
query9	9541	2679	2685	2679
query10	480	268	276	268
query11	18095	15265	15195	15195
query12	149	104	108	104
query13	1648	440	406	406
query14	10458	6895	7158	6895
query15	251	168	179	168
query16	8197	460	492	460
query17	1675	564	562	562
query18	2150	317	319	317
query19	369	156	150	150
query20	119	112	114	112
query21	205	106	102	102
query22	4655	4339	4340	4339
query23	34945	33958	34122	33958
query24	11291	2814	2940	2814
query25	697	404	415	404
query26	1271	170	176	170
query27	2819	298	289	289
query28	8056	2470	2448	2448
query29	871	456	444	444
query30	320	168	165	165
query31	1062	796	817	796
query32	105	59	59	59
query33	801	287	286	286
query34	988	501	527	501
query35	868	736	710	710
query36	1083	942	934	934
query37	134	74	74	74
query38	3977	3909	3912	3909
query39	1474	1428	1438	1428
query40	199	108	100	100
query41	53	52	50	50
query42	117	102	97	97
query43	553	478	501	478
query44	1245	827	812	812
query45	188	170	176	170
query46	1138	709	694	694
query47	1971	1853	1859	1853
query48	466	398	378	378
query49	1182	397	404	397
query50	809	405	402	402
query51	7195	7113	7139	7113
query52	103	91	94	91
query53	255	193	179	179
query54	1278	468	471	468
query55	77	78	77	77
query56	266	256	259	256
query57	1241	1138	1130	1130
query58	261	215	216	215
query59	3360	3048	2858	2858
query60	328	253	250	250
query61	113	115	110	110
query62	848	679	653	653
query63	220	188	185	185
query64	5396	660	633	633
query65	3315	3217	3180	3180
query66	1457	304	307	304
query67	16108	15911	15590	15590
query68	4658	575	572	572
query69	425	276	290	276
query70	1186	1112	1133	1112
query71	334	257	256	256
query72	6454	4073	3978	3978
query73	755	341	355	341
query74	10278	8993	9064	8993
query75	3391	2623	2617	2617
query76	2803	1004	1095	1004
query77	432	280	261	261
query78	10479	9853	9690	9690
query79	2480	612	600	600
query80	1165	441	423	423
query81	567	246	239	239
query82	805	114	124	114
query83	218	167	145	145
query84	240	76	84	76
query85	1354	313	294	294
query86	420	299	321	299
query87	4524	4417	4266	4266
query88	4240	2370	2320	2320
query89	409	288	294	288
query90	2093	183	186	183
query91	181	149	148	148
query92	63	49	56	49
query93	1404	546	549	546
query94	1010	299	306	299
query95	358	255	255	255
query96	607	277	281	277
query97	3377	3202	3170	3170
query98	206	212	192	192
query99	1521	1330	1308	1308
Total cold run time: 304989 ms
Total hot run time: 191725 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.03
query2	0.07	0.03	0.03
query3	0.23	0.07	0.07
query4	1.63	0.11	0.10
query5	0.50	0.50	0.51
query6	1.14	0.74	0.72
query7	0.02	0.02	0.02
query8	0.04	0.03	0.05
query9	0.57	0.51	0.49
query10	0.56	0.56	0.55
query11	0.14	0.09	0.10
query12	0.14	0.11	0.11
query13	0.61	0.59	0.59
query14	3.08	3.12	2.93
query15	0.90	0.83	0.83
query16	0.36	0.40	0.39
query17	1.09	1.04	1.04
query18	0.24	0.22	0.21
query19	1.95	1.94	1.93
query20	0.02	0.01	0.01
query21	15.35	0.60	0.58
query22	2.50	2.93	1.18
query23	16.96	0.96	0.84
query24	3.24	1.53	1.28
query25	0.14	0.15	0.03
query26	0.61	0.13	0.14
query27	0.05	0.04	0.04
query28	10.05	1.12	1.07
query29	12.60	3.22	3.26
query30	0.25	0.06	0.06
query31	2.85	0.38	0.38
query32	3.28	0.46	0.48
query33	3.00	2.97	3.00
query34	17.11	4.51	4.53
query35	4.52	4.52	4.50
query36	0.67	0.49	0.47
query37	0.09	0.06	0.06
query38	0.05	0.03	0.04
query39	0.04	0.02	0.02
query40	0.15	0.13	0.13
query41	0.08	0.02	0.03
query42	0.03	0.03	0.02
query43	0.04	0.03	0.03
Total cold run time: 106.98 s
Total hot run time: 32.7 s

@englefly
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17569	7301	7211	7211
q2	2067	173	163	163
q3	10597	1092	1178	1092
q4	10570	723	718	718
q5	7750	2867	2727	2727
q6	240	145	142	142
q7	968	619	600	600
q8	9341	1925	2006	1925
q9	6566	6418	6385	6385
q10	6997	2322	2314	2314
q11	454	265	267	265
q12	403	210	215	210
q13	17794	2967	2991	2967
q14	241	208	211	208
q15	570	511	508	508
q16	701	616	620	616
q17	970	641	539	539
q18	7233	6735	6649	6649
q19	1411	1163	986	986
q20	471	204	198	198
q21	4082	3158	3089	3089
q22	1107	994	1000	994
Total cold run time: 108102 ms
Total hot run time: 40506 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7624	7194	7185	7185
q2	329	235	232	232
q3	2884	2930	2928	2928
q4	2008	1807	1813	1807
q5	5742	5753	5719	5719
q6	217	138	139	138
q7	2246	1817	1828	1817
q8	3335	3557	3518	3518
q9	8770	8823	8780	8780
q10	3591	3518	3504	3504
q11	589	521	491	491
q12	814	629	616	616
q13	9631	3175	3163	3163
q14	300	268	284	268
q15	567	517	525	517
q16	713	665	679	665
q17	1829	1580	1603	1580
q18	8155	7642	7573	7573
q19	1705	1653	1591	1591
q20	2124	1892	1867	1867
q21	5934	5438	5414	5414
q22	1099	1046	972	972
Total cold run time: 70206 ms
Total hot run time: 60345 ms

@doris-robot
Copy link

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

query1	1270	928	962	928
query2	6246	2158	2106	2106
query3	10822	4165	4254	4165
query4	65786	29575	23470	23470
query5	4944	460	443	443
query6	413	200	175	175
query7	5654	314	313	313
query8	317	232	222	222
query9	9293	2681	2702	2681
query10	485	273	266	266
query11	17471	15149	15732	15149
query12	156	98	103	98
query13	1539	436	449	436
query14	10745	7612	7146	7146
query15	204	190	187	187
query16	7188	470	517	470
query17	1051	570	569	569
query18	1844	311	317	311
query19	208	164	172	164
query20	115	107	109	107
query21	206	100	103	100
query22	4765	4685	4559	4559
query23	34758	34463	34223	34223
query24	6255	2955	2912	2912
query25	525	424	407	407
query26	674	168	163	163
query27	1884	306	300	300
query28	4756	2511	2483	2483
query29	676	454	422	422
query30	246	161	160	160
query31	979	809	868	809
query32	67	56	56	56
query33	480	294	272	272
query34	893	507	516	507
query35	861	746	736	736
query36	1068	966	964	964
query37	117	68	67	67
query38	4094	3985	4007	3985
query39	1514	1501	1467	1467
query40	198	93	99	93
query41	51	47	52	47
query42	112	99	102	99
query43	544	503	507	503
query44	1170	837	823	823
query45	185	166	171	166
query46	1136	722	721	721
query47	1989	1927	1900	1900
query48	487	392	372	372
query49	734	381	378	378
query50	837	443	421	421
query51	7388	7316	7240	7240
query52	96	83	91	83
query53	256	174	173	173
query54	545	448	430	430
query55	76	71	75	71
query56	257	232	250	232
query57	1252	1096	1115	1096
query58	201	201	203	201
query59	3310	3105	2973	2973
query60	273	243	252	243
query61	109	107	111	107
query62	770	677	688	677
query63	204	188	193	188
query64	1373	658	624	624
query65	3311	3179	3183	3179
query66	707	300	297	297
query67	15965	15627	15501	15501
query68	3935	579	556	556
query69	429	259	258	258
query70	1192	1141	1088	1088
query71	362	253	252	252
query72	6372	4091	3969	3969
query73	749	344	344	344
query74	10224	8952	9091	8952
query75	3342	2668	2658	2658
query76	1847	1074	1109	1074
query77	512	284	287	284
query78	10496	9662	9482	9482
query79	2097	589	623	589
query80	1337	417	425	417
query81	540	242	235	235
query82	724	117	112	112
query83	167	148	155	148
query84	287	80	81	80
query85	960	284	284	284
query86	417	303	299	299
query87	4386	4405	4247	4247
query88	3929	2382	2306	2306
query89	393	291	283	283
query90	2006	176	180	176
query91	187	143	145	143
query92	64	47	49	47
query93	2663	531	550	531
query94	916	285	298	285
query95	342	247	246	246
query96	620	272	274	272
query97	3329	3159	3207	3159
query98	217	200	201	200
query99	1608	1304	1298	1298
Total cold run time: 320754 ms
Total hot run time: 197110 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.03
query2	0.07	0.04	0.03
query3	0.22	0.07	0.07
query4	1.63	0.10	0.10
query5	0.51	0.50	0.53
query6	1.18	0.72	0.72
query7	0.02	0.01	0.02
query8	0.04	0.03	0.03
query9	0.56	0.50	0.49
query10	0.55	0.57	0.56
query11	0.14	0.11	0.10
query12	0.15	0.11	0.11
query13	0.60	0.58	0.60
query14	3.03	3.06	2.94
query15	0.89	0.83	0.82
query16	0.38	0.38	0.39
query17	0.99	1.07	1.01
query18	0.23	0.22	0.22
query19	1.96	1.80	2.08
query20	0.02	0.01	0.01
query21	15.37	0.59	0.57
query22	2.83	2.18	1.72
query23	16.94	1.03	0.84
query24	3.20	1.22	1.28
query25	0.25	0.18	0.08
query26	0.39	0.15	0.14
query27	0.04	0.04	0.04
query28	10.34	1.09	1.07
query29	12.55	3.25	3.22
query30	0.25	0.06	0.06
query31	2.87	0.38	0.38
query32	3.29	0.46	0.47
query33	2.99	3.05	2.99
query34	16.83	4.46	4.43
query35	4.56	4.48	4.49
query36	0.66	0.48	0.48
query37	0.09	0.06	0.06
query38	0.05	0.03	0.03
query39	0.03	0.02	0.03
query40	0.17	0.13	0.12
query41	0.08	0.02	0.03
query42	0.04	0.02	0.02
query43	0.03	0.02	0.02
Total cold run time: 107.05 s
Total hot run time: 32.98 s

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. reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants