Skip to content

Conversation

@zclllyybb
Copy link
Contributor

@zclllyybb zclllyybb commented Apr 11, 2025

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #38284

Problem Summary:

before, for a short range with big value, like [100000000, 100000001], it will raise an error by mistake. now fixed.

before:

mysql> select number, array_range(number * 100000000, number * 100000000 + 10) from numbers("number" = "2");
ERROR 1105 (HY000): errCode = 2, detailMessage = [CANCELLED]Array size exceeds the limit 1000000

now:

mysql> select number, array_range(number * 100000000, number * 100000000 + 10) from numbers("number" = "2");
+--------+----------------------------------------------------------------------------------------------------------------+
| number | array_range(number * 100000000, number * 100000000 + 10)                                                       |
+--------+----------------------------------------------------------------------------------------------------------------+
|      0 | [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]                                                                                 |
|      1 | [100000000, 100000001, 100000002, 100000003, 100000004, 100000005, 100000006, 100000007, 100000008, 100000009] |
+--------+----------------------------------------------------------------------------------------------------------------+

Release note

fix wrong length check of function array_range

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 Apr 11, 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?

@zclllyybb
Copy link
Contributor Author

run buildall

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

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

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	25879	5190	4976	4976
q2	2059	268	176	176
q3	10419	1254	672	672
q4	10224	998	524	524
q5	7529	2328	2381	2328
q6	181	159	131	131
q7	908	737	613	613
q8	9307	1263	1082	1082
q9	6870	5084	5285	5084
q10	6832	2284	1888	1888
q11	493	274	278	274
q12	346	350	210	210
q13	17820	3611	3246	3246
q14	235	244	213	213
q15	529	477	476	476
q16	632	618	594	594
q17	585	858	363	363
q18	7793	7294	7166	7166
q19	2353	994	538	538
q20	319	325	216	216
q21	3854	2602	2372	2372
q22	1013	1002	933	933
Total cold run time: 116180 ms
Total hot run time: 34075 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5226	5166	5039	5039
q2	238	329	230	230
q3	2123	2605	2259	2259
q4	1438	1781	1397	1397
q5	4450	4434	4410	4410
q6	216	168	125	125
q7	2007	1927	1766	1766
q8	2612	2558	2543	2543
q9	7274	7160	6909	6909
q10	2974	3180	2748	2748
q11	578	517	477	477
q12	672	750	593	593
q13	3495	3889	3290	3290
q14	311	309	287	287
q15	510	472	483	472
q16	647	671	670	670
q17	1175	1580	1388	1388
q18	7654	7574	7518	7518
q19	790	794	909	794
q20	1898	1964	1813	1813
q21	5193	4884	4870	4870
q22	1095	1037	997	997
Total cold run time: 52576 ms
Total hot run time: 50595 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 192954 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 80e8e217cfa0bbd29398cf5be1c67e4061b2a493, data reload: false

query1	1422	1079	1048	1048
query2	6259	1859	1870	1859
query3	11107	4402	4555	4402
query4	51329	25717	23343	23343
query5	5164	592	437	437
query6	315	195	180	180
query7	4865	516	283	283
query8	306	249	246	246
query9	5468	2592	2588	2588
query10	446	313	263	263
query11	15095	15004	14837	14837
query12	155	114	102	102
query13	1014	488	386	386
query14	10041	6287	6271	6271
query15	200	195	176	176
query16	7052	648	514	514
query17	1081	728	623	623
query18	1552	402	317	317
query19	196	184	158	158
query20	126	133	122	122
query21	208	134	121	121
query22	4377	4318	4268	4268
query23	34183	33371	33363	33363
query24	6529	2412	2398	2398
query25	450	471	425	425
query26	698	282	154	154
query27	2227	495	348	348
query28	3184	2471	2423	2423
query29	583	558	433	433
query30	281	223	209	209
query31	868	866	786	786
query32	71	67	59	59
query33	465	367	296	296
query34	771	867	505	505
query35	815	848	763	763
query36	963	1032	911	911
query37	122	112	79	79
query38	4281	4268	4220	4220
query39	1546	1424	1422	1422
query40	214	114	106	106
query41	52	50	53	50
query42	120	115	106	106
query43	497	494	454	454
query44	1326	834	836	834
query45	189	183	171	171
query46	849	1015	642	642
query47	1826	1845	1780	1780
query48	393	422	313	313
query49	681	524	410	410
query50	679	697	404	404
query51	4235	4344	4223	4223
query52	113	107	113	107
query53	229	257	185	185
query54	598	574	515	515
query55	90	96	82	82
query56	311	285	296	285
query57	1187	1168	1113	1113
query58	269	252	265	252
query59	2641	2720	2688	2688
query60	346	312	310	310
query61	131	129	124	124
query62	727	723	708	708
query63	219	185	185	185
query64	1618	1157	706	706
query65	4414	4354	4322	4322
query66	718	405	292	292
query67	15936	15482	15512	15482
query68	6105	818	512	512
query69	536	308	262	262
query70	1128	1103	1051	1051
query71	443	308	309	308
query72	5748	4737	4750	4737
query73	1451	611	335	335
query74	8975	9111	8927	8927
query75	3211	3204	2724	2724
query76	3859	1188	742	742
query77	508	365	279	279
query78	9869	10102	9307	9307
query79	2171	847	576	576
query80	582	512	444	444
query81	492	255	221	221
query82	466	129	96	96
query83	244	249	243	243
query84	289	101	81	81
query85	771	354	318	318
query86	364	309	302	302
query87	4582	4445	4372	4372
query88	3594	2230	2266	2230
query89	414	305	279	279
query90	1648	215	218	215
query91	138	140	116	116
query92	71	61	57	57
query93	1716	941	578	578
query94	732	388	309	309
query95	362	289	284	284
query96	493	561	274	274
query97	3182	3238	3104	3104
query98	227	202	203	202
query99	1659	1387	1282	1282
Total cold run time: 292453 ms
Total hot run time: 192954 ms

@doris-robot
Copy link

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

query1	0.03	0.04	0.02
query2	0.13	0.10	0.12
query3	0.24	0.19	0.19
query4	1.59	0.18	0.19
query5	0.60	0.59	0.59
query6	1.20	0.73	0.74
query7	0.02	0.02	0.02
query8	0.04	0.04	0.03
query9	0.58	0.51	0.51
query10	0.56	0.56	0.57
query11	0.16	0.11	0.11
query12	0.15	0.11	0.11
query13	0.62	0.60	0.58
query14	2.69	2.82	2.69
query15	0.93	0.84	0.84
query16	0.38	0.38	0.41
query17	0.99	1.02	1.04
query18	0.21	0.19	0.20
query19	1.93	1.93	1.81
query20	0.01	0.01	0.01
query21	15.38	0.92	0.55
query22	0.77	1.18	0.77
query23	14.78	1.36	0.62
query24	7.26	0.75	1.39
query25	0.50	0.19	0.07
query26	0.57	0.17	0.14
query27	0.06	0.05	0.05
query28	9.22	0.86	0.44
query29	12.54	3.99	3.30
query30	0.25	0.09	0.07
query31	2.83	0.62	0.38
query32	3.23	0.54	0.48
query33	3.07	3.10	3.06
query34	15.74	5.04	4.48
query35	4.51	4.50	4.50
query36	0.66	0.51	0.49
query37	0.09	0.06	0.07
query38	0.06	0.04	0.04
query39	0.03	0.02	0.02
query40	0.18	0.14	0.13
query41	0.08	0.03	0.02
query42	0.04	0.02	0.02
query43	0.04	0.04	0.02
Total cold run time: 104.95 s
Total hot run time: 31.13 s

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

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 0.00% (0/2) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.46% (14104/26883)
Line Coverage 41.26% (121895/295452)
Region Coverage 40.02% (62082/155128)
Branch Coverage 34.67% (31082/89652)

@HappenLee HappenLee merged commit 74ca21a into apache:master Apr 11, 2025
30 of 32 checks passed
dataroaring pushed a commit that referenced this pull request Apr 22, 2025
…range #49993 (#49997)

Cherry-picked from #49993

Co-authored-by: zclllyybb <zhaochangle@selectdb.com>
@zclllyybb zclllyybb deleted the fix_array_range branch May 5, 2025 10:40
zclllyybb added a commit to zclllyybb/doris that referenced this pull request May 6, 2025
zclllyybb added a commit to zclllyybb/doris that referenced this pull request May 6, 2025
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.10-merged dev/3.0.6-merged p0_w reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants