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](scan) Incorrect scan keys lead to wrong query results. #40814

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

mrhhsg
Copy link
Member

@mrhhsg mrhhsg commented Sep 13, 2024

Proposed changes

mysql [doris_14555]>select * from table_9436528_3;
+------+------+------+------+------------------------+--------------------+------+
| col1 | col2 | col3 | col5 | col4                   | col6               | col7 |
+------+------+------+------+------------------------+--------------------+------+
| -100 |    1 |  -82 |    1 | 2024-02-16 04:37:37.00 | -1299962421.904282 | NULL |
| -100 |    1 |   92 |    1 | 2024-02-16 04:37:37.00 |   23423423.0324234 | NULL |
| -100 |    0 |  -82 |    0 | 2023-11-11 10:49:43.00 |   840968969.872149 | NULL |

wrong result:

mysql [doris_14555]>select * from table_9436528_3 where col1 <= -100 and col2 in (true, false) and col3 = -82;
+------+------+------+------+------------------------+--------------------+------+
| col1 | col2 | col3 | col5 | col4                   | col6               | col7 |
+------+------+------+------+------------------------+--------------------+------+
| -100 |    1 |  -82 |    1 | 2024-02-16 04:37:37.00 | -1299962421.904282 | NULL |
| -100 |    1 |   92 |    1 | 2024-02-16 04:37:37.00 |   23423423.0324234 | NULL |
+------+------+------+------+------------------------+--------------------+------+

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

@mrhhsg
Copy link
Member Author

mrhhsg commented Sep 13, 2024

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	18037	7433	7489	7433
q2	2544	210	188	188
q3	10956	1400	1420	1400
q4	10922	907	1036	907
q5	7815	3264	3232	3232
q6	243	152	158	152
q7	1069	649	644	644
q8	9955	2052	2040	2040
q9	6868	6324	6317	6317
q10	7013	2516	2512	2512
q11	429	250	248	248
q12	415	234	236	234
q13	17787	3008	3029	3008
q14	292	246	261	246
q15	581	542	520	520
q16	511	421	427	421
q17	1003	956	944	944
q18	7366	6760	6949	6760
q19	1378	1260	1230	1230
q20	596	341	331	331
q21	3907	3571	3521	3521
q22	1067	1014	1013	1013
Total cold run time: 110754 ms
Total hot run time: 43301 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7224	7460	7189	7189
q2	342	228	228	228
q3	2918	2915	2904	2904
q4	1963	1969	1991	1969
q5	5499	5450	5447	5447
q6	233	143	146	143
q7	2042	1676	1690	1676
q8	3250	3363	3300	3300
q9	8406	8410	8415	8410
q10	3408	3486	3478	3478
q11	575	482	472	472
q12	797	591	569	569
q13	5406	3068	3082	3068
q14	301	268	275	268
q15	572	521	522	521
q16	496	446	451	446
q17	1776	1745	1720	1720
q18	8078	7635	7724	7635
q19	1737	1710	1702	1702
q20	2074	1791	1777	1777
q21	5769	5530	5519	5519
q22	1108	1025	1037	1025
Total cold run time: 63974 ms
Total hot run time: 59466 ms

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.89% (9464/25654)
Line Coverage: 28.27% (77851/275430)
Region Coverage: 27.67% (40198/145295)
Branch Coverage: 24.28% (20426/84140)
Coverage Report: http://coverage.selectdb-in.cc/coverage/f189976a2e8a257347dcac45d1661ef80a5c8839_f189976a2e8a257347dcac45d1661ef80a5c8839/report/index.html

@doris-robot
Copy link

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

query1	914	395	377	377
query2	6481	1760	1698	1698
query3	6678	211	222	211
query4	26889	24034	24102	24034
query5	5463	536	516	516
query6	256	170	159	159
query7	4575	307	317	307
query8	299	218	214	214
query9	8491	2574	2569	2569
query10	496	293	280	280
query11	16095	15655	15645	15645
query12	155	105	103	103
query13	1690	399	391	391
query14	11477	6540	6443	6443
query15	213	177	172	172
query16	7593	512	496	496
query17	1556	586	569	569
query18	1989	301	301	301
query19	198	153	154	153
query20	124	113	113	113
query21	213	104	109	104
query22	4459	4300	4288	4288
query23	34414	33790	33684	33684
query24	9528	3155	3109	3109
query25	676	405	417	405
query26	1231	164	165	164
query27	2810	284	292	284
query28	6932	2119	2093	2093
query29	951	433	436	433
query30	302	162	157	157
query31	1002	788	828	788
query32	108	59	58	58
query33	738	318	307	307
query34	916	478	480	478
query35	881	744	749	744
query36	1063	909	898	898
query37	186	90	86	86
query38	4042	3945	3871	3871
query39	1502	1424	1425	1424
query40	207	120	118	118
query41	51	51	48	48
query42	124	101	101	101
query43	489	439	451	439
query44	1242	808	764	764
query45	202	174	173	173
query46	1117	832	834	832
query47	1882	1769	1807	1769
query48	369	297	289	289
query49	1112	463	461	461
query50	914	437	452	437
query51	7099	6924	6820	6820
query52	103	93	90	90
query53	261	191	185	185
query54	803	478	481	478
query55	83	79	79	79
query56	293	284	270	270
query57	1209	1079	1092	1079
query58	246	245	252	245
query59	2828	2444	2576	2444
query60	314	301	288	288
query61	125	125	126	125
query62	919	674	672	672
query63	232	193	195	193
query64	5480	672	701	672
query65	3305	3189	3208	3189
query66	1418	301	298	298
query67	15914	15544	15499	15499
query68	3339	887	862	862
query69	440	326	325	325
query70	1168	1157	1131	1131
query71	365	350	349	349
query72	6181	3465	3405	3405
query73	593	584	599	584
query74	9318	9055	9206	9055
query75	3144	3047	3015	3015
query76	1937	848	845	845
query77	447	411	404	404
query78	9449	9297	9278	9278
query79	939	888	871	871
query80	881	876	814	814
query81	444	258	271	258
query82	268	261	263	261
query83	205	185	195	185
query84	242	112	107	107
query85	674	421	403	403
query86	307	303	302	302
query87	4388	4428	4358	4358
query88	4142	4100	4070	4070
query89	383	364	369	364
query90	1271	331	321	321
query91	129	129	130	129
query92	81	77	77	77
query93	1061	1080	1052	1052
query94	606	362	401	362
query95	461	429	434	429
query96	479	468	478	468
query97	3124	3119	3164	3119
query98	243	226	223	223
query99	1596	1334	1297	1297
Total cold run time: 280232 ms
Total hot run time: 194906 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.04
query2	0.07	0.04	0.04
query3	0.22	0.04	0.04
query4	1.68	0.07	0.07
query5	0.50	0.50	0.50
query6	1.16	0.73	0.74
query7	0.02	0.02	0.02
query8	0.05	0.05	0.04
query9	0.56	0.51	0.52
query10	0.57	0.59	0.58
query11	0.16	0.12	0.12
query12	0.14	0.12	0.12
query13	0.63	0.62	0.61
query14	1.48	1.47	1.45
query15	0.90	0.87	0.87
query16	0.35	0.36	0.36
query17	1.04	1.01	1.04
query18	0.22	0.21	0.21
query19	1.95	1.84	1.85
query20	0.01	0.01	0.02
query21	15.41	0.69	0.67
query22	3.73	7.01	1.97
query23	17.91	1.36	1.35
query24	2.26	0.23	0.22
query25	0.18	0.08	0.08
query26	0.30	0.18	0.18
query27	0.09	0.07	0.07
query28	13.18	1.14	1.10
query29	12.52	3.42	3.35
query30	0.25	0.06	0.06
query31	2.86	0.43	0.43
query32	3.23	0.50	0.49
query33	3.05	3.04	3.11
query34	15.44	4.35	4.33
query35	4.38	4.36	4.40
query36	0.69	0.49	0.49
query37	0.19	0.17	0.16
query38	0.16	0.15	0.15
query39	0.04	0.03	0.04
query40	0.17	0.14	0.14
query41	0.11	0.05	0.05
query42	0.06	0.05	0.05
query43	0.05	0.04	0.04
Total cold run time: 108.01 s
Total hot run time: 31.98 s

@mrhhsg
Copy link
Member Author

mrhhsg commented Sep 13, 2024

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.89% (9463/25654)
Line Coverage: 28.25% (77799/275427)
Region Coverage: 27.66% (40188/145293)
Branch Coverage: 24.27% (20422/84138)
Coverage Report: http://coverage.selectdb-in.cc/coverage/4a2774252c04893e378f4cd6cf15a248dddef55b_4a2774252c04893e378f4cd6cf15a248dddef55b/report/index.html

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	19060	7401	7302	7302
q2	2045	185	181	181
q3	10469	1282	1416	1282
q4	11633	1086	1027	1027
q5	7794	3187	3170	3170
q6	241	156	155	155
q7	1044	637	617	617
q8	9466	2047	2017	2017
q9	6883	6342	6393	6342
q10	7122	2574	2522	2522
q11	445	265	264	264
q12	421	231	235	231
q13	17965	3161	3154	3154
q14	298	317	278	278
q15	593	543	538	538
q16	942	444	448	444
q17	1419	975	979	975
q18	8558	6861	6734	6734
q19	1390	1238	1232	1232
q20	625	337	316	316
q21	3876	3504	3490	3490
q22	1112	994	1006	994
Total cold run time: 113401 ms
Total hot run time: 43265 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7298	7152	7371	7152
q2	352	230	242	230
q3	3136	3054	3201	3054
q4	2090	2043	2128	2043
q5	5628	5671	5726	5671
q6	237	148	145	145
q7	2191	1810	1762	1762
q8	3344	3413	3382	3382
q9	8891	8697	8634	8634
q10	3538	3561	3553	3553
q11	571	486	493	486
q12	863	627	649	627
q13	12865	3218	3187	3187
q14	314	288	281	281
q15	599	534	545	534
q16	507	462	466	462
q17	1798	1761	1778	1761
q18	8392	8010	7922	7922
q19	1777	1746	1748	1746
q20	2121	1879	1906	1879
q21	5919	5555	5580	5555
q22	1091	1056	1021	1021
Total cold run time: 73522 ms
Total hot run time: 61087 ms

@mrhhsg
Copy link
Member Author

mrhhsg commented Sep 13, 2024

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17978	7472	7277	7277
q2	2635	195	206	195
q3	12114	1345	1345	1345
q4	10330	1008	1012	1008
q5	8115	3281	3196	3196
q6	250	164	157	157
q7	1050	637	628	628
q8	9444	2007	2037	2007
q9	6815	6272	6307	6272
q10	7007	2515	2512	2512
q11	446	256	260	256
q12	415	242	235	235
q13	17769	3028	3040	3028
q14	286	246	254	246
q15	636	534	524	524
q16	517	433	443	433
q17	991	956	960	956
q18	7412	6795	6671	6671
q19	1376	1234	1231	1231
q20	614	352	321	321
q21	3932	3578	3597	3578
q22	1073	966	969	966
Total cold run time: 111205 ms
Total hot run time: 43042 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7221	7193	7126	7126
q2	334	232	224	224
q3	2904	2904	2926	2904
q4	1963	1970	1959	1959
q5	5451	5413	5428	5413
q6	251	150	147	147
q7	2023	1697	1694	1694
q8	3238	3330	3296	3296
q9	8362	8388	8401	8388
q10	3393	3443	3450	3443
q11	583	471	472	471
q12	788	552	569	552
q13	7103	3068	3060	3060
q14	306	280	266	266
q15	588	524	521	521
q16	499	453	456	453
q17	1775	1731	1663	1663
q18	8087	7685	7578	7578
q19	1723	1709	1701	1701
q20	2046	1801	1803	1801
q21	5690	5446	5428	5428
q22	1111	992	1004	992
Total cold run time: 65439 ms
Total hot run time: 59080 ms

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.89% (9465/25659)
Line Coverage: 28.24% (77791/275458)
Region Coverage: 27.66% (40190/145300)
Branch Coverage: 24.26% (20413/84142)
Coverage Report: http://coverage.selectdb-in.cc/coverage/dd3b0a15c8f7cd92b5ba8552574b5ca7f85cee87_dd3b0a15c8f7cd92b5ba8552574b5ca7f85cee87/report/index.html

@doris-robot
Copy link

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

query1	905	387	390	387
query2	6480	1802	1798	1798
query3	6650	209	222	209
query4	26337	24193	24165	24165
query5	5534	567	562	562
query6	272	191	178	178
query7	4590	310	313	310
query8	283	229	230	229
query9	8517	2614	2615	2614
query10	511	284	281	281
query11	16217	15530	15551	15530
query12	163	103	100	100
query13	1707	393	379	379
query14	11666	7179	7372	7179
query15	211	168	174	168
query16	7543	450	463	450
query17	1532	566	561	561
query18	1971	289	303	289
query19	195	153	149	149
query20	121	111	109	109
query21	205	106	103	103
query22	4304	4165	4223	4165
query23	34381	33436	33479	33436
query24	9041	3177	3162	3162
query25	632	398	393	393
query26	728	162	162	162
query27	2122	287	282	282
query28	5205	2096	2083	2083
query29	822	415	416	415
query30	303	167	156	156
query31	988	775	819	775
query32	105	54	57	54
query33	622	314	293	293
query34	927	503	497	497
query35	874	729	730	729
query36	1056	912	923	912
query37	154	88	87	87
query38	3978	3912	3985	3912
query39	1439	1431	1404	1404
query40	207	118	118	118
query41	49	48	44	44
query42	123	96	102	96
query43	496	458	451	451
query44	1211	804	768	768
query45	200	170	174	170
query46	1131	864	822	822
query47	1886	1752	1819	1752
query48	366	292	298	292
query49	1063	461	454	454
query50	938	457	447	447
query51	7032	6752	6878	6752
query52	100	91	90	90
query53	271	189	183	183
query54	777	469	483	469
query55	80	79	79	79
query56	313	274	266	266
query57	1198	1085	1108	1085
query58	255	247	240	240
query59	2710	2638	2555	2555
query60	300	285	273	273
query61	107	102	105	102
query62	912	661	662	661
query63	225	199	196	196
query64	3957	684	674	674
query65	3250	3138	3197	3138
query66	832	302	302	302
query67	16081	15466	15507	15466
query68	3170	917	895	895
query69	443	343	343	343
query70	1178	1148	1157	1148
query71	361	355	350	350
query72	6151	3602	3576	3576
query73	605	602	592	592
query74	9332	9062	9112	9062
query75	3204	3037	2977	2977
query76	1877	903	892	892
query77	480	423	434	423
query78	9383	9282	9282	9282
query79	970	918	912	912
query80	889	875	848	848
query81	464	269	275	269
query82	269	270	266	266
query83	201	196	201	196
query84	236	116	116	116
query85	718	472	464	464
query86	312	306	317	306
query87	4366	4346	4351	4346
query88	4333	4104	4098	4098
query89	380	379	387	379
query90	1260	329	321	321
query91	127	127	131	127
query92	83	76	78	76
query93	1072	1098	1069	1069
query94	616	360	396	360
query95	485	438	425	425
query96	478	471	471	471
query97	3131	3071	3154	3071
query98	231	236	244	236
query99	1639	1332	1333	1332
Total cold run time: 273805 ms
Total hot run time: 195840 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.04
query2	0.07	0.04	0.04
query3	0.22	0.04	0.04
query4	1.68	0.07	0.07
query5	0.49	0.50	0.51
query6	1.14	0.74	0.72
query7	0.02	0.02	0.02
query8	0.06	0.05	0.04
query9	0.56	0.51	0.51
query10	0.57	0.60	0.58
query11	0.15	0.12	0.12
query12	0.16	0.13	0.12
query13	0.62	0.61	0.61
query14	1.46	1.48	1.43
query15	0.91	0.88	0.88
query16	0.36	0.37	0.35
query17	1.05	1.04	1.01
query18	0.21	0.20	0.20
query19	1.90	1.86	1.81
query20	0.01	0.01	0.01
query21	15.39	0.67	0.65
query22	4.02	7.48	0.96
query23	17.84	1.42	1.42
query24	2.25	0.22	0.22
query25	0.19	0.08	0.08
query26	0.30	0.19	0.17
query27	0.08	0.07	0.08
query28	13.21	1.14	1.12
query29	12.56	3.42	3.37
query30	0.24	0.05	0.05
query31	2.88	0.43	0.41
query32	3.22	0.50	0.48
query33	3.01	3.07	3.04
query34	15.46	4.33	4.30
query35	4.38	4.33	4.32
query36	0.68	0.49	0.51
query37	0.19	0.17	0.16
query38	0.16	0.15	0.15
query39	0.05	0.04	0.04
query40	0.18	0.13	0.13
query41	0.10	0.05	0.04
query42	0.06	0.05	0.05
query43	0.04	0.04	0.04
Total cold run time: 108.17 s
Total hot run time: 30.86 s

@cambyzju
Copy link
Contributor

does 2.1 and 2.0 also have this problem?

"""

qt_select1 " select * from test_scan_keys_with_bool_type order by 1, 2, 3, 4, 5, 6, 7; "
qt_select2 " select * from test_scan_keys_with_bool_type where col1 <= -100 and col2 in (true, false) and col3 = -82 order by 1, 2, 3, 4, 5, 6, 7; "
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. col2 int, col2 in (1,2)
  2. col2 char, col2 in ('a','b')

`col7` datetime(3) REPLACE_IF_NOT_NULL NULL
) ENGINE=OLAP
AGGREGATE KEY(`col1`, `col2`, `col3`)
DISTRIBUTED BY HASH(`col1`, `col2`, `col3`) BUCKETS 4
Copy link
Contributor

Choose a reason for hiding this comment

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

set buckets to 1
disable compaction

@mrhhsg
Copy link
Member Author

mrhhsg commented Sep 18, 2024

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 37.33% (9583/25670)
Line Coverage: 28.71% (79213/275875)
Region Coverage: 28.19% (41013/145500)
Branch Coverage: 24.81% (20903/84248)
Coverage Report: http://coverage.selectdb-in.cc/coverage/e4a07abc040b56ce46deedf68053349ca12ddb1d_e4a07abc040b56ce46deedf68053349ca12ddb1d/report/index.html

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17615	7397	7255	7255
q2	2060	165	154	154
q3	10808	1094	1179	1094
q4	10561	744	716	716
q5	7771	3087	3138	3087
q6	233	149	149	149
q7	1001	616	594	594
q8	9429	2066	2062	2062
q9	6903	6421	6427	6421
q10	7002	2275	2315	2275
q11	456	246	251	246
q12	405	212	221	212
q13	17790	2970	2974	2970
q14	237	218	223	218
q15	565	511	524	511
q16	657	618	588	588
q17	995	859	837	837
q18	7300	6791	6857	6791
q19	1396	1078	969	969
q20	586	289	285	285
q21	4091	3324	3277	3277
q22	1108	1035	984	984
Total cold run time: 108969 ms
Total hot run time: 41695 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7246	7262	7269	7262
q2	328	238	226	226
q3	3088	2993	2957	2957
q4	2067	1852	1822	1822
q5	5584	5576	5649	5576
q6	248	148	145	145
q7	2239	1817	1776	1776
q8	3317	3473	3440	3440
q9	8879	9065	8824	8824
q10	3494	3489	3527	3489
q11	578	480	484	480
q12	825	591	657	591
q13	9254	3104	3163	3104
q14	309	298	286	286
q15	576	516	542	516
q16	744	675	673	673
q17	1817	1587	1566	1566
q18	8281	7827	7934	7827
q19	1717	1531	1454	1454
q20	2157	1913	1876	1876
q21	5530	5290	5371	5290
q22	1137	1054	1045	1045
Total cold run time: 69415 ms
Total hot run time: 60225 ms

@doris-robot
Copy link

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

query1	1282	897	875	875
query2	6404	2069	2033	2033
query3	10779	3978	3730	3730
query4	64187	28661	23280	23280
query5	4999	487	465	465
query6	408	160	164	160
query7	5460	288	292	288
query8	305	225	222	222
query9	8423	2674	2677	2674
query10	448	294	288	288
query11	17635	15131	15865	15131
query12	151	99	103	99
query13	1512	439	428	428
query14	10904	7260	7396	7260
query15	197	187	172	172
query16	6580	497	505	497
query17	1123	601	590	590
query18	1288	315	320	315
query19	206	154	153	153
query20	133	116	115	115
query21	211	107	104	104
query22	4739	4563	4504	4504
query23	34572	34125	33890	33890
query24	6009	2914	2922	2914
query25	513	408	398	398
query26	662	154	156	154
query27	1763	281	284	281
query28	4486	2469	2462	2462
query29	660	428	432	428
query30	231	155	166	155
query31	941	777	801	777
query32	72	52	58	52
query33	390	299	289	289
query34	915	501	494	494
query35	865	753	727	727
query36	1056	940	938	938
query37	150	92	88	88
query38	4036	3887	3887	3887
query39	1446	1399	1403	1399
query40	216	101	95	95
query41	51	48	50	48
query42	117	94	94	94
query43	511	472	473	472
query44	1198	818	797	797
query45	193	164	159	159
query46	1142	750	759	750
query47	1951	1803	1860	1803
query48	467	355	362	355
query49	715	395	429	395
query50	832	407	420	407
query51	7214	6902	6878	6878
query52	95	85	83	83
query53	246	172	176	172
query54	558	457	453	453
query55	75	75	75	75
query56	264	245	254	245
query57	1223	1067	1092	1067
query58	217	240	255	240
query59	3057	2962	2988	2962
query60	280	261	253	253
query61	100	102	114	102
query62	781	661	642	642
query63	223	185	186	185
query64	1380	641	668	641
query65	3252	3190	3146	3146
query66	622	302	305	302
query67	15894	15689	15656	15656
query68	1330	551	554	551
query69	442	276	291	276
query70	1178	1131	1142	1131
query71	321	263	264	263
query72	6244	3955	3978	3955
query73	765	318	326	318
query74	9664	8833	8884	8833
query75	3356	2697	2661	2661
query76	1383	894	884	884
query77	489	288	293	288
query78	10047	9641	9330	9330
query79	1113	897	874	874
query80	880	563	564	563
query81	500	251	256	251
query82	1319	230	234	230
query83	225	164	150	150
query84	288	102	108	102
query85	808	366	364	364
query86	342	318	297	297
query87	4397	4427	4311	4311
query88	4306	4081	4051	4051
query89	386	354	360	354
query90	1827	310	305	305
query91	180	162	162	162
query92	75	69	72	69
query93	957	902	893	893
query94	742	362	362	362
query95	451	408	401	401
query96	489	483	485	483
query97	3217	3134	3118	3118
query98	218	223	229	223
query99	1495	1317	1299	1299
Total cold run time: 308449 ms
Total hot run time: 198545 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.04
query2	0.06	0.03	0.02
query3	0.23	0.06	0.06
query4	1.65	0.10	0.10
query5	0.50	0.50	0.50
query6	1.15	0.72	0.73
query7	0.02	0.02	0.01
query8	0.04	0.03	0.03
query9	0.56	0.50	0.51
query10	0.55	0.53	0.53
query11	0.15	0.11	0.11
query12	0.14	0.11	0.11
query13	0.60	0.59	0.59
query14	3.00	2.96	2.95
query15	0.90	0.81	0.83
query16	0.38	0.38	0.40
query17	1.04	1.05	1.06
query18	0.20	0.19	0.20
query19	1.82	1.85	1.95
query20	0.01	0.01	0.00
query21	15.35	0.63	0.60
query22	2.75	3.25	1.87
query23	17.14	0.79	0.90
query24	3.50	1.67	1.38
query25	0.30	0.08	0.18
query26	0.39	0.14	0.13
query27	0.05	0.03	0.03
query28	9.37	1.10	1.06
query29	12.55	3.20	3.24
query30	0.25	0.06	0.07
query31	2.86	0.37	0.38
query32	3.28	0.47	0.46
query33	2.95	3.00	3.02
query34	16.51	4.36	4.43
query35	4.49	4.40	4.46
query36	0.68	0.47	0.48
query37	0.08	0.06	0.06
query38	0.05	0.04	0.04
query39	0.04	0.02	0.02
query40	0.16	0.12	0.13
query41	0.08	0.02	0.03
query42	0.04	0.02	0.02
query43	0.03	0.03	0.03
Total cold run time: 105.94 s
Total hot run time: 33.12 s

Copy link
Contributor

@yiguolei yiguolei 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 Sep 18, 2024
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.

Copy link
Member

@eldenmoon eldenmoon left a comment

Choose a reason for hiding this comment

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

LGTM

@yiguolei yiguolei merged commit a36f090 into apache:master Sep 19, 2024
23 of 28 checks passed
@mrhhsg mrhhsg deleted the fix_scan_keys branch September 19, 2024 06:17
mrhhsg added a commit to mrhhsg/doris that referenced this pull request Sep 19, 2024
…40814)

## Proposed changes

```
mysql [doris_14555]>select * from table_9436528_3;
+------+------+------+------+------------------------+--------------------+------+
| col1 | col2 | col3 | col5 | col4                   | col6               | col7 |
+------+------+------+------+------------------------+--------------------+------+
| -100 |    1 |  -82 |    1 | 2024-02-16 04:37:37.00 | -1299962421.904282 | NULL |
| -100 |    1 |   92 |    1 | 2024-02-16 04:37:37.00 |   23423423.0324234 | NULL |
| -100 |    0 |  -82 |    0 | 2023-11-11 10:49:43.00 |   840968969.872149 | NULL |
```
wrong result:
```
mysql [doris_14555]>select * from table_9436528_3 where col1 <= -100 and col2 in (true, false) and col3 = -82;
+------+------+------+------+------------------------+--------------------+------+
| col1 | col2 | col3 | col5 | col4                   | col6               | col7 |
+------+------+------+------+------------------------+--------------------+------+
| -100 |    1 |  -82 |    1 | 2024-02-16 04:37:37.00 | -1299962421.904282 | NULL |
| -100 |    1 |   92 |    1 | 2024-02-16 04:37:37.00 |   23423423.0324234 | NULL |
+------+------+------+------+------------------------+--------------------+------+
```
mrhhsg added a commit to mrhhsg/doris that referenced this pull request Sep 19, 2024
…40814)

```
mysql [doris_14555]>select * from table_9436528_3;
+------+------+------+------+------------------------+--------------------+------+
| col1 | col2 | col3 | col5 | col4                   | col6               | col7 |
+------+------+------+------+------------------------+--------------------+------+
| -100 |    1 |  -82 |    1 | 2024-02-16 04:37:37.00 | -1299962421.904282 | NULL |
| -100 |    1 |   92 |    1 | 2024-02-16 04:37:37.00 |   23423423.0324234 | NULL |
| -100 |    0 |  -82 |    0 | 2023-11-11 10:49:43.00 |   840968969.872149 | NULL |
```
wrong result:
```
mysql [doris_14555]>select * from table_9436528_3 where col1 <= -100 and col2 in (true, false) and col3 = -82;
+------+------+------+------+------------------------+--------------------+------+
| col1 | col2 | col3 | col5 | col4                   | col6               | col7 |
+------+------+------+------+------------------------+--------------------+------+
| -100 |    1 |  -82 |    1 | 2024-02-16 04:37:37.00 | -1299962421.904282 | NULL |
| -100 |    1 |   92 |    1 | 2024-02-16 04:37:37.00 |   23423423.0324234 | NULL |
+------+------+------+------+------------------------+--------------------+------+
```
yiguolei pushed a commit that referenced this pull request Sep 19, 2024
…#40971)

## Proposed changes
pick #40814
```
mysql [doris_14555]>select * from table_9436528_3;
+------+------+------+------+------------------------+--------------------+------+
| col1 | col2 | col3 | col5 | col4                   | col6               | col7 |
+------+------+------+------+------------------------+--------------------+------+
| -100 |    1 |  -82 |    1 | 2024-02-16 04:37:37.00 | -1299962421.904282 | NULL |
| -100 |    1 |   92 |    1 | 2024-02-16 04:37:37.00 |   23423423.0324234 | NULL |
| -100 |    0 |  -82 |    0 | 2023-11-11 10:49:43.00 |   840968969.872149 | NULL |
```
wrong result:
```
mysql [doris_14555]>select * from table_9436528_3 where col1 <= -100 and col2 in (true, false) and col3 = -82;
+------+------+------+------+------------------------+--------------------+------+
| col1 | col2 | col3 | col5 | col4                   | col6               | col7 |
+------+------+------+------+------------------------+--------------------+------+
| -100 |    1 |  -82 |    1 | 2024-02-16 04:37:37.00 | -1299962421.904282 | NULL |
| -100 |    1 |   92 |    1 | 2024-02-16 04:37:37.00 |   23423423.0324234 | NULL |
+------+------+------+------+------------------------+--------------------+------+
```

## Proposed changes

Issue Number: close #xxx

<!--Describe your changes.-->
dataroaring pushed a commit that referenced this pull request Sep 26, 2024
## Proposed changes

```
mysql [doris_14555]>select * from table_9436528_3;
+------+------+------+------+------------------------+--------------------+------+
| col1 | col2 | col3 | col5 | col4                   | col6               | col7 |
+------+------+------+------+------------------------+--------------------+------+
| -100 |    1 |  -82 |    1 | 2024-02-16 04:37:37.00 | -1299962421.904282 | NULL |
| -100 |    1 |   92 |    1 | 2024-02-16 04:37:37.00 |   23423423.0324234 | NULL |
| -100 |    0 |  -82 |    0 | 2023-11-11 10:49:43.00 |   840968969.872149 | NULL |
```
wrong result:
```
mysql [doris_14555]>select * from table_9436528_3 where col1 <= -100 and col2 in (true, false) and col3 = -82;
+------+------+------+------+------------------------+--------------------+------+
| col1 | col2 | col3 | col5 | col4                   | col6               | col7 |
+------+------+------+------+------------------------+--------------------+------+
| -100 |    1 |  -82 |    1 | 2024-02-16 04:37:37.00 | -1299962421.904282 | NULL |
| -100 |    1 |   92 |    1 | 2024-02-16 04:37:37.00 |   23423423.0324234 | 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.2-merged p0_w reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants