Skip to content

Conversation

@linrrzqqq
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

Release note

An alias for LENGTH(see OCTET_LENGTH in MySQL: OCTET_LENGTH() is a synonym for LENGTH().)

mysql> SELECT OCTET_LENGTH('abc');
+---------------------+
| OCTET_LENGTH('abc') |
+---------------------+
|                   3 |
+---------------------+

mysql> SELECT OCTET_LENGTH('你好');
+------------------------+
| OCTET_LENGTH('你好')   |
+------------------------+
|                      6 |
+------------------------+

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. There is already an explanation of the alias OCTET_LENGTH in LENGTH's document.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@hello-stephen
Copy link
Contributor

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 zclllyybb self-assigned this Oct 27, 2025
@linrrzqqq
Copy link
Contributor Author

run buildall

Copy link
Contributor

@zclllyybb zclllyybb 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 Oct 27, 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-DS: Total hot run time: 190078 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 f25f2390c72bdb9c68503dd2c394b691dfe3132e, data reload: false

query1	1082	432	400	400
query2	6573	1709	1693	1693
query3	6757	228	238	228
query4	26165	23871	23600	23600
query5	4965	669	512	512
query6	348	235	224	224
query7	4651	493	309	309
query8	309	269	257	257
query9	8719	2584	2603	2584
query10	514	335	286	286
query11	15212	15233	14824	14824
query12	183	121	113	113
query13	1687	552	437	437
query14	10855	9275	9273	9273
query15	211	192	174	174
query16	7688	657	504	504
query17	1178	790	664	664
query18	2055	448	389	389
query19	232	230	211	211
query20	158	138	127	127
query21	239	145	123	123
query22	4533	4759	4376	4376
query23	35175	33824	33735	33735
query24	9094	2535	2499	2499
query25	622	560	475	475
query26	1276	284	162	162
query27	2917	511	377	377
query28	4531	2235	2256	2235
query29	924	631	498	498
query30	322	240	203	203
query31	930	882	771	771
query32	93	75	78	75
query33	592	397	361	361
query34	835	931	565	565
query35	833	852	814	814
query36	979	1033	926	926
query37	131	121	96	96
query38	3679	3745	3577	3577
query39	1538	1621	1450	1450
query40	225	144	126	126
query41	69	80	61	61
query42	122	113	118	113
query43	491	515	468	468
query44	1269	767	750	750
query45	196	193	179	179
query46	885	1016	652	652
query47	1752	1789	1720	1720
query48	409	441	332	332
query49	811	548	431	431
query50	681	687	426	426
query51	3826	3946	3899	3899
query52	111	117	110	110
query53	248	281	197	197
query54	649	611	541	541
query55	87	85	88	85
query56	325	329	311	311
query57	1176	1178	1121	1121
query58	299	288	266	266
query59	2591	2627	2553	2553
query60	357	354	336	336
query61	170	162	164	162
query62	783	746	681	681
query63	236	197	204	197
query64	4465	1172	840	840
query65	4063	3958	3939	3939
query66	1125	424	330	330
query67	15455	15238	14826	14826
query68	8419	887	604	604
query69	502	325	290	290
query70	1353	1220	1230	1220
query71	535	346	317	317
query72	6081	4978	4865	4865
query73	686	580	374	374
query74	8899	9113	8694	8694
query75	4027	3346	2825	2825
query76	3803	1143	716	716
query77	809	413	313	313
query78	9582	9617	8892	8892
query79	2948	897	591	591
query80	741	574	513	513
query81	500	258	245	245
query82	450	162	140	140
query83	300	275	244	244
query84	299	109	98	98
query85	899	476	450	450
query86	334	320	299	299
query87	3801	3690	3590	3590
query88	3490	2279	2284	2279
query89	420	329	297	297
query90	2033	229	224	224
query91	185	158	135	135
query92	86	73	67	67
query93	2565	1006	653	653
query94	695	453	350	350
query95	415	324	309	309
query96	503	585	290	290
query97	2960	2975	2891	2891
query98	244	217	216	216
query99	1420	1428	1308	1308
Total cold run time: 281645 ms
Total hot run time: 190078 ms

@doris-robot
Copy link

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

query1	0.05	0.05	0.05
query2	0.09	0.05	0.06
query3	0.26	0.08	0.08
query4	1.61	0.12	0.12
query5	0.27	0.26	0.25
query6	1.18	0.66	0.63
query7	0.04	0.03	0.03
query8	0.06	0.04	0.04
query9	0.63	0.52	0.52
query10	0.59	0.57	0.56
query11	0.18	0.12	0.12
query12	0.18	0.12	0.12
query13	0.62	0.60	0.61
query14	1.01	1.02	1.01
query15	0.84	0.85	0.87
query16	0.40	0.40	0.39
query17	1.01	1.04	1.01
query18	0.22	0.21	0.20
query19	1.92	1.79	1.79
query20	0.02	0.01	0.01
query21	15.45	0.19	0.13
query22	5.14	0.07	0.05
query23	15.65	0.26	0.10
query24	2.44	1.55	0.42
query25	0.08	0.06	0.07
query26	0.14	0.15	0.13
query27	0.07	0.05	0.05
query28	5.08	1.14	0.94
query29	12.58	4.02	3.23
query30	0.30	0.13	0.12
query31	2.83	0.58	0.39
query32	3.23	0.56	0.48
query33	3.01	3.09	3.04
query34	15.89	5.14	4.54
query35	4.57	4.60	4.51
query36	0.70	0.52	0.50
query37	0.10	0.07	0.07
query38	0.07	0.04	0.04
query39	0.04	0.03	0.03
query40	0.18	0.15	0.15
query41	0.11	0.04	0.03
query42	0.04	0.03	0.03
query43	0.04	0.04	0.03
Total cold run time: 98.92 s
Total hot run time: 27.5 s

@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 100.00% (1/1) 🎉
Increment coverage report
Complete coverage report

@linrrzqqq
Copy link
Contributor Author

run beut

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 100.00% (1/1) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.76% (18056/34221)
Line Coverage 37.99% (163705/430866)
Region Coverage 32.38% (124813/385456)
Branch Coverage 33.73% (54550/161713)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (1/1) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.33% (23910/33521)
Line Coverage 57.80% (248857/430568)
Region Coverage 52.97% (206621/390077)
Branch Coverage 54.62% (88713/162424)

@zclllyybb zclllyybb merged commit 2490469 into apache:master Oct 29, 2025
28 of 30 checks passed
@linrrzqqq linrrzqqq deleted the octet-length branch October 29, 2025 03:44
github-actions bot pushed a commit that referenced this pull request Oct 29, 2025
…57369)

An alias for `LENGTH`(see [OCTET_LENGTH in
MySQL](https://dev.mysql.com/doc/refman/8.4/en/string-functions.html#function_octet-length):
[OCTET_LENGTH()](https://dev.mysql.com/doc/refman/8.4/en/string-functions.html#function_octet-length)
is a synonym for
[LENGTH()](https://dev.mysql.com/doc/refman/8.4/en/string-functions.html#function_length).)

```text
mysql> SELECT OCTET_LENGTH('abc');
+---------------------+
| OCTET_LENGTH('abc') |
+---------------------+
|                   3 |
+---------------------+

mysql> SELECT OCTET_LENGTH('你好');
+------------------------+
| OCTET_LENGTH('你好')   |
+------------------------+
|                      6 |
+------------------------+
```
linrrzqqq added a commit to linrrzqqq/doris that referenced this pull request Oct 31, 2025
…pache#57369)

An alias for `LENGTH`(see [OCTET_LENGTH in
MySQL](https://dev.mysql.com/doc/refman/8.4/en/string-functions.html#function_octet-length):
[OCTET_LENGTH()](https://dev.mysql.com/doc/refman/8.4/en/string-functions.html#function_octet-length)
is a synonym for
[LENGTH()](https://dev.mysql.com/doc/refman/8.4/en/string-functions.html#function_length).)

```text
mysql> SELECT OCTET_LENGTH('abc');
+---------------------+
| OCTET_LENGTH('abc') |
+---------------------+
|                   3 |
+---------------------+

mysql> SELECT OCTET_LENGTH('你好');
+------------------------+
| OCTET_LENGTH('你好')   |
+------------------------+
|                      6 |
+------------------------+
```
dwdwqfwe pushed a commit to dwdwqfwe/doris that referenced this pull request Oct 31, 2025
…pache#57369)

An alias for `LENGTH`(see [OCTET_LENGTH in
MySQL](https://dev.mysql.com/doc/refman/8.4/en/string-functions.html#function_octet-length):
[OCTET_LENGTH()](https://dev.mysql.com/doc/refman/8.4/en/string-functions.html#function_octet-length)
is a synonym for
[LENGTH()](https://dev.mysql.com/doc/refman/8.4/en/string-functions.html#function_length).)

```text
mysql> SELECT OCTET_LENGTH('abc');
+---------------------+
| OCTET_LENGTH('abc') |
+---------------------+
|                   3 |
+---------------------+

mysql> SELECT OCTET_LENGTH('你好');
+------------------------+
| OCTET_LENGTH('你好')   |
+------------------------+
|                      6 |
+------------------------+
```
yiguolei pushed a commit that referenced this pull request Nov 3, 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/4.0.1-merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants