Skip to content

Conversation

@amorynan
Copy link
Contributor

@amorynan amorynan commented Mar 7, 2025

…rk byte order (#47126)

What problem does this PR solve?

Enhance ipv6 type to accept uint128 strings in network byte order.
according to function : ipv6_from_uint128_string_or_null(string) For load we can load the uint128 number like
338288524927261089657673092949903306134 using function
ipv6_from_uint128_string_or_null
or just using function in select sql

mysql> select
ipv6_from_uint128_string_or_null('340282366920938463463374607431768211455');

+-----------------------------------------------------------------------------+
|
ipv6_from_uint128_string_or_null('340282366920938463463374607431768211455')
|

+-----------------------------------------------------------------------------+
| ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff |

+-----------------------------------------------------------------------------+
1 row in set (0.06 sec)
```、

### What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

### Release note

None

### Check List (For Author)

- Test <!-- At least one of them must be included. -->
  - [ ] 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 <!-- Add your reason?  -->

- Behavior changed:
  - [ ] No.
  - [ ] Yes. <!-- Explain the behavior change -->

- Does this need documentation?
  - [ ] No.
  - [ ] Yes. <!-- Add document PR link here. eg: https://github.com/apache/doris-website/pull/1214 -->

### Check List (For Reviewer who merge this PR)

- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR should merge into -->

…k byte order (apache#47126)

### What problem does this PR solve?
 Enhance ipv6  type to accept uint128 strings in network byte order. 
according to function : ipv6_from_uint128_string_or_null(string) 
For load we can load the uint128 number like
```338288524927261089657673092949903306134``` using function
ipv6_from_uint128_string_or_null
or just using function in select sql
  ```
mysql> select
ipv6_from_uint128_string_or_null('340282366920938463463374607431768211455');

+-----------------------------------------------------------------------------+
|
ipv6_from_uint128_string_or_null('340282366920938463463374607431768211455')
|

+-----------------------------------------------------------------------------+
| ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff |

+-----------------------------------------------------------------------------+
1 row in set (0.06 sec)
```、
@amorynan amorynan requested a review from dataroaring as a code owner March 7, 2025 03:19
@amorynan
Copy link
Contributor Author

amorynan commented Mar 7, 2025

run buildall

@Thearas
Copy link
Contributor

Thearas commented Mar 7, 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?

@doris-robot
Copy link

TeamCity cloud ut coverage result:
Function Coverage: 82.26% (1062/1291)
Line Coverage: 65.80% (17612/26765)
Region Coverage: 65.30% (8673/13282)
Branch Coverage: 55.30% (4683/8468)
Coverage Report: http://coverage.selectdb-in.cc/coverage/224c8755ed81faa95d3a2437089fcefaf37f6418_224c8755ed81faa95d3a2437089fcefaf37f6418_cloud/report/index.html

@amorynan
Copy link
Contributor Author

amorynan commented Mar 7, 2025

run buildall

@doris-robot
Copy link

TeamCity cloud ut coverage result:
Function Coverage: 82.26% (1062/1291)
Line Coverage: 65.78% (17606/26765)
Region Coverage: 65.30% (8673/13282)
Branch Coverage: 55.26% (4679/8468)
Coverage Report: http://coverage.selectdb-in.cc/coverage/fce31c44e2f2c41993023725386cc4e356783828_fce31c44e2f2c41993023725386cc4e356783828_cloud/report/index.html

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17601	6810	6668	6668
q2	2051	169	159	159
q3	10598	1087	1163	1087
q4	10542	747	699	699
q5	7755	2887	2826	2826
q6	223	133	131	131
q7	974	612	598	598
q8	9348	1984	2013	1984
q9	6587	6363	6443	6363
q10	7009	2263	2280	2263
q11	467	271	254	254
q12	395	214	211	211
q13	17766	2989	2971	2971
q14	244	205	209	205
q15	514	468	455	455
q16	650	602	584	584
q17	985	561	572	561
q18	7236	6758	6689	6689
q19	1396	1082	1050	1050
q20	467	207	198	198
q21	3978	3351	3478	3351
q22	1100	995	979	979
Total cold run time: 107886 ms
Total hot run time: 40286 ms

----- Round 2, with runtime_filter_mode=off -----
q1	6635	6607	6560	6560
q2	332	233	229	229
q3	2932	2775	2946	2775
q4	2027	1750	1705	1705
q5	5821	5719	5790	5719
q6	213	132	128	128
q7	2198	1839	1831	1831
q8	3369	3561	3545	3545
q9	9001	8840	8917	8840
q10	3579	3544	3512	3512
q11	594	502	530	502
q12	849	603	603	603
q13	10440	3169	3187	3169
q14	293	278	264	264
q15	507	465	457	457
q16	683	669	644	644
q17	1856	1645	1615	1615
q18	8309	7956	7615	7615
q19	1694	1701	1642	1642
q20	2054	1792	1809	1792
q21	5423	5392	5362	5362
q22	1104	1056	1002	1002
Total cold run time: 69913 ms
Total hot run time: 59511 ms

@doris-robot
Copy link

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

query1	1271	904	895	895
query2	6261	2015	1928	1928
query3	10866	4351	4296	4296
query4	61484	28896	23385	23385
query5	5245	477	462	462
query6	423	180	186	180
query7	5518	308	318	308
query8	312	223	227	223
query9	8424	2618	2589	2589
query10	471	278	269	269
query11	17917	15249	15831	15249
query12	164	106	110	106
query13	1511	474	433	433
query14	10798	7009	7275	7009
query15	201	191	181	181
query16	7084	500	513	500
query17	1144	591	602	591
query18	1864	313	316	313
query19	217	165	164	164
query20	126	111	114	111
query21	206	105	100	100
query22	4865	4408	4849	4408
query23	34764	33984	34189	33984
query24	6206	2833	2879	2833
query25	530	404	392	392
query26	669	179	172	172
query27	1806	352	362	352
query28	4130	2484	2469	2469
query29	693	431	425	425
query30	246	171	164	164
query31	1024	843	844	843
query32	67	58	53	53
query33	464	282	293	282
query34	937	513	520	513
query35	847	727	718	718
query36	1119	985	957	957
query37	119	66	76	66
query38	4076	4061	4167	4061
query39	1572	1471	1471	1471
query40	204	100	95	95
query41	48	47	49	47
query42	114	103	105	103
query43	526	491	482	482
query44	1186	828	814	814
query45	186	168	167	167
query46	1150	751	739	739
query47	2024	1908	1908	1908
query48	476	384	387	384
query49	738	406	384	384
query50	839	430	427	427
query51	7362	7189	7283	7189
query52	106	90	92	90
query53	261	187	188	187
query54	584	478	464	464
query55	88	85	75	75
query56	267	267	264	264
query57	1301	1158	1173	1158
query58	242	226	210	210
query59	3324	2893	2781	2781
query60	272	255	256	255
query61	119	112	106	106
query62	748	686	674	674
query63	219	191	183	183
query64	1386	768	751	751
query65	3246	3186	3217	3186
query66	708	310	323	310
query67	16005	15639	15611	15611
query68	4224	589	600	589
query69	420	292	282	282
query70	1166	1110	1091	1091
query71	361	266	261	261
query72	6565	4171	3958	3958
query73	756	349	361	349
query74	10075	8986	9392	8986
query75	3387	2692	2647	2647
query76	1966	1141	1042	1042
query77	494	273	275	273
query78	10517	9609	9553	9553
query79	2572	615	622	615
query80	1381	409	428	409
query81	545	243	235	235
query82	1244	87	87	87
query83	250	143	145	143
query84	283	81	76	76
query85	1038	308	289	289
query86	397	297	291	291
query87	4470	4304	4198	4198
query88	4126	2385	2366	2366
query89	421	288	288	288
query90	1986	183	184	183
query91	184	147	148	147
query92	65	51	50	50
query93	2797	555	560	555
query94	813	290	301	290
query95	357	264	262	262
query96	626	288	281	281
query97	3310	3213	3189	3189
query98	215	202	202	202
query99	1590	1295	1286	1286
Total cold run time: 317971 ms
Total hot run time: 196972 ms

@doris-robot
Copy link

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

query1	0.03	0.04	0.03
query2	0.07	0.02	0.03
query3	0.24	0.06	0.06
query4	1.62	0.10	0.10
query5	0.54	0.52	0.52
query6	1.15	0.73	0.74
query7	0.02	0.02	0.02
query8	0.04	0.03	0.04
query9	0.55	0.50	0.50
query10	0.55	0.55	0.54
query11	0.14	0.10	0.10
query12	0.14	0.11	0.12
query13	0.61	0.60	0.59
query14	2.72	2.74	2.84
query15	0.90	0.82	0.84
query16	0.40	0.37	0.39
query17	0.97	0.97	1.04
query18	0.24	0.23	0.22
query19	1.83	1.78	1.98
query20	0.01	0.01	0.01
query21	15.37	0.60	0.60
query22	2.34	2.25	1.72
query23	16.92	0.96	0.88
query24	2.99	1.49	0.98
query25	0.19	0.08	0.09
query26	0.43	0.14	0.14
query27	0.04	0.04	0.05
query28	10.19	0.52	0.47
query29	12.59	3.28	3.30
query30	0.25	0.06	0.07
query31	2.87	0.39	0.37
query32	3.24	0.46	0.47
query33	2.99	3.02	3.00
query34	16.92	4.46	4.50
query35	4.50	4.51	4.52
query36	0.69	0.50	0.48
query37	0.09	0.06	0.06
query38	0.05	0.03	0.03
query39	0.03	0.02	0.03
query40	0.17	0.12	0.12
query41	0.08	0.02	0.02
query42	0.03	0.02	0.02
query43	0.04	0.03	0.03
Total cold run time: 105.78 s
Total hot run time: 32.09 s

Copy link
Contributor

@dataroaring dataroaring left a comment

Choose a reason for hiding this comment

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

LGTM

@dataroaring dataroaring merged commit 6ddff3d into apache:branch-3.0 Mar 10, 2025
20 of 21 checks passed
@gavinchou gavinchou mentioned this pull request Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants