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]Add comments to block.h and add unit tests #44083

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

Conversation

Yoruet
Copy link
Contributor

@Yoruet Yoruet commented Nov 17, 2024

What problem does this PR solve?

Issue Number: close #xxx

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?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

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

…ck_test.cpp and add some initialization for beta_rowset_test.cpp and agg_linear_histogram_test.cpp
@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.

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

clang-tidy review says "All clean, LGTM! 👍"

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

EXPECT_EQ(0, block.columns());
}

TEST(BlockTest, ColumnOperations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, ColumnOperations) {
^
Additional context

be/test/vec/core/block_test.cpp:794: 156 lines including whitespace and comments (threshold 80)

TEST(BlockTest, ColumnOperations) {
^

EXPECT_THROW(multi_null_block.bytes(), Exception);
}

TEST(BlockTest, DumpMethods) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

), Exception);
                  ^
Additional context

be/test/vec/core/block_test.cpp:1057: 120 lines including whitespace and comments (threshold 80)

), Exception);
                  ^

}

// 克隆和列操作测试
TEST(BlockTest, CloneOperations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

 }
                                  ^
Additional context

be/test/vec/core/block_test.cpp:1180: 142 lines including whitespace and comments (threshold 80)

 }
                                  ^

}
}

TEST(BlockTest, FilterAndSelector) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

.get())->get_data()[0]);
                                  ^
Additional context

be/test/vec/core/block_test.cpp:1324: 238 lines including whitespace and comments (threshold 80)

.get())->get_data()[0]);
                                  ^

EXPECT_EQ(0, other_block.columns());
}

TEST(BlockTest, ClearColumnData) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

_EQ(0, other_block.columns());
                                  ^
Additional context

be/test/vec/core/block_test.cpp:1603: 123 lines including whitespace and comments (threshold 80)

_EQ(0, other_block.columns());
                                  ^

}

TEST(BlockTest, HashUpdate) {
// Test case 1: Single column with single value
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

    ^
Additional context

be/test/vec/core/block_test.cpp:1835: 113 lines including whitespace and comments (threshold 80)

    ^

}
}

TEST(BlockTest, BlockOperations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

1_value, hash2.get64());
                                  ^
Additional context

be/test/vec/core/block_test.cpp:1949: 201 lines including whitespace and comments (threshold 80)

1_value, hash2.get64());
                                  ^

}
}

TEST(BlockTest, StringAndCompressionOperations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

olumn->size());  // Kept
                                  ^
Additional context

be/test/vec/core/block_test.cpp:2152: 113 lines including whitespace and comments (threshold 80)

olumn->size());  // Kept
                                  ^

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

EXPECT_EQ(0, block.columns());
}

TEST(BlockTest, ColumnOperations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, ColumnOperations) {
^
Additional context

be/test/vec/core/block_test.cpp:790: 156 lines including whitespace and comments (threshold 80)

TEST(BlockTest, ColumnOperations) {
^

EXPECT_THROW(multi_null_block.bytes(), Exception);
}

TEST(BlockTest, DumpMethods) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, DumpMethods) {
^
Additional context

be/test/vec/core/block_test.cpp:1052: 121 lines including whitespace and comments (threshold 80)

TEST(BlockTest, DumpMethods) {
^

}
}

TEST(BlockTest, CloneOperations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, CloneOperations) {
^
Additional context

be/test/vec/core/block_test.cpp:1175: 142 lines including whitespace and comments (threshold 80)

TEST(BlockTest, CloneOperations) {
^

}
}

TEST(BlockTest, FilterAndSelector) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, FilterAndSelector) {
^
Additional context

be/test/vec/core/block_test.cpp:1319: 238 lines including whitespace and comments (threshold 80)

TEST(BlockTest, FilterAndSelector) {
^

EXPECT_EQ(0, other_block.columns());
}

TEST(BlockTest, ClearColumnData) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, ClearColumnData) {
^
Additional context

be/test/vec/core/block_test.cpp:1598: 122 lines including whitespace and comments (threshold 80)

TEST(BlockTest, ClearColumnData) {
^

EXPECT_EQ(2, col2->get_data()[0]); // the value of col2 should be 2
}

TEST(BlockTest, HashUpdate) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, HashUpdate) {
^
Additional context

be/test/vec/core/block_test.cpp:1828: 113 lines including whitespace and comments (threshold 80)

TEST(BlockTest, HashUpdate) {
^

}
}

TEST(BlockTest, BlockOperations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, BlockOperations) {
^
Additional context

be/test/vec/core/block_test.cpp:1943: 201 lines including whitespace and comments (threshold 80)

TEST(BlockTest, BlockOperations) {
^

}
}

TEST(BlockTest, StringOperations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, StringOperations) {
^
Additional context

be/test/vec/core/block_test.cpp:2146: 99 lines including whitespace and comments (threshold 80)

TEST(BlockTest, StringOperations) {
^

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

EXPECT_THROW(multi_null_block.bytes(), Exception);
}

TEST(BlockTest, DumpMethods) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, DumpMethods) {
^
Additional context

be/test/vec/core/block_test.cpp:1052: 122 lines including whitespace and comments (threshold 80)

TEST(BlockTest, DumpMethods) {
^

}
}

TEST(BlockTest, CloneOperations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, CloneOperations) {
^
Additional context

be/test/vec/core/block_test.cpp:1176: 159 lines including whitespace and comments (threshold 80)

TEST(BlockTest, CloneOperations) {
^

}
}

TEST(BlockTest, FilterAndSelector) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, FilterAndSelector) {
^
Additional context

be/test/vec/core/block_test.cpp:1337: 236 lines including whitespace and comments (threshold 80)

TEST(BlockTest, FilterAndSelector) {
^

EXPECT_EQ(0, other_block.columns());
}

TEST(BlockTest, ClearColumnData) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, ClearColumnData) {
^
Additional context

be/test/vec/core/block_test.cpp:1614: 122 lines including whitespace and comments (threshold 80)

TEST(BlockTest, ClearColumnData) {
^

EXPECT_EQ(2, col2->get_data()[0]); // the value of col2 should be 2
}

TEST(BlockTest, HashUpdate) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, HashUpdate) {
^
Additional context

be/test/vec/core/block_test.cpp:1844: 113 lines including whitespace and comments (threshold 80)

TEST(BlockTest, HashUpdate) {
^

}
}

TEST(BlockTest, BlockOperations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, BlockOperations) {
^
Additional context

be/test/vec/core/block_test.cpp:1959: 201 lines including whitespace and comments (threshold 80)

TEST(BlockTest, BlockOperations) {
^

}
}

TEST(BlockTest, StringOperations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, StringOperations) {
^
Additional context

be/test/vec/core/block_test.cpp:2162: 99 lines including whitespace and comments (threshold 80)

TEST(BlockTest, StringOperations) {
^

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

EXPECT_EQ(0, other_block.columns());
}

TEST(BlockTest, ClearColumnData) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, ClearColumnData) {
^
Additional context

be/test/vec/core/block_test.cpp:1613: 122 lines including whitespace and comments (threshold 80)

TEST(BlockTest, ClearColumnData) {
^

EXPECT_EQ(2, col2->get_data()[0]); // the value of col2 should be 2
}

TEST(BlockTest, HashUpdate) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, HashUpdate) {
^
Additional context

be/test/vec/core/block_test.cpp:1843: 113 lines including whitespace and comments (threshold 80)

TEST(BlockTest, HashUpdate) {
^

}
}

TEST(BlockTest, BlockOperations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, BlockOperations) {
^
Additional context

be/test/vec/core/block_test.cpp:1958: 201 lines including whitespace and comments (threshold 80)

TEST(BlockTest, BlockOperations) {
^

}
}

TEST(BlockTest, StringOperations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, StringOperations) {
^
Additional context

be/test/vec/core/block_test.cpp:2161: 99 lines including whitespace and comments (threshold 80)

TEST(BlockTest, StringOperations) {
^

@zclllyybb
Copy link
Contributor

run buildall

be/src/vec/core/block.h Outdated Show resolved Hide resolved
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.

We can by the way unify the format, and the function is not related to the large paragraph description with /**/, and then the function of the comments are unified with //, if some kind of function categorisation of the comments can be used /// (for example, "the following is the query interface", etc.)

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17610	7874	7500	7500
q2	2271	1171	1158	1158
q3	10033	1218	1220	1218
q4	10306	788	810	788
q5	7601	2786	2788	2786
q6	242	151	147	147
q7	1004	644	608	608
q8	9388	2361	2362	2361
q9	6755	6551	6577	6551
q10	7004	2308	2301	2301
q11	462	263	262	262
q12	408	210	208	208
q13	17769	3030	3069	3030
q14	237	211	214	211
q15	605	549	540	540
q16	648	611	601	601
q17	1014	541	524	524
q18	7617	6764	6872	6764
q19	1362	1046	921	921
q20	2970	2736	2729	2729
q21	4006	3271	3368	3271
q22	1413	1348	1326	1326
Total cold run time: 110725 ms
Total hot run time: 45805 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7427	7330	7516	7330
q2	344	236	255	236
q3	3241	3098	3039	3039
q4	2160	1938	1838	1838
q5	5721	5768	5763	5763
q6	228	139	139	139
q7	2257	1871	1812	1812
q8	3406	3631	3613	3613
q9	9021	9001	9050	9001
q10	3670	3721	3633	3633
q11	612	518	520	518
q12	824	630	603	603
q13	12070	3271	3254	3254
q14	306	268	284	268
q15	605	564	532	532
q16	681	644	661	644
q17	1916	1663	1643	1643
q18	8568	7731	7924	7731
q19	1760	1686	1697	1686
q20	2154	1895	1906	1895
q21	5655	5536	5591	5536
q22	685	558	573	558
Total cold run time: 73311 ms
Total hot run time: 61272 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.03
query2	0.07	0.03	0.04
query3	0.24	0.07	0.07
query4	1.63	0.11	0.10
query5	0.42	0.43	0.42
query6	1.15	0.67	0.64
query7	0.02	0.01	0.01
query8	0.04	0.02	0.03
query9	0.58	0.49	0.50
query10	0.56	0.55	0.54
query11	0.14	0.11	0.11
query12	0.13	0.11	0.11
query13	0.62	0.59	0.60
query14	2.86	2.71	2.74
query15	0.91	0.83	0.83
query16	0.38	0.39	0.39
query17	1.08	1.07	1.10
query18	0.20	0.19	0.20
query19	1.99	1.87	2.01
query20	0.02	0.01	0.01
query21	15.36	0.58	0.59
query22	2.49	2.81	1.64
query23	17.09	0.92	0.73
query24	2.65	1.95	0.80
query25	0.12	0.09	0.08
query26	0.64	0.14	0.14
query27	0.04	0.06	0.04
query28	10.60	1.10	1.07
query29	12.56	3.25	3.19
query30	0.26	0.07	0.06
query31	2.88	0.37	0.39
query32	3.26	0.46	0.47
query33	2.99	3.11	3.07
query34	16.90	4.44	4.42
query35	4.49	4.47	4.50
query36	0.66	0.49	0.50
query37	0.09	0.06	0.05
query38	0.04	0.03	0.04
query39	0.03	0.02	0.03
query40	0.16	0.12	0.13
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: 106.53 s
Total hot run time: 32.13 s

@Yoruet
Copy link
Contributor Author

Yoruet commented Nov 19, 2024

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17580	7544	7323	7323
q2	2253	1167	1172	1167
q3	10040	1207	1217	1207
q4	10332	785	700	700
q5	7614	2747	2758	2747
q6	244	151	146	146
q7	989	628	614	614
q8	9406	2377	2375	2375
q9	6607	6406	6387	6387
q10	7051	2277	2292	2277
q11	473	260	262	260
q12	423	222	221	221
q13	17776	3089	3058	3058
q14	245	209	214	209
q15	588	533	518	518
q16	687	608	590	590
q17	984	604	581	581
q18	7700	6715	6725	6715
q19	1362	1039	1030	1030
q20	2930	2700	2720	2700
q21	3992	3289	3119	3119
q22	1397	1371	1328	1328
Total cold run time: 110673 ms
Total hot run time: 45272 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7302	7272	7506	7272
q2	343	241	244	241
q3	3093	3062	3000	3000
q4	2081	1868	1807	1807
q5	5663	5711	5765	5711
q6	228	144	144	144
q7	2198	1867	1808	1808
q8	3376	3585	3581	3581
q9	8936	8927	8973	8927
q10	3588	3595	3564	3564
q11	599	505	516	505
q12	851	644	642	642
q13	11335	3280	3311	3280
q14	303	293	270	270
q15	588	526	530	526
q16	687	655	658	655
q17	1887	1676	1612	1612
q18	8383	7716	7709	7709
q19	1696	1565	1575	1565
q20	2134	1873	1916	1873
q21	5711	5500	5529	5500
q22	658	572	580	572
Total cold run time: 71640 ms
Total hot run time: 60764 ms

@doris-robot
Copy link

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

query1	0.05	0.03	0.03
query2	0.07	0.04	0.03
query3	0.23	0.06	0.07
query4	1.63	0.11	0.10
query5	0.41	0.42	0.42
query6	1.14	0.65	0.67
query7	0.03	0.01	0.02
query8	0.04	0.02	0.04
query9	0.57	0.50	0.52
query10	0.56	0.55	0.56
query11	0.14	0.10	0.11
query12	0.14	0.11	0.11
query13	0.61	0.59	0.60
query14	2.71	2.77	2.73
query15	0.88	0.83	0.83
query16	0.39	0.40	0.38
query17	1.09	1.05	1.05
query18	0.20	0.20	0.19
query19	1.87	1.86	2.03
query20	0.01	0.01	0.01
query21	15.37	0.58	0.58
query22	2.57	2.50	1.71
query23	17.20	0.82	0.78
query24	3.13	1.80	1.84
query25	0.22	0.18	0.05
query26	0.62	0.13	0.13
query27	0.04	0.05	0.04
query28	9.26	1.10	1.07
query29	12.80	3.24	3.22
query30	0.25	0.07	0.07
query31	2.86	0.39	0.38
query32	3.26	0.46	0.46
query33	3.00	3.05	3.07
query34	16.96	4.45	4.44
query35	4.51	4.46	4.45
query36	0.68	0.49	0.50
query37	0.09	0.07	0.06
query38	0.05	0.03	0.03
query39	0.04	0.02	0.03
query40	0.17	0.14	0.12
query41	0.09	0.03	0.02
query42	0.03	0.03	0.02
query43	0.03	0.04	0.03
Total cold run time: 106 s
Total hot run time: 33.24 s

@Yoruet Yoruet requested a review from zclllyybb November 23, 2024 08:01
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.

for all test, we should cover the corner case, at least cover:

  1. empty block
  2. Column's type is const+nullable

…n empty, regular, const, and nullable columns, ensuring correct order and data preservation.
… regular, const, and nullable columns, ensuring consistent hash values for identical data and different hashes for varying data arrangements.
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

}
}

TEST(BlockTest, BasicOperations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, BasicOperations) {
^
Additional context

be/test/vec/core/block_test.cpp:778: 250 lines including whitespace and comments (threshold 80)

TEST(BlockTest, BasicOperations) {
^

}
}

TEST(BlockTest, ColumnOperations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, ColumnOperations) {
^
Additional context

be/test/vec/core/block_test.cpp:1030: 286 lines including whitespace and comments (threshold 80)

TEST(BlockTest, ColumnOperations) {
^

}
}

TEST(BlockTest, SortColumns) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, SortColumns) {
^
Additional context

be/test/vec/core/block_test.cpp:1318: 152 lines including whitespace and comments (threshold 80)

TEST(BlockTest, SortColumns) {
^

}
}

TEST(BlockTest, RowOperations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, RowOperations) {
^
Additional context

be/test/vec/core/block_test.cpp:1472: 154 lines including whitespace and comments (threshold 80)

TEST(BlockTest, RowOperations) {
^

}
}

TEST(BlockTest, MemoryAndSize) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, MemoryAndSize) {
^
Additional context

be/test/vec/core/block_test.cpp:1628: 175 lines including whitespace and comments (threshold 80)

TEST(BlockTest, MemoryAndSize) {
^

}
}

TEST(BlockTest, ClearColumnData) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, ClearColumnData) {
^
Additional context

be/test/vec/core/block_test.cpp:3307: 244 lines including whitespace and comments (threshold 80)

TEST(BlockTest, ClearColumnData) {
^

}
}

TEST(BlockTest, IndexByName) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, IndexByName) {
^
Additional context

be/test/vec/core/block_test.cpp:3553: 184 lines including whitespace and comments (threshold 80)

TEST(BlockTest, IndexByName) {
^

EXPECT_EQ(2, col2->get_data()[0]); // the value of col2 should be 2
}

TEST(BlockTest, HashUpdate) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, HashUpdate) {
^
Additional context

be/test/vec/core/block_test.cpp:3797: 113 lines including whitespace and comments (threshold 80)

TEST(BlockTest, HashUpdate) {
^

}
}

TEST(BlockTest, BlockOperations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, BlockOperations) {
^
Additional context

be/test/vec/core/block_test.cpp:3912: 201 lines including whitespace and comments (threshold 80)

TEST(BlockTest, BlockOperations) {
^

}
}

TEST(BlockTest, StringOperations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, StringOperations) {
^
Additional context

be/test/vec/core/block_test.cpp:4115: 99 lines including whitespace and comments (threshold 80)

TEST(BlockTest, StringOperations) {
^

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

EXPECT_EQ("col1", block.get_by_position(1).name);

// Verify column data is correctly shuffled
const auto* col1 = assert_cast<const vectorized::ColumnVector<Int32>*>(
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, HashUpdate) {
^
Additional context

be/test/vec/core/block_test.cpp:3777: 113 lines including whitespace and comments (threshold 80)

TEST(BlockTest, HashUpdate) {
^

// Test case 1: Single column with single value
{
vectorized::Block block;
auto col = vectorized::ColumnVector<Int32>::create();
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, BlockOperations) {
^
Additional context

be/test/vec/core/block_test.cpp:3892: 201 lines including whitespace and comments (threshold 80)

TEST(BlockTest, BlockOperations) {
^

col1->insert_value(1);
col1->insert_value(3);
block2.insert({std::move(col1), type, "col1"});

Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, StringOperations) {
^
Additional context

be/test/vec/core/block_test.cpp:4095: 99 lines including whitespace and comments (threshold 80)

TEST(BlockTest, StringOperations) {
^

TEST(BlockTest, StringOperations) {
using namespace std::string_literals;
// Test shrink_char_type_column_suffix_zero
{
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, dump_data) {
^
Additional context

be/test/vec/core/block_test.cpp:4209: 90 lines including whitespace and comments (threshold 80)

TEST(BlockTest, dump_data) {
^

col->insert_value(2);
auto type = std::make_shared<vectorized::DataTypeInt32>();
block.insert({std::move(col), type, "int_col"});
}
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: use auto when initializing with a cast to avoid duplicating the type name [modernize-use-auto]

Suggested change
}
auto value = __int128_t(i * pow(10, 9) + i * pow(10, 8));

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

}
}

TEST(BlockTest, ColumnTransformations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, ColumnTransformations) {
^
Additional context

be/test/vec/core/block_test.cpp:3739: 147 lines including whitespace and comments (threshold 80)

TEST(BlockTest, ColumnTransformations) {
^

}
}

TEST(BlockTest, HashUpdate) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, HashUpdate) {
^
Additional context

be/test/vec/core/block_test.cpp:3888: 113 lines including whitespace and comments (threshold 80)

TEST(BlockTest, HashUpdate) {
^

}
}

TEST(BlockTest, BlockOperations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, BlockOperations) {
^
Additional context

be/test/vec/core/block_test.cpp:4003: 201 lines including whitespace and comments (threshold 80)

TEST(BlockTest, BlockOperations) {
^

}
}

TEST(BlockTest, StringOperations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, StringOperations) {
^
Additional context

be/test/vec/core/block_test.cpp:4206: 99 lines including whitespace and comments (threshold 80)

TEST(BlockTest, StringOperations) {
^

…are methods, same bit operations, and temporary column management across empty, regular, const, and nullable columns, ensuring robust functionality and data integrity.
…luding shrinking string columns with trailing zeros and verifying data integrity across various scenarios, such as empty strings and array columns.
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

}
}

TEST(BlockTest, HashUpdate) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, HashUpdate) {
^
Additional context

be/test/vec/core/block_test.cpp:3888: 343 lines including whitespace and comments (threshold 80)

TEST(BlockTest, HashUpdate) {
^

}
}

TEST(BlockTest, CompareAt) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, CompareAt) {
^
Additional context

be/test/vec/core/block_test.cpp:4308: 193 lines including whitespace and comments (threshold 80)

TEST(BlockTest, CompareAt) {
^

}
}

TEST(BlockTest, CompareColumnAt) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, CompareColumnAt) {
^
Additional context

be/test/vec/core/block_test.cpp:4503: 153 lines including whitespace and comments (threshold 80)

TEST(BlockTest, CompareColumnAt) {
^

}
}

TEST(BlockTest, SameBitOperations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

< null
                ^
Additional context

be/test/vec/core/block_test.cpp:4658: 100 lines including whitespace and comments (threshold 80)

< null
                ^

}
}

TEST(BlockTest, CreateSameStructBlock) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

     }
                ^
Additional context

be/test/vec/core/block_test.cpp:4760: 147 lines including whitespace and comments (threshold 80)

     }
                ^

}
}

TEST(BlockTest, EraseTmpColumns) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

     }
                ^
Additional context

be/test/vec/core/block_test.cpp:4909: 135 lines including whitespace and comments (threshold 80)

     }
                ^

}
}

TEST(BlockTest, ClearColumnMemNotKeep) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

     }
                ^
Additional context

be/test/vec/core/block_test.cpp:5046: 145 lines including whitespace and comments (threshold 80)

     }
                ^

}
}

TEST(BlockTest, StringOperations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

     }
                ^
Additional context

be/test/vec/core/block_test.cpp:5193: 99 lines including whitespace and comments (threshold 80)

     }
                ^

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

}
}

TEST(BlockTest, CloneOperations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, CloneOperations) {
^
Additional context

be/test/vec/core/block_test.cpp:2078: 296 lines including whitespace and comments (threshold 80)

TEST(BlockTest, CloneOperations) {
^

}
}

TEST(BlockTest, FilterAndSelector) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, FilterAndSelector) {
^
Additional context

be/test/vec/core/block_test.cpp:2376: 766 lines including whitespace and comments (threshold 80)

TEST(BlockTest, FilterAndSelector) {
^

}
}

TEST(BlockTest, RowCheck) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, RowCheck) {
^
Additional context

be/test/vec/core/block_test.cpp:3144: 167 lines including whitespace and comments (threshold 80)

TEST(BlockTest, RowCheck) {
^

}
}

TEST(BlockTest, ClearColumnData) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, ClearColumnData) {
^
Additional context

be/test/vec/core/block_test.cpp:3313: 244 lines including whitespace and comments (threshold 80)

TEST(BlockTest, ClearColumnData) {
^

}
}

TEST(BlockTest, IndexByName) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, IndexByName) {
^
Additional context

be/test/vec/core/block_test.cpp:3559: 184 lines including whitespace and comments (threshold 80)

TEST(BlockTest, IndexByName) {
^

}
}

TEST(BlockTest, SameBitOperations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

< null
                ^
Additional context

be/test/vec/core/block_test.cpp:4664: 100 lines including whitespace and comments (threshold 80)

< null
                ^

}
}

TEST(BlockTest, CreateSameStructBlock) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

     }
                ^
Additional context

be/test/vec/core/block_test.cpp:4766: 147 lines including whitespace and comments (threshold 80)

     }
                ^

}
}

TEST(BlockTest, EraseTmpColumns) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

     }
                ^
Additional context

be/test/vec/core/block_test.cpp:4915: 135 lines including whitespace and comments (threshold 80)

     }
                ^

}
}

TEST(BlockTest, ClearColumnMemNotKeep) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

     }
                ^
Additional context

be/test/vec/core/block_test.cpp:5052: 145 lines including whitespace and comments (threshold 80)

     }
                ^

}
}

TEST(BlockTest, StringOperations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

     }
                ^
Additional context

be/test/vec/core/block_test.cpp:5199: 155 lines including whitespace and comments (threshold 80)

     }
                ^

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

}
}

TEST(BlockTest, FilterAndSelector) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, FilterAndSelector) {
^
Additional context

be/test/vec/core/block_test.cpp:2376: 772 lines including whitespace and comments (threshold 80)

TEST(BlockTest, FilterAndSelector) {
^

}
}

TEST(BlockTest, RowCheck) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, RowCheck) {
^
Additional context

be/test/vec/core/block_test.cpp:3150: 167 lines including whitespace and comments (threshold 80)

TEST(BlockTest, RowCheck) {
^

}
}

TEST(BlockTest, ClearColumnData) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, ClearColumnData) {
^
Additional context

be/test/vec/core/block_test.cpp:3319: 244 lines including whitespace and comments (threshold 80)

TEST(BlockTest, ClearColumnData) {
^

}
}

TEST(BlockTest, IndexByName) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, IndexByName) {
^
Additional context

be/test/vec/core/block_test.cpp:3565: 184 lines including whitespace and comments (threshold 80)

TEST(BlockTest, IndexByName) {
^

}
}

TEST(BlockTest, ColumnTransformations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, ColumnTransformations) {
^
Additional context

be/test/vec/core/block_test.cpp:3751: 147 lines including whitespace and comments (threshold 80)

TEST(BlockTest, ColumnTransformations) {
^

}
}

TEST(BlockTest, SameBitOperations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

< null
                ^
Additional context

be/test/vec/core/block_test.cpp:4670: 100 lines including whitespace and comments (threshold 80)

< null
                ^

}
}

TEST(BlockTest, CreateSameStructBlock) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

     }
                ^
Additional context

be/test/vec/core/block_test.cpp:4772: 147 lines including whitespace and comments (threshold 80)

     }
                ^

}
}

TEST(BlockTest, EraseTmpColumns) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

     }
                ^
Additional context

be/test/vec/core/block_test.cpp:4921: 135 lines including whitespace and comments (threshold 80)

     }
                ^

}
}

TEST(BlockTest, ClearColumnMemNotKeep) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

     }
                ^
Additional context

be/test/vec/core/block_test.cpp:5058: 145 lines including whitespace and comments (threshold 80)

     }
                ^

}
}

TEST(BlockTest, StringOperations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

     }
                ^
Additional context

be/test/vec/core/block_test.cpp:5205: 155 lines including whitespace and comments (threshold 80)

     }
                ^

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

}
}

TEST(BlockTest, ClearColumnData) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, ClearColumnData) {
^
Additional context

be/test/vec/core/block_test.cpp:3319: 245 lines including whitespace and comments (threshold 80)

TEST(BlockTest, ClearColumnData) {
^

}
}

TEST(BlockTest, IndexByName) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, IndexByName) {
^
Additional context

be/test/vec/core/block_test.cpp:3566: 185 lines including whitespace and comments (threshold 80)

TEST(BlockTest, IndexByName) {
^

}
}

TEST(BlockTest, ColumnTransformations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, ColumnTransformations) {
^
Additional context

be/test/vec/core/block_test.cpp:3753: 147 lines including whitespace and comments (threshold 80)

TEST(BlockTest, ColumnTransformations) {
^

}
}

TEST(BlockTest, HashUpdate) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, HashUpdate) {
^
Additional context

be/test/vec/core/block_test.cpp:3902: 343 lines including whitespace and comments (threshold 80)

TEST(BlockTest, HashUpdate) {
^

}
}

TEST(BlockTest, CompareAt) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, CompareAt) {
^
Additional context

be/test/vec/core/block_test.cpp:4322: 193 lines including whitespace and comments (threshold 80)

TEST(BlockTest, CompareAt) {
^

}
}

TEST(BlockTest, SameBitOperations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

< null
                ^
Additional context

be/test/vec/core/block_test.cpp:4675: 100 lines including whitespace and comments (threshold 80)

< null
                ^

}
}

TEST(BlockTest, CreateSameStructBlock) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

     }
                ^
Additional context

be/test/vec/core/block_test.cpp:4777: 147 lines including whitespace and comments (threshold 80)

     }
                ^

}
}

TEST(BlockTest, EraseTmpColumns) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

     }
                ^
Additional context

be/test/vec/core/block_test.cpp:4926: 141 lines including whitespace and comments (threshold 80)

     }
                ^

}
}

TEST(BlockTest, ClearColumnMemNotKeep) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

     }
                ^
Additional context

be/test/vec/core/block_test.cpp:5069: 145 lines including whitespace and comments (threshold 80)

     }
                ^

}
}

TEST(BlockTest, StringOperations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

     }
                ^
Additional context

be/test/vec/core/block_test.cpp:5216: 144 lines including whitespace and comments (threshold 80)

     }
                ^

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


TEST(BlockTest, IndexByName) {
// Test with empty block
{
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, IndexByName) {
^
Additional context

be/test/vec/core/block_test.cpp:3565: 185 lines including whitespace and comments (threshold 80)

TEST(BlockTest, IndexByName) {
^


TEST(BlockTest, ColumnTransformations) {
// Test with empty block
{
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, ColumnTransformations) {
^
Additional context

be/test/vec/core/block_test.cpp:3752: 147 lines including whitespace and comments (threshold 80)

TEST(BlockTest, ColumnTransformations) {
^


TEST(BlockTest, HashUpdate) {
// Test with empty block
{
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, HashUpdate) {
^
Additional context

be/test/vec/core/block_test.cpp:3901: 343 lines including whitespace and comments (threshold 80)

TEST(BlockTest, HashUpdate) {
^


TEST(BlockTest, CompareAt) {
// Test with empty blocks
{
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, CompareAt) {
^
Additional context

be/test/vec/core/block_test.cpp:4321: 193 lines including whitespace and comments (threshold 80)

TEST(BlockTest, CompareAt) {
^


TEST(BlockTest, CompareColumnAt) {
// Test with empty blocks
{
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, CompareColumnAt) {
^
Additional context

be/test/vec/core/block_test.cpp:4516: 156 lines including whitespace and comments (threshold 80)

TEST(BlockTest, CompareColumnAt) {
^


TEST(BlockTest, SameBitOperations) {
// Test with empty block
{
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

< null
                ^
Additional context

be/test/vec/core/block_test.cpp:4674: 100 lines including whitespace and comments (threshold 80)

< null
                ^


TEST(BlockTest, CreateSameStructBlock) {
// Test with empty block
{
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

     }
                ^
Additional context

be/test/vec/core/block_test.cpp:4776: 147 lines including whitespace and comments (threshold 80)

     }
                ^


TEST(BlockTest, EraseTmpColumns) {
// Test with empty block
{
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

     }
                ^
Additional context

be/test/vec/core/block_test.cpp:4925: 141 lines including whitespace and comments (threshold 80)

     }
                ^


TEST(BlockTest, ClearColumnMemNotKeep) {
// Test with empty block
{
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

     }
                ^
Additional context

be/test/vec/core/block_test.cpp:5068: 145 lines including whitespace and comments (threshold 80)

     }
                ^


TEST(BlockTest, StringOperations) {
using namespace std::string_literals;

Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

     }
                ^
Additional context

be/test/vec/core/block_test.cpp:5215: 144 lines including whitespace and comments (threshold 80)

     }
                ^

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

}
}

TEST(BlockTest, ClearColumnData) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, ClearColumnData) {
^
Additional context

be/test/vec/core/block_test.cpp:3319: 242 lines including whitespace and comments (threshold 80)

TEST(BlockTest, ClearColumnData) {
^

}
}

TEST(BlockTest, IndexByName) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, IndexByName) {
^
Additional context

be/test/vec/core/block_test.cpp:3563: 185 lines including whitespace and comments (threshold 80)

TEST(BlockTest, IndexByName) {
^

}
}

TEST(BlockTest, ColumnTransformations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, ColumnTransformations) {
^
Additional context

be/test/vec/core/block_test.cpp:3750: 147 lines including whitespace and comments (threshold 80)

TEST(BlockTest, ColumnTransformations) {
^

}
}

TEST(BlockTest, HashUpdate) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, HashUpdate) {
^
Additional context

be/test/vec/core/block_test.cpp:3899: 343 lines including whitespace and comments (threshold 80)

TEST(BlockTest, HashUpdate) {
^

}
}

TEST(BlockTest, CompareAt) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, CompareAt) {
^
Additional context

be/test/vec/core/block_test.cpp:4319: 193 lines including whitespace and comments (threshold 80)

TEST(BlockTest, CompareAt) {
^

}
}

TEST(BlockTest, SameBitOperations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

< null
                ^
Additional context

be/test/vec/core/block_test.cpp:4672: 100 lines including whitespace and comments (threshold 80)

< null
                ^

}
}

TEST(BlockTest, CreateSameStructBlock) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

     }
                ^
Additional context

be/test/vec/core/block_test.cpp:4774: 147 lines including whitespace and comments (threshold 80)

     }
                ^

}
}

TEST(BlockTest, EraseTmpColumns) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

     }
                ^
Additional context

be/test/vec/core/block_test.cpp:4923: 141 lines including whitespace and comments (threshold 80)

     }
                ^

}
}

TEST(BlockTest, ClearColumnMemNotKeep) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

     }
                ^
Additional context

be/test/vec/core/block_test.cpp:5066: 145 lines including whitespace and comments (threshold 80)

     }
                ^

}
}

TEST(BlockTest, StringOperations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

     }
                ^
Additional context

be/test/vec/core/block_test.cpp:5213: 144 lines including whitespace and comments (threshold 80)

     }
                ^

@Yoruet Yoruet requested a review from zclllyybb December 18, 2024 07:14
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

}
}

TEST(BlockTest, HashUpdate) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, HashUpdate) {
^
Additional context

be/test/vec/core/block_test.cpp:3899: 337 lines including whitespace and comments (threshold 80)

TEST(BlockTest, HashUpdate) {
^

}
}

TEST(BlockTest, CompareAt) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, CompareAt) {
^
Additional context

be/test/vec/core/block_test.cpp:4313: 193 lines including whitespace and comments (threshold 80)

TEST(BlockTest, CompareAt) {
^

}
}

TEST(BlockTest, CompareColumnAt) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(BlockTest, CompareColumnAt) {
^
Additional context

be/test/vec/core/block_test.cpp:4508: 156 lines including whitespace and comments (threshold 80)

TEST(BlockTest, CompareColumnAt) {
^

}
}

TEST(BlockTest, SameBitOperations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

< null
                ^
Additional context

be/test/vec/core/block_test.cpp:4666: 100 lines including whitespace and comments (threshold 80)

< null
                ^

}
}

TEST(BlockTest, CreateSameStructBlock) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

     }
                ^
Additional context

be/test/vec/core/block_test.cpp:4768: 145 lines including whitespace and comments (threshold 80)

     }
                ^

}
}

TEST(BlockTest, EraseTmpColumns) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

e));
                ^
Additional context

be/test/vec/core/block_test.cpp:4915: 141 lines including whitespace and comments (threshold 80)

e));
                ^

}
}

TEST(BlockTest, StringOperations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

     }
                ^
Additional context

be/test/vec/core/block_test.cpp:5205: 144 lines including whitespace and comments (threshold 80)

     }
                ^

@Yoruet
Copy link
Contributor Author

Yoruet commented Dec 18, 2024

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17585	7533	7383	7383
q2	2059	182	170	170
q3	10634	1102	1211	1102
q4	10558	767	697	697
q5	7639	2735	2680	2680
q6	241	155	147	147
q7	1007	627	611	611
q8	9246	1863	1884	1863
q9	6621	6442	6426	6426
q10	7045	2326	2308	2308
q11	468	264	255	255
q12	433	225	223	223
q13	17767	2908	2942	2908
q14	241	217	211	211
q15	561	506	505	505
q16	675	587	589	587
q17	985	598	518	518
q18	7364	6781	6668	6668
q19	1341	938	975	938
q20	449	178	180	178
q21	4068	3349	3133	3133
q22	382	315	329	315
Total cold run time: 107369 ms
Total hot run time: 39826 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7266	7257	7235	7235
q2	324	233	228	228
q3	2929	2817	2987	2817
q4	2093	1788	1786	1786
q5	5708	5656	5671	5656
q6	228	143	138	138
q7	2276	1775	1808	1775
q8	3394	3543	3547	3543
q9	8961	9009	9020	9009
q10	3600	3548	3550	3548
q11	602	500	516	500
q12	862	608	585	585
q13	12869	3231	3068	3068
q14	323	277	269	269
q15	556	518	510	510
q16	706	634	646	634
q17	1875	1632	1642	1632
q18	8302	7824	7758	7758
q19	1751	1456	1680	1456
q20	2127	1988	1893	1893
q21	5602	5463	5542	5463
q22	649	615	599	599
Total cold run time: 73003 ms
Total hot run time: 60102 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 196643 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 1ce54ee27d2179baa900854df101b01336a47b61, data reload: false

query1	1316	984	889	889
query2	6263	2485	2303	2303
query3	10947	4942	4729	4729
query4	33655	23414	23416	23414
query5	5161	468	477	468
query6	301	192	187	187
query7	4003	321	311	311
query8	301	242	240	240
query9	9404	2741	2731	2731
query10	506	248	250	248
query11	18013	15140	15215	15140
query12	160	109	102	102
query13	1608	428	427	427
query14	10872	7308	7166	7166
query15	297	177	197	177
query16	8104	433	426	426
query17	1723	619	583	583
query18	2210	301	345	301
query19	373	155	151	151
query20	120	118	122	118
query21	207	105	108	105
query22	4765	4630	4534	4534
query23	34357	33776	33453	33453
query24	10026	2600	2527	2527
query25	614	409	386	386
query26	1216	159	157	157
query27	2334	344	338	338
query28	7414	2502	2488	2488
query29	839	425	434	425
query30	245	147	154	147
query31	1034	822	817	817
query32	87	56	58	56
query33	750	288	296	288
query34	1163	522	550	522
query35	885	765	761	761
query36	1127	959	944	944
query37	147	72	71	71
query38	4298	4172	4131	4131
query39	1470	1486	1467	1467
query40	210	103	103	103
query41	45	43	42	42
query42	121	104	103	103
query43	542	503	500	500
query44	1338	861	826	826
query45	200	167	169	167
query46	1209	712	740	712
query47	2032	1933	1932	1932
query48	412	325	321	321
query49	896	388	397	388
query50	852	404	404	404
query51	7303	7305	7115	7115
query52	105	93	90	90
query53	267	185	194	185
query54	1239	432	414	414
query55	89	76	75	75
query56	268	246	245	245
query57	1311	1153	1192	1153
query58	256	226	224	224
query59	3321	3032	3039	3032
query60	278	257	255	255
query61	108	108	109	108
query62	899	692	693	692
query63	236	190	198	190
query64	3907	667	626	626
query65	3263	3172	3161	3161
query66	772	300	304	300
query67	15829	15582	15527	15527
query68	4972	566	562	562
query69	474	250	243	243
query70	1208	1142	1139	1139
query71	395	274	262	262
query72	6663	4145	4120	4120
query73	787	367	374	367
query74	10415	9000	9031	9000
query75	3433	2670	2669	2669
query76	3398	1063	1161	1063
query77	572	280	281	280
query78	10354	9431	9410	9410
query79	2102	604	621	604
query80	853	429	520	429
query81	546	249	229	229
query82	642	120	121	120
query83	262	149	144	144
query84	236	71	79	71
query85	1683	314	302	302
query86	466	313	304	304
query87	4704	4520	4344	4344
query88	4046	2241	2196	2196
query89	430	297	305	297
query90	2037	189	189	189
query91	139	107	102	102
query92	65	49	55	49
query93	2555	548	545	545
query94	907	293	283	283
query95	354	249	246	246
query96	630	280	280	280
query97	2876	2696	2687	2687
query98	212	199	192	192
query99	1610	1297	1306	1297
Total cold run time: 305649 ms
Total hot run time: 196643 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.03
query2	0.08	0.05	0.04
query3	0.24	0.07	0.07
query4	1.62	0.11	0.11
query5	0.42	0.42	0.40
query6	1.16	0.66	0.66
query7	0.02	0.02	0.02
query8	0.04	0.04	0.04
query9	0.59	0.50	0.49
query10	0.55	0.60	0.57
query11	0.14	0.10	0.10
query12	0.13	0.11	0.12
query13	0.60	0.62	0.59
query14	2.71	2.77	2.88
query15	0.91	0.81	0.82
query16	0.38	0.37	0.39
query17	1.08	1.05	1.04
query18	0.24	0.21	0.21
query19	1.91	1.72	1.98
query20	0.01	0.01	0.01
query21	15.36	0.61	0.59
query22	2.96	2.35	2.31
query23	16.97	0.99	0.76
query24	3.25	1.05	1.64
query25	0.12	0.10	0.16
query26	0.53	0.13	0.13
query27	0.04	0.05	0.03
query28	10.18	1.10	1.07
query29	12.52	3.20	3.14
query30	0.25	0.08	0.06
query31	2.84	0.38	0.38
query32	3.24	0.46	0.45
query33	3.06	3.13	3.18
query34	16.98	4.46	4.51
query35	4.46	4.40	4.43
query36	0.67	0.46	0.48
query37	0.09	0.06	0.06
query38	0.04	0.03	0.03
query39	0.04	0.02	0.02
query40	0.18	0.12	0.13
query41	0.08	0.03	0.02
query42	0.04	0.02	0.02
query43	0.04	0.03	0.03
Total cold run time: 106.81 s
Total hot run time: 32.98 s

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.

3 participants