Skip to content

Commit 6eee617

Browse files
artpaulfilimonov
authored andcommitted
use absl for int128
1 parent cb10171 commit 6eee617

File tree

17 files changed

+4481
-2
lines changed

17 files changed

+4481
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ PROJECT (CLICKHOUSE-CLIENT)
2828

2929
SUBDIRS (
3030
clickhouse
31+
contrib/absl
3132
contrib/cityhash
3233
contrib/lz4
3334
)

clickhouse/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,14 @@ SET ( clickhouse-cpp-lib-src
3333
ADD_LIBRARY (clickhouse-cpp-lib SHARED ${clickhouse-cpp-lib-src})
3434
SET_TARGET_PROPERTIES(clickhouse-cpp-lib PROPERTIES LINKER_LANGUAGE CXX)
3535
TARGET_LINK_LIBRARIES (clickhouse-cpp-lib
36+
absl-lib
3637
cityhash-lib
3738
lz4-lib
3839
)
3940

4041
ADD_LIBRARY (clickhouse-cpp-lib-static STATIC ${clickhouse-cpp-lib-src})
4142
TARGET_LINK_LIBRARIES (clickhouse-cpp-lib-static
43+
absl-lib
4244
cityhash-lib
4345
lz4-lib
4446
)

clickhouse/columns/numeric.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#pragma once
22

33
#include "column.h"
4+
#include "absl/numeric/int128.h"
45

56
namespace clickhouse {
67

@@ -54,7 +55,7 @@ class ColumnVector : public Column {
5455
std::vector<T> data_;
5556
};
5657

57-
using Int128 = __int128;
58+
using Int128 = absl::int128;
5859
using Int64 = int64_t;
5960

6061
using ColumnUInt8 = ColumnVector<uint8_t>;

clickhouse/types/types.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#pragma once
22

3+
#include "absl/numeric/int128.h"
4+
35
#include <map>
46
#include <memory>
57
#include <string>
@@ -257,7 +259,7 @@ inline TypeRef Type::CreateSimple<int64_t>() {
257259
}
258260

259261
template <>
260-
inline TypeRef Type::CreateSimple<__int128>() {
262+
inline TypeRef Type::CreateSimple<absl::int128>() {
261263
return TypeRef(new Type(Int128));
262264
}
263265

contrib/absl/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ADD_LIBRARY (absl-lib STATIC
2+
numeric/int128.cc
3+
)

0 commit comments

Comments
 (0)