@@ -8,18 +8,15 @@ using namespace clickhouse;
88}
99
1010std::vector<uint32_t > MakeNumbers () {
11- return std::vector<uint32_t >
12- {1 , 2 , 3 , 7 , 11 , 13 , 17 , 19 , 23 , 29 , 31 };
11+ return std::vector<uint32_t > {1 , 2 , 3 , 7 , 11 , 13 , 17 , 19 , 23 , 29 , 31 };
1312}
1413
1514std::vector<uint8_t > MakeBools () {
16- return std::vector<uint8_t >
17- {1 , 0 , 0 , 0 , 1 , 1 , 0 , 1 , 1 , 1 , 0 };
15+ return std::vector<uint8_t > {1 , 0 , 0 , 0 , 1 , 1 , 0 , 1 , 1 , 1 , 0 };
1816}
1917
2018std::vector<std::string> MakeFixedStrings (size_t string_size) {
21- std::vector<std::string> result
22- {" aaa" , " bbb" , " ccc" , " ddd" };
19+ std::vector<std::string> result {" aaa" , " bbb" , " ccc" , " ddd" };
2320
2421 std::for_each (result.begin (), result.end (), [string_size](auto & value) {
2522 value.resize (string_size, ' \0 ' );
@@ -29,15 +26,16 @@ std::vector<std::string> MakeFixedStrings(size_t string_size) {
2926}
3027
3128std::vector<std::string> MakeStrings () {
32- return std::vector<std::string>
33- {" a" , " ab" , " abc" , " abcd" };
29+ return {" a" , " ab" , " abc" , " abcd" };
3430}
3531
36- std::vector<uint64_t > MakeUUIDs () {
37- return std::vector<uint64_t >
38- {0xbb6a8c699ab2414cllu, 0x86697b7fd27f0825llu,
39- 0x84b9f24bc26b49c6llu, 0xa03b4ab723341951llu,
40- 0x3507213c178649f9llu, 0x9faf035d662f60aellu};
32+ std::vector<UInt128> MakeUUIDs () {
33+ return {
34+ UInt128 (0llu, 0llu),
35+ UInt128 (0xbb6a8c699ab2414cllu, 0x86697b7fd27f0825llu),
36+ UInt128 (0x84b9f24bc26b49c6llu, 0xa03b4ab723341951llu),
37+ UInt128 (0x3507213c178649f9llu, 0x9faf035d662f60aellu)
38+ };
4139}
4240
4341std::vector<Int64> MakeDateTime64s (size_t scale, size_t values_size) {
@@ -76,6 +74,20 @@ std::vector<clickhouse::Int64> MakeDateTimes() {
7674 };
7775}
7876
77+ std::vector<clickhouse::Int128> MakeInt128s () {
78+ return {
79+ absl::MakeInt128 (0xffffffffffffffffll , 0xffffffffffffffffll ), // -1
80+ absl::MakeInt128 (0 , 0xffffffffffffffffll ), // 2^64
81+ absl::MakeInt128 (0xffffffffffffffffll , 0 ),
82+ absl::MakeInt128 (0x8000000000000000ll , 0 ),
83+ Int128 (0 )
84+ };
85+ }
86+
87+ std::vector<clickhouse::Int128> MakeDecimals (size_t /* precision*/ , size_t /* scale*/ ) {
88+ return MakeInt128s ();
89+ }
90+
7991std::string FooBarGenerator (size_t i) {
8092 std::string result;
8193 if (i % 3 == 0 )
0 commit comments