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) cast to boolean wrong when constant folding by be #39019

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

morrySnow
Copy link
Contributor

not add case because be return wrong answer for this

select cast(2.0 as boolean); -- should return 1 not 2

not add case because be return wrong answer for this

select cast(2.0 as boolean); -- should return 1 not 2
@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.

@morrySnow
Copy link
Contributor Author

run buildall

@github-actions github-actions bot added the doing label Aug 7, 2024
@morrySnow
Copy link
Contributor Author

run p0

@morrySnow
Copy link
Contributor Author

run performance

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17611	4118	4109	4109
q2	2012	204	197	197
q3	10444	1328	1325	1325
q4	10160	855	941	855
q5	7629	2960	2957	2957
q6	223	146	142	142
q7	1070	645	626	626
q8	9466	1947	1909	1909
q9	8476	7002	6647	6647
q10	8785	3849	3872	3849
q11	436	260	260	260
q12	422	233	231	231
q13	17761	2980	2982	2980
q14	275	243	241	241
q15	531	480	497	480
q16	531	394	406	394
q17	962	915	900	900
q18	8089	7217	7195	7195
q19	1385	1221	1213	1213
q20	567	328	340	328
q21	5318	4763	4862	4763
q22	353	279	289	279
Total cold run time: 112506 ms
Total hot run time: 41880 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4074	4030	4045	4030
q2	331	222	219	219
q3	3038	3008	3158	3008
q4	1990	2022	2081	2022
q5	5624	5529	5449	5449
q6	222	131	130	130
q7	2168	1799	1853	1799
q8	3304	3347	3343	3343
q9	8638	8597	8732	8597
q10	3930	4039	4000	4000
q11	561	476	463	463
q12	788	624	644	624
q13	16358	3149	3174	3149
q14	288	269	266	266
q15	528	487	485	485
q16	460	409	414	409
q17	1755	1709	1716	1709
q18	8174	7735	7679	7679
q19	1752	1727	1760	1727
q20	2067	1873	1839	1839
q21	5739	5508	5361	5361
q22	531	450	461	450
Total cold run time: 72320 ms
Total hot run time: 56758 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 168763 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 4af6a06049715530e010385d3889899101d1a6fc, data reload: false

query1	914	377	381	377
query2	6464	1696	1714	1696
query3	6675	217	216	216
query4	19703	17645	17240	17240
query5	3625	516	507	507
query6	267	161	164	161
query7	4584	285	301	285
query8	241	201	196	196
query9	8532	2346	2363	2346
query10	446	301	266	266
query11	10493	10028	10034	10028
query12	121	91	86	86
query13	1624	382	377	377
query14	8415	6931	6199	6199
query15	206	168	166	166
query16	6959	463	501	463
query17	949	562	566	562
query18	1920	284	288	284
query19	209	148	149	148
query20	94	88	88	88
query21	208	110	103	103
query22	4360	4119	4029	4029
query23	33908	33795	33592	33592
query24	9574	3130	3100	3100
query25	723	409	398	398
query26	1350	156	153	153
query27	3018	280	280	280
query28	7503	2005	2007	2005
query29	1006	445	440	440
query30	235	154	155	154
query31	933	771	774	771
query32	104	64	57	57
query33	690	310	321	310
query34	905	495	487	487
query35	879	755	780	755
query36	1074	904	885	885
query37	214	79	78	78
query38	2974	2886	2823	2823
query39	898	855	821	821
query40	290	111	113	111
query41	45	43	43	43
query42	113	104	98	98
query43	445	415	432	415
query44	1169	743	724	724
query45	208	175	176	175
query46	1096	799	781	781
query47	1821	1756	1743	1743
query48	365	286	288	286
query49	906	422	416	416
query50	915	435	434	434
query51	6753	6610	6533	6533
query52	101	91	89	89
query53	260	193	185	185
query54	615	454	442	442
query55	76	72	73	72
query56	280	252	259	252
query57	1144	1032	1087	1032
query58	263	283	272	272
query59	2457	2307	2376	2307
query60	302	272	275	272
query61	97	90	99	90
query62	879	658	661	658
query63	219	178	178	178
query64	4681	1906	1873	1873
query65	3165	3084	3099	3084
query66	979	330	323	323
query67	15353	14733	14721	14721
query68	6020	601	577	577
query69	702	386	312	312
query70	1148	1077	1064	1064
query71	446	280	274	274
query72	7685	2693	2513	2513
query73	949	331	333	331
query74	6054	5633	5622	5622
query75	3664	2733	2712	2712
query76	3747	1260	1301	1260
query77	694	314	319	314
query78	9517	8912	8866	8866
query79	2240	538	539	538
query80	860	514	496	496
query81	540	230	232	230
query82	1274	140	130	130
query83	197	175	177	175
query84	256	79	81	79
query85	1285	378	301	301
query86	487	310	286	286
query87	3286	3126	3106	3106
query88	3624	2398	2436	2398
query89	391	289	298	289
query90	1773	200	188	188
query91	124	101	101	101
query92	59	48	53	48
query93	2008	612	620	612
query94	741	308	302	302
query95	376	269	259	259
query96	598	285	287	285
query97	3221	3102	3080	3080
query98	237	195	194	194
query99	1641	1280	1296	1280
Total cold run time: 263838 ms
Total hot run time: 168763 ms

@doris-robot
Copy link

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

query1	0.05	0.04	0.04
query2	0.08	0.04	0.03
query3	0.22	0.04	0.04
query4	1.68	0.06	0.07
query5	0.48	0.48	0.48
query6	1.15	0.72	0.72
query7	0.02	0.01	0.01
query8	0.06	0.05	0.04
query9	0.57	0.52	0.52
query10	0.58	0.57	0.56
query11	0.16	0.12	0.11
query12	0.15	0.13	0.12
query13	0.61	0.61	0.61
query14	0.80	0.79	0.80
query15	0.92	0.87	0.88
query16	0.34	0.35	0.36
query17	0.99	1.01	1.00
query18	0.22	0.21	0.20
query19	1.87	1.79	1.73
query20	0.01	0.01	0.01
query21	15.42	0.75	0.64
query22	3.73	8.21	1.12
query23	18.02	1.31	1.26
query24	2.27	0.22	0.22
query25	0.18	0.09	0.08
query26	0.33	0.21	0.22
query27	0.46	0.24	0.24
query28	13.18	1.01	0.97
query29	12.56	3.32	3.31
query30	0.26	0.06	0.06
query31	2.85	0.42	0.41
query32	3.24	0.50	0.49
query33	2.96	2.96	2.90
query34	15.43	4.29	4.29
query35	4.30	4.30	4.31
query36	0.67	0.50	0.47
query37	0.18	0.17	0.17
query38	0.16	0.14	0.15
query39	0.04	0.04	0.04
query40	0.16	0.14	0.13
query41	0.09	0.04	0.05
query42	0.06	0.05	0.05
query43	0.04	0.04	0.04
Total cold run time: 107.55 s
Total hot run time: 29.87 s

@morrySnow
Copy link
Contributor Author

run cloud_p0

Copy link
Contributor

github-actions bot commented Aug 8, 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 Aug 8, 2024
Copy link
Contributor

github-actions bot commented Aug 8, 2024

PR approved by anyone and no changes requested.

@morrySnow morrySnow merged commit 8d4f8b1 into apache:master Aug 8, 2024
30 of 31 checks passed
@morrySnow morrySnow deleted the fix_cast_to_boolean branch August 8, 2024 09:11
@morrySnow morrySnow added not-merge/2.0 do not merge into 2.0 branch and removed dev/2.0.x labels Aug 8, 2024
morrySnow added a commit to morrySnow/incubator-doris that referenced this pull request Aug 8, 2024
…che#39019)

pick from master apache#39019

not add case because be return wrong answer for this

select cast(2.0 as boolean); -- should return 1 not 2
yiguolei pushed a commit that referenced this pull request Aug 8, 2024
) (#39128)

pick from master #39019

not add case because be return wrong answer for this

select cast(2.0 as boolean); -- should return 1 not 2
dataroaring pushed a commit that referenced this pull request Aug 11, 2024
)

not add case because be return wrong answer for this

select cast(2.0 as boolean); -- should return 1 not 2
wyxxxcat pushed a commit to wyxxxcat/doris that referenced this pull request Aug 14, 2024
…che#39019)

not add case because be return wrong answer for this

select cast(2.0 as boolean); -- should return 1 not 2
dataroaring pushed a commit that referenced this pull request Aug 16, 2024
)

not add case because be return wrong answer for this

select cast(2.0 as boolean); -- should return 1 not 2
@yiguolei yiguolei mentioned this pull request Sep 5, 2024
3 tasks
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.6-merged dev/3.0.2-merged not-merge/2.0 do not merge into 2.0 branch reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants