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

[Enhancement] Support some compress functions #47307

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

lzyy2024
Copy link

@lzyy2024 lzyy2024 commented Jan 22, 2025

What problem does this PR solve?

Added the compress and uncompressed functions similar to mysql

Issue Number: close #45530

Related PR: #xxx

Problem Summary:

Release note

None

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?

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?

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.

and remember to format your file


Status execute_impl(FunctionContext* context, Block& block, const ColumnNumbers& arguments,
uint32_t result, size_t input_rows_count) const override {
// LOG(INFO) << "Executing FunctionCompress with " << input_rows_count
Copy link
Contributor

Choose a reason for hiding this comment

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

remove these commented lines

col_data[idx] = '0', col_data[idx + 1] = 'x';
for (int i = 0; i < 4; i++) {
unsigned char byte = (value >> (i * 8)) & 0xFF;
col_data[idx + 2 + i * 2] = "0123456789ABCDEF"[byte >> 4]; // 高4位
Copy link
Contributor

Choose a reason for hiding this comment

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

dont use Chinese

Copy link
Contributor

Choose a reason for hiding this comment

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

and make magic values


auto st = compression_codec->compress(data, &compressed_str);

if (!st.ok()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

add a comment about when will it fails

Copy link
Contributor

Choose a reason for hiding this comment

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

we dont need modify this file anymore

std::string func_name = "compress";
InputTypeSet input_types = {TypeIndex::String};

// 压缩多个不同的字符串
Copy link
Contributor

Choose a reason for hiding this comment

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

dont use Chinese comment

std::string uncompressed;
Slice data;
Slice uncompressed_slice;
for (int row = 0; row < input_rows_count; row++) {
Copy link
Contributor

Choose a reason for hiding this comment

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

use size_t, not int

illegal = 1;
} else {
if (data[0] != '0' || data[1] != 'x') {
LOG(INFO) << "illegal: "
Copy link
Contributor

Choose a reason for hiding this comment

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

dont log info here

if (x >= 'A' && x <= 'F') return true;
return false;
};
auto trans = [](char x) {
Copy link
Contributor

Choose a reason for hiding this comment

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

just use from_chars and to_chars to replace your user implemented lambdas

// Print the compressed string (after compression)
// LOG(INFO) << "Compressed string at row " << row << ": "
// << std::string(reinterpret_cast<const char*>(col_data.data()));
col_offset[row] = col_offset[row - 1] + 10 + compressed_str.size() * 2;
Copy link
Contributor

Choose a reason for hiding this comment

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

What's this value for?

Copy link
Author

Choose a reason for hiding this comment

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

The first ten digits of the compress value are "0x" and eight digits long, followed by each digit split into two hexadecimal values

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.

Fix the correcteness

be/src/vec/functions/function_compress.cpp Outdated Show resolved Hide resolved
Slice data;
for (size_t row = 0; row < input_rows_count; row++) {
null_map[row] = false;
const auto& str = arg_column.get_data_at(row);
Copy link
Contributor

Choose a reason for hiding this comment

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

no need to use virtual function here

\N \N

-- !const_not_nullable --
0x05000000789C73C92FCA2C060005B00202 0x446F726973
Copy link
Contributor

Choose a reason for hiding this comment

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

carefully review your result!!!

Slice data;
Slice uncompressed_slice;
for (size_t row = 0; row < input_rows_count; row++) {
auto check = [](char x) {
Copy link
Contributor

Choose a reason for hiding this comment

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

try to use std function firstly

const auto& str = arg_column.get_data_at(row);
data = Slice(str.data, str.size);

int illegal = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

why not bool?

unsigned char* src = compressed_str.data();
{
for (size_t i = 0; i < compressed_str.size(); i++) {
col_data[idx] =
Copy link
Contributor

Choose a reason for hiding this comment

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

so tricky here. try to improve code like it

Slice data;
Slice uncompressed_slice;
for (size_t row = 0; row < input_rows_count; row++) {
std::function<bool(char)> check = [](char x) {
Copy link
Contributor

Choose a reason for hiding this comment

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

why not use isxdigit?

@@ -854,8 +854,13 @@ class ZlibBlockCompression : public BlockCompressionCodec {
Slice s(*output);

auto zres = ::compress((Bytef*)s.data, &s.size, (Bytef*)input.data, input.size);
if (zres != Z_OK) {
return Status::InvalidArgument("Fail to do ZLib compress, error={}", zError(zres));
if (zres == Z_MEM_ERROR) {
Copy link
Contributor

Choose a reason for hiding this comment

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

also change other same calls

Copy link
Contributor

Choose a reason for hiding this comment

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

split them to another PR may be better

implements UnaryExpression, ExplicitlyCastableSignature, PropagateNullable {

public static final List<FunctionSignature> SIGNATURES = ImmutableList.of(
FunctionSignature.ret(StringType.INSTANCE).args(StringType.INSTANCE));

This comment was marked as resolved.

implements UnaryExpression, ExplicitlyCastableSignature, AlwaysNullable {

public static final List<FunctionSignature> SIGNATURES = ImmutableList.of(
FunctionSignature.ret(StringType.INSTANCE).args(StringType.INSTANCE));

This comment was marked as resolved.


unsigned int length = 0;
for (size_t i = 2; i <= 9; i += 2) {
unsigned char byte = (hex_ctoi.at(data[i]) << 4) + hex_ctoi.at(data[i + 1]);
Copy link
Contributor

Choose a reason for hiding this comment

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

remove hex_ctoi and just use from_chars

unsigned int length = 0;
for (size_t i = 2; i <= 9; i += 2) {
unsigned char byte = (hex_ctoi.at(data[i]) << 4) + hex_ctoi.at(data[i + 1]);
length += (byte << (8 * (i / 2 - 1))); //Little Endian : 0x01000000 -> 1

This comment was marked as resolved.

std::string uncompressed;
Slice data;
Slice uncompressed_slice;
for (size_t row = 0; row < input_rows_count; row++) {

This comment was marked as resolved.

}
idx += 10;

col_data.resize(col_data.size() + 2 * compressed_str.size());

This comment was marked as resolved.

//Converts a hexadecimal readable string to a compressed byte stream
std::string s(((int)data.size - 10) / 2, ' '); // byte stream data.size >= 10
for (size_t i = 10, j = 0; i < data.size; i += 2, j++) {
s[j] = (hex_ctoi.at(data[i]) << 4) + hex_ctoi.at(data[i + 1]);
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

@lzyy2024
Copy link
Author

run buildall

1 similar comment
@lzyy2024
Copy link
Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17575	5496	5376	5376
q2	2052	334	182	182
q3	10468	1303	735	735
q4	10229	969	517	517
q5	7663	2384	2167	2167
q6	191	165	136	136
q7	925	764	608	608
q8	9235	1394	1149	1149
q9	5219	4920	4833	4833
q10	6811	2314	1890	1890
q11	476	280	258	258
q12	341	358	214	214
q13	17760	3661	3052	3052
q14	228	244	206	206
q15	512	471	459	459
q16	646	619	598	598
q17	558	860	317	317
q18	7189	6475	6417	6417
q19	1807	966	537	537
q20	304	319	185	185
q21	2804	2173	1957	1957
q22	356	330	307	307
Total cold run time: 103349 ms
Total hot run time: 32100 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5511	5460	5437	5437
q2	248	327	233	233
q3	2242	2638	2307	2307
q4	1439	1838	1365	1365
q5	4323	4725	4681	4681
q6	167	156	124	124
q7	2080	1986	1810	1810
q8	2656	2811	2662	2662
q9	7293	7156	7173	7156
q10	2932	3258	2769	2769
q11	572	516	494	494
q12	717	749	595	595
q13	3494	3934	3293	3293
q14	267	289	267	267
q15	505	474	464	464
q16	658	693	641	641
q17	1207	1731	1256	1256
q18	7613	7379	7400	7379
q19	768	1157	1031	1031
q20	2009	2029	1866	1866
q21	5644	5218	4986	4986
q22	597	652	555	555
Total cold run time: 52942 ms
Total hot run time: 51371 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 184954 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 89c394274803c1107b4fbc5b37d8608ba3af107d, data reload: false

query1	962	376	368	368
query2	6516	2097	2071	2071
query3	6802	211	218	211
query4	33731	23198	22991	22991
query5	4407	575	438	438
query6	270	185	173	173
query7	4596	496	311	311
query8	282	244	214	214
query9	9565	2688	2704	2688
query10	472	319	261	261
query11	18192	15054	15022	15022
query12	156	112	103	103
query13	1649	517	409	409
query14	9175	7286	6882	6882
query15	251	188	182	182
query16	8042	641	482	482
query17	1621	744	564	564
query18	2108	401	306	306
query19	229	188	155	155
query20	115	109	110	109
query21	212	123	100	100
query22	4110	4433	4267	4267
query23	33827	33022	32880	32880
query24	6450	2291	2288	2288
query25	529	488	377	377
query26	1198	265	156	156
query27	1997	463	333	333
query28	5369	2458	2448	2448
query29	719	545	418	418
query30	234	181	152	152
query31	934	849	774	774
query32	90	59	67	59
query33	496	354	330	330
query34	734	845	492	492
query35	800	817	741	741
query36	978	1063	968	968
query37	120	104	75	75
query38	4136	4246	4012	4012
query39	1461	1381	1398	1381
query40	221	112	100	100
query41	53	49	55	49
query42	118	97	101	97
query43	511	505	477	477
query44	1332	841	806	806
query45	175	173	163	163
query46	853	1032	637	637
query47	1802	1810	1729	1729
query48	380	404	305	305
query49	783	495	390	390
query50	621	641	390	390
query51	4237	4228	4089	4089
query52	111	103	90	90
query53	223	255	184	184
query54	472	480	413	413
query55	81	82	79	79
query56	258	257	245	245
query57	1158	1141	1066	1066
query58	243	237	245	237
query59	3158	2999	2979	2979
query60	275	266	260	260
query61	119	119	115	115
query62	777	729	637	637
query63	240	199	182	182
query64	4436	995	654	654
query65	3214	3196	3159	3159
query66	1064	407	313	313
query67	15922	15579	15428	15428
query68	4284	817	546	546
query69	466	290	261	261
query70	1212	1103	1118	1103
query71	374	281	250	250
query72	5796	3862	3799	3799
query73	648	747	360	360
query74	10488	8941	8914	8914
query75	3156	3155	2682	2682
query76	3139	1143	755	755
query77	492	339	271	271
query78	9923	10078	9404	9404
query79	2446	797	608	608
query80	788	528	465	465
query81	538	316	244	244
query82	348	151	125	125
query83	170	173	154	154
query84	237	88	77	77
query85	754	360	304	304
query86	440	321	306	306
query87	4424	4481	4498	4481
query88	4173	2165	2210	2165
query89	398	321	302	302
query90	1919	190	188	188
query91	137	139	108	108
query92	70	60	55	55
query93	2644	879	535	535
query94	746	408	294	294
query95	338	262	262	262
query96	484	603	277	277
query97	2775	2886	2750	2750
query98	237	198	191	191
query99	1286	1372	1254	1254
Total cold run time: 281702 ms
Total hot run time: 184954 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.04
query2	0.08	0.04	0.03
query3	0.23	0.07	0.07
query4	1.61	0.11	0.10
query5	0.42	0.42	0.38
query6	1.15	0.66	0.66
query7	0.02	0.02	0.02
query8	0.04	0.04	0.03
query9	0.58	0.49	0.53
query10	0.55	0.56	0.56
query11	0.14	0.10	0.10
query12	0.13	0.11	0.11
query13	0.60	0.60	0.60
query14	2.85	2.81	2.88
query15	0.89	0.82	0.81
query16	0.39	0.38	0.39
query17	1.05	1.06	1.05
query18	0.22	0.21	0.20
query19	1.90	1.83	2.02
query20	0.02	0.01	0.01
query21	15.36	1.02	0.60
query22	0.75	0.75	0.65
query23	15.37	1.36	0.60
query24	2.91	1.92	0.87
query25	0.16	0.19	0.14
query26	0.23	0.14	0.13
query27	0.06	0.05	0.06
query28	14.17	1.02	0.43
query29	12.60	3.98	3.27
query30	0.26	0.09	0.06
query31	2.82	0.61	0.37
query32	3.24	0.55	0.46
query33	2.99	3.02	3.09
query34	16.54	5.17	4.51
query35	4.52	4.44	4.45
query36	0.65	0.49	0.52
query37	0.10	0.06	0.06
query38	0.05	0.04	0.03
query39	0.03	0.03	0.02
query40	0.17	0.13	0.13
query41	0.08	0.03	0.03
query42	0.04	0.02	0.02
query43	0.04	0.03	0.04
Total cold run time: 106.04 s
Total hot run time: 30.68 s

@lzyy2024
Copy link
Author

run buildall

1 similar comment
@lzyy2024
Copy link
Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17843	6172	5422	5422
q2	2040	300	178	178
q3	10412	1224	728	728
q4	10882	965	536	536
q5	8400	2410	2141	2141
q6	192	176	134	134
q7	906	820	595	595
q8	9228	1339	1150	1150
q9	5785	5158	5032	5032
q10	6988	2361	1956	1956
q11	483	290	268	268
q12	344	370	227	227
q13	18216	3998	3387	3387
q14	272	251	243	243
q15	528	482	477	477
q16	649	626	589	589
q17	569	872	337	337
q18	8233	6545	6461	6461
q19	2878	984	543	543
q20	303	310	192	192
q21	2714	2218	2045	2045
q22	362	332	330	330
Total cold run time: 108227 ms
Total hot run time: 32971 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5710	5517	5469	5469
q2	231	318	233	233
q3	2257	2622	2340	2340
q4	1412	1807	1395	1395
q5	4328	4781	4883	4781
q6	165	162	129	129
q7	2091	1922	1827	1827
q8	2687	2805	2659	2659
q9	7273	7260	7262	7260
q10	3020	3212	2759	2759
q11	586	520	498	498
q12	675	790	601	601
q13	3504	3971	3293	3293
q14	284	306	281	281
q15	519	485	467	467
q16	661	677	630	630
q17	1209	1777	1246	1246
q18	7790	7450	7409	7409
q19	765	1154	1076	1076
q20	2000	2050	1919	1919
q21	5653	5124	5012	5012
q22	631	607	571	571
Total cold run time: 53451 ms
Total hot run time: 51855 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 191631 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 75e8e78802a7295e88f4b0d103064acfcd5e6e4d, data reload: false

query1	1306	964	932	932
query2	6184	2038	2033	2033
query3	11103	4702	4399	4399
query4	61069	29129	23025	23025
query5	5535	611	458	458
query6	432	204	183	183
query7	5529	511	307	307
query8	331	247	233	233
query9	8032	2708	2701	2701
query10	469	305	259	259
query11	17709	15224	15513	15224
query12	168	122	114	114
query13	1465	546	409	409
query14	11082	7040	6994	6994
query15	210	206	197	197
query16	7241	636	484	484
query17	1201	730	591	591
query18	1910	422	335	335
query19	205	194	165	165
query20	123	114	118	114
query21	225	131	106	106
query22	4449	4470	4543	4470
query23	34433	33834	33260	33260
query24	5996	2367	2297	2297
query25	460	467	404	404
query26	649	279	157	157
query27	1809	459	333	333
query28	4055	2489	2456	2456
query29	525	545	431	431
query30	214	192	158	158
query31	929	915	837	837
query32	64	60	57	57
query33	438	366	306	306
query34	742	872	503	503
query35	816	867	758	758
query36	1033	1051	950	950
query37	115	107	78	78
query38	4310	4362	4265	4265
query39	1508	1448	1442	1442
query40	217	113	103	103
query41	51	51	50	50
query42	124	109	102	102
query43	507	516	494	494
query44	1338	846	857	846
query45	183	173	171	171
query46	873	1054	654	654
query47	1891	1979	1874	1874
query48	396	407	342	342
query49	718	493	409	409
query50	649	707	400	400
query51	4265	4313	4172	4172
query52	111	105	99	99
query53	228	254	200	200
query54	485	513	426	426
query55	81	82	82	82
query56	260	266	244	244
query57	1237	1210	1154	1154
query58	233	231	236	231
query59	3223	3364	3053	3053
query60	279	271	266	266
query61	139	112	117	112
query62	736	720	663	663
query63	225	184	185	184
query64	1286	1034	656	656
query65	3273	3124	3142	3124
query66	689	435	332	332
query67	16065	15658	15451	15451
query68	5022	809	539	539
query69	475	295	264	264
query70	1178	1161	1126	1126
query71	416	286	253	253
query72	6050	3899	3797	3797
query73	803	764	353	353
query74	9860	8792	8698	8698
query75	3220	3156	2703	2703
query76	3796	1195	748	748
query77	536	353	275	275
query78	10087	10047	9345	9345
query79	2453	805	603	603
query80	1199	524	485	485
query81	540	279	227	227
query82	355	160	126	126
query83	242	165	159	159
query84	291	92	70	70
query85	746	342	301	301
query86	377	321	301	301
query87	4546	4476	4482	4476
query88	3486	2174	2136	2136
query89	393	332	292	292
query90	1576	182	188	182
query91	135	133	110	110
query92	61	56	55	55
query93	2163	848	534	534
query94	737	402	294	294
query95	321	260	265	260
query96	489	618	279	279
query97	2815	2894	2811	2811
query98	224	192	193	192
query99	1302	1402	1318	1318
Total cold run time: 309730 ms
Total hot run time: 191631 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.03
query2	0.07	0.03	0.03
query3	0.25	0.06	0.07
query4	1.61	0.11	0.10
query5	0.42	0.42	0.40
query6	1.17	0.65	0.66
query7	0.02	0.02	0.02
query8	0.04	0.04	0.03
query9	0.58	0.49	0.50
query10	0.56	0.56	0.54
query11	0.15	0.10	0.10
query12	0.14	0.11	0.11
query13	0.60	0.60	0.61
query14	2.85	2.74	2.72
query15	0.90	0.83	0.82
query16	0.39	0.38	0.36
query17	1.05	1.01	1.00
query18	0.24	0.20	0.20
query19	1.86	1.88	2.01
query20	0.01	0.01	0.01
query21	15.36	0.99	0.58
query22	0.77	0.82	0.75
query23	15.21	1.49	0.53
query24	3.25	0.92	0.84
query25	0.17	0.26	0.12
query26	0.18	0.15	0.14
query27	0.05	0.04	0.04
query28	13.60	1.09	0.44
query29	12.60	3.98	3.33
query30	0.26	0.08	0.06
query31	2.84	0.62	0.39
query32	3.23	0.54	0.46
query33	2.97	3.06	2.99
query34	16.60	5.17	4.52
query35	4.61	4.63	4.54
query36	0.65	0.48	0.50
query37	0.09	0.06	0.05
query38	0.05	0.04	0.04
query39	0.03	0.02	0.03
query40	0.16	0.13	0.14
query41	0.08	0.03	0.03
query42	0.04	0.03	0.02
query43	0.04	0.03	0.02
Total cold run time: 105.79 s
Total hot run time: 30.67 s

@lzyy2024
Copy link
Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17587	5520	5400	5400
q2	2046	311	168	168
q3	10541	1284	722	722
q4	10240	962	540	540
q5	8273	2482	2182	2182
q6	195	165	135	135
q7	904	774	641	641
q8	9245	1366	1178	1178
q9	5286	4870	4929	4870
q10	6871	2353	1879	1879
q11	456	280	259	259
q12	352	358	216	216
q13	17765	3713	3109	3109
q14	232	240	206	206
q15	536	483	459	459
q16	634	616	600	600
q17	567	876	320	320
q18	7111	6386	6397	6386
q19	1677	953	548	548
q20	312	323	190	190
q21	2862	2253	2005	2005
q22	364	331	315	315
Total cold run time: 104056 ms
Total hot run time: 32328 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5710	5507	5510	5507
q2	237	324	254	254
q3	2251	2600	2267	2267
q4	1411	1801	1361	1361
q5	4357	4730	4650	4650
q6	173	163	129	129
q7	2075	1965	1892	1892
q8	2583	2829	2689	2689
q9	7428	7143	7226	7143
q10	3027	3345	2815	2815
q11	592	521	496	496
q12	672	778	609	609
q13	3498	3913	3403	3403
q14	290	305	283	283
q15	524	479	464	464
q16	631	694	636	636
q17	1240	1724	1262	1262
q18	7669	7556	7362	7362
q19	761	1067	1128	1067
q20	1975	2072	1898	1898
q21	5701	5295	5131	5131
q22	592	572	577	572
Total cold run time: 53397 ms
Total hot run time: 51890 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 185720 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 13ebe672a083689491c631868d403d84b840cd3f, data reload: false

query1	979	388	367	367
query2	6520	2069	2002	2002
query3	6799	218	219	218
query4	33222	23366	23107	23107
query5	4314	612	458	458
query6	285	210	187	187
query7	4590	486	314	314
query8	302	245	229	229
query9	9612	2703	2704	2703
query10	466	306	249	249
query11	17939	15268	15179	15179
query12	157	103	102	102
query13	1670	539	391	391
query14	10394	7012	6984	6984
query15	230	190	186	186
query16	7215	619	477	477
query17	1595	701	574	574
query18	1740	393	312	312
query19	237	190	171	171
query20	122	117	111	111
query21	213	123	103	103
query22	4125	4424	4309	4309
query23	34421	33045	33169	33045
query24	6612	2295	2392	2295
query25	506	475	398	398
query26	1221	277	158	158
query27	1968	461	347	347
query28	5186	2468	2451	2451
query29	607	571	453	453
query30	232	186	168	168
query31	964	891	814	814
query32	73	64	62	62
query33	524	419	307	307
query34	741	838	519	519
query35	794	804	762	762
query36	1022	1063	941	941
query37	121	105	80	80
query38	4089	4163	4004	4004
query39	1492	1380	1454	1380
query40	205	111	103	103
query41	55	52	63	52
query42	120	103	109	103
query43	517	506	484	484
query44	1373	814	816	814
query45	177	170	163	163
query46	859	1031	647	647
query47	1779	1835	1791	1791
query48	388	401	327	327
query49	758	478	397	397
query50	633	670	392	392
query51	4188	4212	4141	4141
query52	101	106	93	93
query53	236	251	196	196
query54	488	496	404	404
query55	83	77	79	77
query56	263	267	242	242
query57	1151	1168	1073	1073
query58	241	227	246	227
query59	3010	2995	2755	2755
query60	277	265	251	251
query61	117	109	113	109
query62	792	720	664	664
query63	217	192	194	192
query64	4076	1017	637	637
query65	3245	3205	3143	3143
query66	906	414	311	311
query67	15870	15809	15640	15640
query68	5346	836	541	541
query69	443	289	253	253
query70	1195	1164	1083	1083
query71	387	282	260	260
query72	5798	3822	3776	3776
query73	655	760	363	363
query74	9923	8945	9249	8945
query75	3187	3129	2656	2656
query76	3199	1183	785	785
query77	481	367	283	283
query78	10003	10019	9345	9345
query79	3024	829	604	604
query80	682	529	446	446
query81	498	277	282	277
query82	423	155	124	124
query83	165	174	153	153
query84	239	89	76	76
query85	787	337	301	301
query86	390	323	305	305
query87	4520	4423	4439	4423
query88	5058	2177	2157	2157
query89	386	327	294	294
query90	1809	192	206	192
query91	131	133	105	105
query92	62	59	56	56
query93	2315	876	541	541
query94	664	421	308	308
query95	334	278	262	262
query96	491	619	290	290
query97	2761	2875	2725	2725
query98	229	205	195	195
query99	1287	1394	1251	1251
Total cold run time: 282296 ms
Total hot run time: 185720 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.04
query2	0.06	0.04	0.03
query3	0.24	0.06	0.07
query4	1.61	0.11	0.10
query5	0.43	0.44	0.41
query6	1.16	0.65	0.65
query7	0.02	0.01	0.01
query8	0.04	0.03	0.04
query9	0.59	0.49	0.51
query10	0.55	0.58	0.56
query11	0.14	0.11	0.11
query12	0.13	0.10	0.11
query13	0.63	0.60	0.60
query14	2.73	2.89	2.85
query15	0.89	0.84	0.82
query16	0.39	0.39	0.38
query17	1.01	1.03	1.00
query18	0.22	0.20	0.20
query19	1.86	1.77	2.09
query20	0.02	0.01	0.01
query21	15.37	0.94	0.56
query22	0.75	0.86	0.77
query23	15.15	1.48	0.60
query24	2.94	1.71	0.36
query25	0.28	0.09	0.13
query26	0.34	0.14	0.13
query27	0.05	0.07	0.06
query28	13.57	1.03	0.44
query29	12.58	3.96	3.27
query30	0.25	0.09	0.07
query31	2.82	0.60	0.37
query32	3.25	0.55	0.46
query33	3.01	3.01	3.05
query34	16.61	5.27	4.56
query35	4.51	4.54	4.52
query36	0.65	0.49	0.48
query37	0.10	0.06	0.06
query38	0.04	0.04	0.04
query39	0.03	0.02	0.03
query40	0.17	0.14	0.14
query41	0.09	0.03	0.03
query42	0.04	0.02	0.03
query43	0.04	0.04	0.03
Total cold run time: 105.39 s
Total hot run time: 30.3 s

@lzyy2024
Copy link
Author

run buildall

namespace doris::vectorized {

class FunctionCompress : public IFunction {
static constexpr std::array<char, 16> hex_itoc = {'0', '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.

please keep constexpr UPPER CASE

@lzyy2024 lzyy2024 requested a review from HappenLee February 3, 2025 05:21
@lzyy2024
Copy link
Author

lzyy2024 commented Feb 3, 2025

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17649	5525	5426	5426
q2	2065	317	191	191
q3	10463	1219	744	744
q4	10221	969	561	561
q5	7602	2429	2164	2164
q6	192	170	144	144
q7	922	779	608	608
q8	9240	1374	1175	1175
q9	5305	4922	4915	4915
q10	6845	2355	1894	1894
q11	483	271	259	259
q12	342	359	226	226
q13	17777	3654	3063	3063
q14	229	236	214	214
q15	517	471	472	471
q16	631	627	586	586
q17	568	877	328	328
q18	7133	6523	6421	6421
q19	1949	960	546	546
q20	307	319	194	194
q21	2793	2151	1956	1956
q22	368	333	313	313
Total cold run time: 103601 ms
Total hot run time: 32399 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5548	5460	5501	5460
q2	243	338	230	230
q3	2279	2658	2302	2302
q4	1437	1826	1400	1400
q5	4312	4725	4637	4637
q6	166	161	131	131
q7	2014	1959	1866	1866
q8	2627	2835	2707	2707
q9	7364	7270	7250	7250
q10	3050	3255	2786	2786
q11	596	499	496	496
q12	637	722	559	559
q13	3476	3944	3257	3257
q14	297	294	298	294
q15	521	468	464	464
q16	668	695	646	646
q17	1259	1755	1263	1263
q18	7607	7633	7340	7340
q19	800	1160	1089	1089
q20	2016	2053	1891	1891
q21	5848	5202	4891	4891
q22	634	614	590	590
Total cold run time: 53399 ms
Total hot run time: 51549 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 191844 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 376422f094b5ed32dcc058cd1f75940d1dd30081, data reload: false

query1	1304	934	923	923
query2	6204	2079	2067	2067
query3	10972	4380	4367	4367
query4	61069	29284	23235	23235
query5	5532	589	437	437
query6	414	214	193	193
query7	5469	515	297	297
query8	332	247	224	224
query9	7705	2664	2656	2656
query10	459	301	253	253
query11	17717	15342	15375	15342
query12	161	107	105	105
query13	1387	550	396	396
query14	11778	6928	6877	6877
query15	210	188	186	186
query16	6789	640	462	462
query17	1114	742	583	583
query18	1728	421	300	300
query19	201	182	164	164
query20	126	115	115	115
query21	212	126	108	108
query22	4646	4783	4441	4441
query23	34279	33373	33404	33373
query24	5515	2277	2330	2277
query25	462	481	403	403
query26	640	274	153	153
query27	1556	471	327	327
query28	3952	2523	2484	2484
query29	575	578	447	447
query30	218	193	156	156
query31	899	879	824	824
query32	70	61	59	59
query33	441	399	309	309
query34	727	864	517	517
query35	865	847	755	755
query36	1017	1039	980	980
query37	124	106	85	85
query38	4313	4336	4217	4217
query39	1551	1462	1437	1437
query40	205	117	108	108
query41	56	54	53	53
query42	121	109	113	109
query43	535	536	503	503
query44	1319	833	857	833
query45	189	175	171	171
query46	895	1051	678	678
query47	1898	1908	1870	1870
query48	387	410	334	334
query49	728	481	405	405
query50	650	673	400	400
query51	4225	4258	4290	4258
query52	138	101	90	90
query53	239	257	196	196
query54	507	491	424	424
query55	83	80	77	77
query56	278	269	256	256
query57	1187	1217	1166	1166
query58	237	233	239	233
query59	3138	3198	2996	2996
query60	277	257	268	257
query61	116	119	115	115
query62	746	705	656	656
query63	217	189	182	182
query64	1248	1014	678	678
query65	3352	3143	3166	3143
query66	746	388	295	295
query67	16208	15807	15507	15507
query68	5020	822	525	525
query69	486	293	264	264
query70	1224	1118	1143	1118
query71	412	277	252	252
query72	6422	3912	3873	3873
query73	782	744	361	361
query74	9833	9302	8668	8668
query75	3320	3125	2695	2695
query76	3803	1176	770	770
query77	480	359	361	359
query78	10156	10155	9334	9334
query79	2892	795	603	603
query80	1700	525	445	445
query81	547	275	237	237
query82	355	149	132	132
query83	267	166	146	146
query84	298	89	71	71
query85	765	346	347	346
query86	423	333	304	304
query87	4401	4750	4415	4415
query88	3650	2163	2135	2135
query89	394	321	287	287
query90	1649	192	188	188
query91	135	139	114	114
query92	67	57	56	56
query93	2134	853	530	530
query94	756	405	300	300
query95	317	262	248	248
query96	486	616	287	287
query97	2854	2863	2797	2797
query98	227	196	200	196
query99	1290	1377	1261	1261
Total cold run time: 310203 ms
Total hot run time: 191844 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.03
query2	0.07	0.03	0.03
query3	0.24	0.07	0.07
query4	1.63	0.10	0.10
query5	0.42	0.41	0.40
query6	1.16	0.65	0.65
query7	0.02	0.02	0.02
query8	0.04	0.03	0.03
query9	0.58	0.49	0.50
query10	0.56	0.56	0.56
query11	0.15	0.10	0.10
query12	0.14	0.11	0.10
query13	0.61	0.59	0.59
query14	2.88	2.74	2.77
query15	0.88	0.85	0.83
query16	0.38	0.38	0.38
query17	1.01	1.04	1.05
query18	0.23	0.20	0.20
query19	1.83	1.75	2.03
query20	0.02	0.01	0.02
query21	15.38	0.92	0.57
query22	0.74	0.82	0.71
query23	15.15	1.42	0.62
query24	2.93	1.82	1.73
query25	0.13	0.10	0.09
query26	0.29	0.16	0.15
query27	0.07	0.06	0.04
query28	14.47	0.99	0.43
query29	12.58	3.92	3.24
query30	0.24	0.08	0.06
query31	2.84	0.58	0.39
query32	3.24	0.55	0.46
query33	2.99	2.97	3.01
query34	16.50	5.16	4.50
query35	4.55	4.53	4.57
query36	0.68	0.48	0.47
query37	0.09	0.06	0.05
query38	0.05	0.04	0.03
query39	0.04	0.02	0.03
query40	0.16	0.13	0.13
query41	0.08	0.02	0.02
query42	0.04	0.03	0.02
query43	0.03	0.03	0.03
Total cold run time: 106.16 s
Total hot run time: 31.38 s

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 42.08% (11000/26139)
Line Coverage: 32.37% (92931/287083)
Region Coverage: 31.52% (47645/151150)
Branch Coverage: 27.55% (24120/87544)
Coverage Report: http://coverage.selectdb-in.cc/coverage/376422f094b5ed32dcc058cd1f75940d1dd30081_376422f094b5ed32dcc058cd1f75940d1dd30081/report/index.html

@lzyy2024 lzyy2024 force-pushed the CompressFunctions branch 2 times, most recently from 124faf8 to 42df82b Compare February 4, 2025 04:37
@lzyy2024
Copy link
Author

lzyy2024 commented Feb 4, 2025

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 42.06% (10995/26139)
Line Coverage: 32.33% (92807/287076)
Region Coverage: 31.49% (47594/151142)
Branch Coverage: 27.52% (24088/87536)
Coverage Report: http://coverage.selectdb-in.cc/coverage/42df82b0be1d0ed027e05062f36c438e3bf32308_42df82b0be1d0ed027e05062f36c438e3bf32308/report/index.html

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 42.06% (10993/26139)
Line Coverage: 32.33% (92807/287076)
Region Coverage: 31.48% (47578/151142)
Branch Coverage: 27.51% (24080/87536)
Coverage Report: http://coverage.selectdb-in.cc/coverage/42df82b0be1d0ed027e05062f36c438e3bf32308_42df82b0be1d0ed027e05062f36c438e3bf32308/report/index.html

@lzyy2024
Copy link
Author

lzyy2024 commented Feb 4, 2025

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 42.06% (10995/26139)
Line Coverage: 32.34% (92829/287074)
Region Coverage: 31.49% (47598/151142)
Branch Coverage: 27.52% (24088/87536)
Coverage Report: http://coverage.selectdb-in.cc/coverage/52d222d5db3f76a84e5406c1f11294bb31156192_52d222d5db3f76a84e5406c1f11294bb31156192/report/index.html

@lzyy2024
Copy link
Author

lzyy2024 commented Feb 4, 2025

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17562	5435	5364	5364
q2	2047	304	163	163
q3	10574	1206	725	725
q4	10206	955	535	535
q5	7518	2363	2146	2146
q6	187	164	135	135
q7	897	762	602	602
q8	9262	1322	1148	1148
q9	5172	4858	4930	4858
q10	6840	2327	1899	1899
q11	482	272	260	260
q12	350	357	228	228
q13	17947	3718	3087	3087
q14	228	231	220	220
q15	528	482	466	466
q16	642	608	578	578
q17	547	858	315	315
q18	6857	6271	6388	6271
q19	1673	944	522	522
q20	305	321	199	199
q21	2944	2117	1935	1935
q22	364	335	304	304
Total cold run time: 103132 ms
Total hot run time: 31960 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5521	5393	5447	5393
q2	239	320	232	232
q3	2218	2631	2335	2335
q4	1411	1842	1400	1400
q5	4312	4719	4642	4642
q6	163	154	126	126
q7	1961	1953	1833	1833
q8	2605	2750	2723	2723
q9	7256	7201	7224	7201
q10	3023	3279	2785	2785
q11	557	518	495	495
q12	643	698	623	623
q13	3564	3977	3287	3287
q14	285	285	283	283
q15	504	485	478	478
q16	630	700	642	642
q17	1208	1735	1275	1275
q18	7549	7588	7308	7308
q19	789	1043	1127	1043
q20	2008	2048	1905	1905
q21	5808	5010	4987	4987
q22	602	602	559	559
Total cold run time: 52856 ms
Total hot run time: 51555 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 192865 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 12facae2117299c27cfdc2dd328db4dabed78428, data reload: false

query1	1304	924	906	906
query2	6213	2074	2008	2008
query3	10991	4477	4610	4477
query4	61732	28570	23087	23087
query5	5578	605	447	447
query6	427	201	191	191
query7	5564	500	294	294
query8	330	246	231	231
query9	8103	2683	2663	2663
query10	458	318	256	256
query11	17532	15169	15419	15169
query12	165	111	113	111
query13	1438	574	430	430
query14	10425	7614	7718	7614
query15	219	224	191	191
query16	7172	613	480	480
query17	1150	759	600	600
query18	1776	426	353	353
query19	209	178	165	165
query20	117	114	115	114
query21	210	124	112	112
query22	4608	4827	4637	4637
query23	34482	33471	33553	33471
query24	5486	2272	2317	2272
query25	464	457	396	396
query26	668	282	158	158
query27	2141	500	324	324
query28	4523	2527	2511	2511
query29	540	571	454	454
query30	219	207	163	163
query31	969	914	867	867
query32	77	60	57	57
query33	441	367	311	311
query34	773	865	502	502
query35	825	850	762	762
query36	992	1074	974	974
query37	117	98	77	77
query38	4356	4327	4209	4209
query39	1484	1418	1436	1418
query40	208	111	99	99
query41	52	48	52	48
query42	126	103	104	103
query43	513	543	500	500
query44	1302	861	811	811
query45	193	170	169	169
query46	874	1055	651	651
query47	1944	1936	1859	1859
query48	410	440	333	333
query49	732	486	390	390
query50	646	666	385	385
query51	4288	4274	4336	4274
query52	108	104	93	93
query53	235	254	190	190
query54	494	505	420	420
query55	81	74	79	74
query56	269	286	263	263
query57	1207	1216	1137	1137
query58	233	234	230	230
query59	3328	3307	3034	3034
query60	264	252	243	243
query61	121	114	122	114
query62	719	728	655	655
query63	219	183	182	182
query64	1316	1021	662	662
query65	3240	3124	3165	3124
query66	655	386	305	305
query67	16395	15696	15652	15652
query68	4373	815	534	534
query69	526	300	252	252
query70	1218	1136	1124	1124
query71	425	291	249	249
query72	6092	3917	3834	3834
query73	694	790	359	359
query74	10128	9016	8887	8887
query75	3176	3173	2685	2685
query76	3286	1159	742	742
query77	494	338	320	320
query78	10193	10072	9350	9350
query79	2592	800	605	605
query80	670	528	455	455
query81	497	272	243	243
query82	222	155	116	116
query83	177	174	154	154
query84	294	96	68	68
query85	749	342	304	304
query86	388	316	277	277
query87	4410	4495	4464	4464
query88	4006	2143	2137	2137
query89	385	320	282	282
query90	1670	186	189	186
query91	130	134	108	108
query92	65	56	50	50
query93	2180	845	533	533
query94	717	414	308	308
query95	329	266	252	252
query96	485	608	279	279
query97	2777	2862	2760	2760
query98	216	195	196	195
query99	1289	1365	1291	1291
Total cold run time: 309303 ms
Total hot run time: 192865 ms

@doris-robot
Copy link

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

query1	0.03	0.05	0.04
query2	0.07	0.04	0.04
query3	0.24	0.06	0.07
query4	1.63	0.11	0.10
query5	0.44	0.41	0.41
query6	1.13	0.66	0.66
query7	0.02	0.01	0.01
query8	0.04	0.03	0.03
query9	0.58	0.50	0.51
query10	0.55	0.55	0.55
query11	0.13	0.10	0.11
query12	0.14	0.10	0.10
query13	0.60	0.60	0.61
query14	2.72	2.76	2.75
query15	0.88	0.83	0.82
query16	0.39	0.37	0.39
query17	0.96	0.96	0.98
query18	0.23	0.21	0.20
query19	1.86	1.76	2.01
query20	0.02	0.02	0.01
query21	15.36	0.95	0.58
query22	0.75	0.84	0.61
query23	15.30	1.38	0.54
query24	2.61	2.07	1.38
query25	0.23	0.05	0.19
query26	0.26	0.15	0.14
query27	0.08	0.06	0.04
query28	14.45	0.99	0.42
query29	12.83	4.01	3.29
query30	0.24	0.08	0.06
query31	2.84	0.60	0.38
query32	3.24	0.54	0.45
query33	2.96	3.05	3.06
query34	16.52	5.12	4.53
query35	4.51	4.55	4.52
query36	0.67	0.49	0.48
query37	0.10	0.06	0.06
query38	0.04	0.03	0.03
query39	0.04	0.02	0.03
query40	0.16	0.13	0.13
query41	0.09	0.03	0.02
query42	0.04	0.03	0.02
query43	0.04	0.03	0.03
Total cold run time: 106.02 s
Total hot run time: 30.9 s

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 42.06% (10994/26139)
Line Coverage: 32.34% (92827/287074)
Region Coverage: 31.48% (47583/151142)
Branch Coverage: 27.51% (24085/87536)
Coverage Report: http://coverage.selectdb-in.cc/coverage/12facae2117299c27cfdc2dd328db4dabed78428_12facae2117299c27cfdc2dd328db4dabed78428/report/index.html

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

auto st = compression_codec->compress(data, &compressed_str);
col_data.resize(col_data.size() + 10 + compressed_str.size());

// first ten digits represent the length of the uncompressed string
Copy link
Contributor

Choose a reason for hiding this comment

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

why here directly use uint32_t save the length, need a HEX?

@lzyy2024
Copy link
Author

lzyy2024 commented Feb 5, 2025

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17597	5480	5449	5449
q2	2051	299	179	179
q3	10501	1305	717	717
q4	10218	983	522	522
q5	7596	2490	2148	2148
q6	195	169	134	134
q7	905	748	604	604
q8	9230	1387	1217	1217
q9	5192	4877	4942	4877
q10	6877	2331	1915	1915
q11	468	282	254	254
q12	353	365	227	227
q13	17783	3743	3139	3139
q14	227	231	220	220
q15	523	477	496	477
q16	627	621	576	576
q17	576	883	334	334
q18	7153	6372	6475	6372
q19	1331	972	534	534
q20	316	333	201	201
q21	2887	2196	1990	1990
q22	374	332	317	317
Total cold run time: 102980 ms
Total hot run time: 32403 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5517	5540	5521	5521
q2	238	331	237	237
q3	2306	2632	2330	2330
q4	1392	1877	1365	1365
q5	4363	4773	4701	4701
q6	170	157	128	128
q7	2093	2026	1852	1852
q8	2663	2839	2676	2676
q9	7293	7319	7344	7319
q10	3063	3303	2776	2776
q11	599	546	507	507
q12	663	794	660	660
q13	3521	3885	3240	3240
q14	274	298	269	269
q15	506	472	463	463
q16	640	689	653	653
q17	1229	1730	1245	1245
q18	7613	7416	7445	7416
q19	820	1185	1070	1070
q20	1952	2036	1848	1848
q21	5663	5306	5097	5097
q22	599	591	567	567
Total cold run time: 53177 ms
Total hot run time: 51940 ms

@doris-robot
Copy link

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

query1	976	373	372	372
query2	7398	2080	2034	2034
query3	6790	214	209	209
query4	33096	23638	23248	23248
query5	4398	629	468	468
query6	297	193	200	193
query7	4599	497	306	306
query8	281	233	220	220
query9	9332	2654	2660	2654
query10	473	323	247	247
query11	17755	15147	14955	14955
query12	164	113	108	108
query13	1666	528	412	412
query14	9675	6969	6390	6390
query15	229	198	197	197
query16	7892	661	413	413
query17	1606	725	574	574
query18	2028	423	316	316
query19	226	191	166	166
query20	120	119	113	113
query21	211	129	106	106
query22	4107	4191	4179	4179
query23	34204	32999	33101	32999
query24	6653	2234	2233	2233
query25	487	446	382	382
query26	1221	274	152	152
query27	2005	471	330	330
query28	5286	2452	2449	2449
query29	714	550	417	417
query30	225	187	162	162
query31	978	843	791	791
query32	82	68	61	61
query33	508	354	284	284
query34	742	873	524	524
query35	792	817	749	749
query36	972	1074	941	941
query37	121	100	75	75
query38	4110	4212	4072	4072
query39	1452	1385	1377	1377
query40	203	112	102	102
query41	53	60	55	55
query42	120	98	103	98
query43	499	526	492	492
query44	1322	799	797	797
query45	176	169	172	169
query46	847	1049	640	640
query47	1820	1855	1773	1773
query48	384	404	328	328
query49	781	484	437	437
query50	616	671	387	387
query51	4187	4214	4131	4131
query52	108	102	100	100
query53	226	253	188	188
query54	484	497	406	406
query55	83	80	78	78
query56	265	261	246	246
query57	1169	1167	1068	1068
query58	255	230	232	230
query59	2929	3071	2832	2832
query60	265	273	252	252
query61	118	111	113	111
query62	811	700	656	656
query63	228	187	192	187
query64	4292	1021	651	651
query65	3216	3161	3175	3161
query66	1079	420	299	299
query67	16028	15716	15575	15575
query68	3208	842	544	544
query69	459	296	266	266
query70	1209	1155	1169	1155
query71	380	297	261	261
query72	5758	3816	4012	3816
query73	746	760	372	372
query74	9958	9050	8811	8811
query75	3163	3167	2654	2654
query76	3070	1174	787	787
query77	455	367	286	286
query78	10015	10014	9283	9283
query79	2674	812	681	681
query80	1679	533	454	454
query81	565	272	240	240
query82	362	145	116	116
query83	270	176	157	157
query84	243	102	74	74
query85	781	344	299	299
query86	471	316	308	308
query87	4520	4492	4347	4347
query88	4328	2192	2149	2149
query89	391	334	302	302
query90	1833	188	194	188
query91	143	141	109	109
query92	66	56	55	55
query93	2761	877	537	537
query94	749	424	306	306
query95	343	266	259	259
query96	499	633	283	283
query97	2766	2900	2771	2771
query98	239	210	206	206
query99	1285	1373	1254	1254
Total cold run time: 281824 ms
Total hot run time: 184657 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.03
query2	0.07	0.03	0.03
query3	0.24	0.06	0.07
query4	1.63	0.10	0.10
query5	0.42	0.42	0.41
query6	1.15	0.66	0.66
query7	0.02	0.02	0.01
query8	0.04	0.03	0.02
query9	0.58	0.50	0.49
query10	0.55	0.57	0.55
query11	0.15	0.11	0.11
query12	0.14	0.11	0.11
query13	0.61	0.60	0.60
query14	2.85	2.76	2.76
query15	0.90	0.82	0.82
query16	0.38	0.37	0.40
query17	1.09	1.02	1.02
query18	0.24	0.22	0.21
query19	1.95	1.75	2.00
query20	0.01	0.02	0.02
query21	15.37	0.94	0.59
query22	0.75	0.79	0.72
query23	15.27	1.41	0.55
query24	3.03	1.00	1.66
query25	0.26	0.16	0.15
query26	0.24	0.14	0.13
query27	0.05	0.04	0.05
query28	14.23	1.01	0.43
query29	12.60	4.02	3.30
query30	0.25	0.09	0.08
query31	2.81	0.62	0.39
query32	3.25	0.55	0.46
query33	3.08	3.01	3.07
query34	16.62	5.24	4.58
query35	4.57	4.55	4.56
query36	0.68	0.49	0.48
query37	0.09	0.06	0.06
query38	0.05	0.04	0.03
query39	0.04	0.03	0.03
query40	0.18	0.14	0.12
query41	0.08	0.03	0.03
query42	0.04	0.03	0.02
query43	0.03	0.03	0.03
Total cold run time: 106.62 s
Total hot run time: 30.91 s

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 42.09% (11016/26172)
Line Coverage: 32.36% (92942/287251)
Region Coverage: 31.52% (47667/151238)
Branch Coverage: 27.53% (24109/87582)
Coverage Report: http://coverage.selectdb-in.cc/coverage/c342b3f574b8d17b32c536ba5f2dac60186868be_c342b3f574b8d17b32c536ba5f2dac60186868be/report/index.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement](good-first-issue) Support some compress functions
5 participants