Skip to content

Conversation

@zhangstar333
Copy link
Contributor

@zhangstar333 zhangstar333 commented Mar 14, 2024

add some error msg from repeat function, so the user could know the count is greater than default value.

mysql [test_query_qa]>set repeat_max_num = 5;
Query OK, 0 rows affected (0.01 sec)

mysql [test_query_qa]>select repeat(k6,10) from baseall where k1 = 1;
ERROR 1105 (HY000): errCode = 2, detailMessage = (10.16.10.8)[CANCELLED]The second parameter of repeat function exceeded maximum default value, default_value is 5, and now input is 10 . you could try change default value greater than value by: set repeat_max_num = 20.

Proposed changes

Issue Number: close #xxx

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@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

@zhangstar333
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17662	4294	4060	4060
q2	2021	150	139	139
q3	10606	1089	889	889
q4	7424	742	719	719
q5	7463	2653	2672	2653
q6	178	128	125	125
q7	1175	813	784	784
q8	9322	2004	1956	1956
q9	7144	6457	6405	6405
q10	8550	3513	3601	3513
q11	438	219	215	215
q12	799	289	300	289
q13	18123	2842	2880	2842
q14	273	246	252	246
q15	510	449	445	445
q16	489	388	392	388
q17	950	530	601	530
q18	7037	6525	6356	6356
q19	3416	1425	1467	1425
q20	554	288	279	279
q21	6160	3457	3473	3457
q22	349	287	286	286
Total cold run time: 110643 ms
Total hot run time: 38001 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4100	4088	4039	4039
q2	328	223	219	219
q3	2950	2864	2854	2854
q4	1857	1525	1526	1525
q5	5193	5244	5192	5192
q6	191	116	116	116
q7	2220	1860	1856	1856
q8	3129	3263	3263	3263
q9	8526	8538	8501	8501
q10	3640	3720	3656	3656
q11	554	433	432	432
q12	748	555	563	555
q13	16949	2883	2824	2824
q14	295	248	246	246
q15	476	441	438	438
q16	444	408	406	406
q17	1729	1484	1476	1476
q18	7460	7152	7160	7152
q19	1574	1545	1564	1545
q20	1894	1741	1718	1718
q21	4861	4760	4533	4533
q22	531	465	431	431
Total cold run time: 69649 ms
Total hot run time: 52977 ms

@zhangstar333
Copy link
Contributor Author

run buildall

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

const ColumnInt32::Container& repeats, ColumnString::Chars& res_data,
ColumnString::Offsets& res_offsets, ColumnUInt8::Container& null_map,
const int repeat_max_num) const {
Status vector_vector(const ColumnString::Chars& data, const ColumnString::Offsets& offsets,
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: method 'vector_vector' can be made static [readability-convert-member-functions-to-static]

Suggested change
Status vector_vector(const ColumnString::Chars& data, const ColumnString::Offsets& offsets,
static Status vector_vector(const ColumnString::Chars& data, const ColumnString::Offsets& offsets,

be/src/vec/functions/function_string.h:1501:

-                          const int repeat_max_num) const {
+                          const int repeat_max_num) {

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 35.25% (8700/24679)
Line Coverage: 27.08% (71178/262866)
Region Coverage: 26.32% (36914/140236)
Branch Coverage: 23.24% (18885/81250)
Coverage Report: http://coverage.selectdb-in.cc/coverage/07b96b971fce7500c65affbb137e28d6be782060_07b96b971fce7500c65affbb137e28d6be782060/report/index.html

@zhangstar333
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 35.25% (8702/24684)
Line Coverage: 27.08% (71188/262895)
Region Coverage: 26.33% (36931/140253)
Branch Coverage: 23.25% (18890/81258)
Coverage Report: http://coverage.selectdb-in.cc/coverage/af629919beea006ef4212188541b0da196cd5e2c_af629919beea006ef4212188541b0da196cd5e2c/report/index.html

@zhangstar333
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 35.25% (8702/24684)
Line Coverage: 27.08% (71181/262903)
Region Coverage: 26.33% (36926/140258)
Branch Coverage: 23.24% (18885/81260)
Coverage Report: http://coverage.selectdb-in.cc/coverage/d26be07c9c3d0a027f7dea621d1a0267c1c43e74_d26be07c9c3d0a027f7dea621d1a0267c1c43e74/report/index.html

@wm1581066 wm1581066 added dev/2.0.x usercase Important user case type label labels Mar 19, 2024
@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Mar 20, 2024
@github-actions
Copy link
Contributor

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

@zhangstar333 zhangstar333 merged commit f8aa1be into apache:master Mar 20, 2024
zhangstar333 added a commit to zhangstar333/incubator-doris that referenced this pull request Mar 21, 2024
…n repeat function (apache#32219)

add some error msg from repeat function, so the user could know the count is greater than default value.
yiguolei pushed a commit that referenced this pull request Mar 21, 2024
…n repeat function (#32219)

add some error msg from repeat function, so the user could know the count is greater than default value.
yiguolei pushed a commit that referenced this pull request Mar 21, 2024
…n repeat function (#32219)

add some error msg from repeat function, so the user could know the count is greater than default value.
xiaokang pushed a commit that referenced this pull request Mar 21, 2024
@xiaokang xiaokang mentioned this pull request Mar 22, 2024
mongo360 pushed a commit to mongo360/doris that referenced this pull request Aug 16, 2024
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.0.7-merged reviewed usercase Important user case type label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants