clickhouse-native 0.8.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/ext/clickhouse_native/client.cpp +112 -28
  3. data/ext/clickhouse_native/extconf.rb +30 -3
  4. data/ext/clickhouse_native/vendor/clickhouse-cpp/.github/workflows/bazel.yml +120 -0
  5. data/ext/clickhouse_native/vendor/clickhouse-cpp/.github/workflows/cross-repo-bug-relay.yml +17 -0
  6. data/ext/clickhouse_native/vendor/clickhouse-cpp/.github/workflows/linux.yml +22 -23
  7. data/ext/clickhouse_native/vendor/clickhouse-cpp/.github/workflows/macos.yml +22 -21
  8. data/ext/clickhouse_native/vendor/clickhouse-cpp/.github/workflows/windows_mingw.yml +29 -36
  9. data/ext/clickhouse_native/vendor/clickhouse-cpp/.github/workflows/windows_msvc.yml +29 -36
  10. data/ext/clickhouse_native/vendor/clickhouse-cpp/.gitignore +6 -0
  11. data/ext/clickhouse_native/vendor/clickhouse-cpp/AI_POLICY.md +13 -0
  12. data/ext/clickhouse_native/vendor/clickhouse-cpp/BUILD.bazel +167 -0
  13. data/ext/clickhouse_native/vendor/clickhouse-cpp/CMakeLists.txt +2 -1
  14. data/ext/clickhouse_native/vendor/clickhouse-cpp/MODULE.bazel +17 -0
  15. data/ext/clickhouse_native/vendor/clickhouse-cpp/MODULE.bazel.lock +503 -0
  16. data/ext/clickhouse_native/vendor/clickhouse-cpp/README.md +32 -6
  17. data/ext/clickhouse_native/vendor/clickhouse-cpp/ci/docker-compose/config.xml +53 -0
  18. data/ext/clickhouse_native/vendor/clickhouse-cpp/ci/docker-compose/users.xml +35 -0
  19. data/ext/clickhouse_native/vendor/clickhouse-cpp/ci/docker-compose.yml +22 -0
  20. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/CMakeLists.txt +11 -0
  21. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/base/sslsocket.cpp +24 -0
  22. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/block.cpp +1 -1
  23. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/block.h +2 -1
  24. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/client.cpp +293 -136
  25. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/client.h +31 -2
  26. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/array.cpp +12 -0
  27. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/array.h +17 -7
  28. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/bool.cpp +79 -0
  29. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/bool.h +62 -0
  30. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/factory.cpp +16 -0
  31. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/itemview.cpp +2 -0
  32. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/itemview.h +6 -2
  33. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/json.cpp +102 -0
  34. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/json.h +82 -0
  35. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/lowcardinality.cpp +2 -1
  36. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/string.cpp +7 -2
  37. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/tuple.cpp +48 -5
  38. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/tuple.h +14 -1
  39. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/query.h +2 -2
  40. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/server_exception.h +0 -3
  41. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/types/type_parser.cpp +43 -0
  42. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/types/type_parser.h +9 -0
  43. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/types/types.cpp +61 -11
  44. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/types/types.h +18 -2
  45. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/version.h +1 -1
  46. data/lib/clickhouse_native/logging.rb +4 -4
  47. data/lib/clickhouse_native/pool.rb +8 -8
  48. data/lib/clickhouse_native/version.rb +1 -1
  49. data/lib/clickhouse_native.rb +1 -0
  50. metadata +15 -2
@@ -15,27 +15,9 @@ on:
15
15
 
16
16
  env:
17
17
  BUILD_TYPE: Release
18
- CLICKHOUSE_USER: default
19
- CLICKHOUSE_PASSWORD: ${{ secrets.INTEGRATIONS_TEAM_TESTS_CLOUD_PASSWORD_SMT_PROD }}
20
-
21
- #
22
- # CLICKHOUSE_HOST: localhost
23
- # CLICKHOUSE_PORT: 9000
24
- # CLICKHOUSE_USER: default
25
- # CLICKHOUSE_PASSWORD:
26
- # CLICKHOUSE_DB: default
27
- #
28
- # CLICKHOUSE_SECURE_HOST: github.demo.trial.altinity.cloud
29
- # CLICKHOUSE_SECURE_PORT: 9440
30
- # CLICKHOUSE_SECURE_USER: demo
31
- # CLICKHOUSE_SECURE_PASSWORD: demo
32
- # CLICKHOUSE_SECURE_DB: default
33
- #
34
- # CLICKHOUSE_SECURE2_HOST: gh-api.clickhouse.tech
35
- # CLICKHOUSE_SECURE2_PORT: 9440
36
- # CLICKHOUSE_SECURE2_USER: explorer
37
- # CLICKHOUSE_SECURE2_PASSWORD:
38
- # CLICKHOUSE_SECURE2_DB: default
18
+
19
+ permissions:
20
+ contents: read
39
21
 
40
22
  jobs:
41
23
  build:
@@ -54,7 +36,7 @@ jobs:
54
36
  shell: msys2 {0}
55
37
 
56
38
  steps:
57
- - uses: actions/checkout@v4
39
+ - uses: actions/checkout@v6
58
40
  with:
59
41
  fetch-depth: 100
60
42
  fetch-tags: true
@@ -73,29 +55,40 @@ jobs:
73
55
  tar
74
56
 
75
57
  - name: Configure CMake
76
- run: cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_TESTS=ON -DCHECK_VERSION=OFF
58
+ run: cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCH_MAP_BOOL_TO_UINT8=OFF -DBUILD_TESTS=ON -DCHECK_VERSION=OFF
77
59
  # -DWITH_OPENSSL=ON was not able to make it work (some strange issues with CA paths, need debug)
78
60
  # -DCHECK_VERSION=OFF since it requires git, which can't be found from within cmake for some reason.
79
61
 
80
62
  - name: Build
81
63
  run: cmake --build build --config ${{env.BUILD_TYPE}} --target all
82
64
 
83
- - name: Start tls offoader proxy
84
- # that mimics non-secure clickhouse running on localhost
85
- # by tunneling queries to remote tls server
86
- # (needed because we can't start real clickhouse instance on windows)
65
+ - name: Enable WSL and Install Dependencies
66
+ uses: Vampire/setup-wsl@v5
67
+ with:
68
+ distribution: Ubuntu-24.04
69
+ additional-packages:
70
+ podman
71
+ podman-compose
72
+
73
+ - name: Start ClickHouse Server
74
+ shell: wsl-bash {0}
75
+ run: |
76
+ echo "Starting ClickHouse container"
77
+ cd $(wslpath -u "${{ github.workspace }}/ci/")
78
+ podman-compose up -d
79
+
80
+ echo "Waiting for ClickHouse to start..."
81
+ timeout 60s bash -c \
82
+ 'until curl -s -o /dev/null -w "%{http_code}" http://localhost:8123 | grep -q "200"; do sleep 2; done'
83
+
84
+ echo "Checking ClickHouse version"
85
+ curl -s http://localhost:8123/?query=SELECT%20VERSION%28%29
86
+
87
+ - name: Ping ClickHouse Server from Windows
87
88
  run: |
88
- wget https://github.com/filimonov/go-tlsoffloader/releases/download/v0.1.2/go-tlsoffloader_0.1.2_Windows_x86_64.tar.gz
89
- tar -xvzf go-tlsoffloader_0.1.2_Windows_x86_64.tar.gz
90
- ./go-tlsoffloader.exe -l localhost:9000 -b ${{ secrets.INTEGRATIONS_TEAM_TESTS_CLOUD_HOST_SMT_PROD }}:9440 &
89
+ curl.exe http://localhost:8123/?query=SELECT%20VERSION%28%29
91
90
 
92
91
  - name: Test
93
- env:
94
- # It is impossible to start CH server in docker on Windows due to github actions limitations,
95
- # so we use remote server to execute tests, some do not allow some features for anonymoust/free users:
96
- # - system.query_log used by 'Client/ClientCase.Query_ID' and 'Client/ClientCase.ClientName'
97
- # - system.opentelemetry_span_log is used by 'Client/ClientCase.TracingContext'
98
- GTEST_FILTER: "-Client/ClientCase.Query_ID*:Client/ClientCase.TracingContext/*:Client/ClientCase.ClientName/*"
99
92
  run: ./build/ut/clickhouse-cpp-ut.exe ${GTEST_FILTER}
100
93
 
101
94
  - name: Test (simple)
@@ -15,60 +15,53 @@ on:
15
15
 
16
16
  env:
17
17
  BUILD_TYPE: Release
18
- CLICKHOUSE_USER: default
19
- CLICKHOUSE_PASSWORD: ${{ secrets.INTEGRATIONS_TEAM_TESTS_CLOUD_PASSWORD_SMT_PROD }}
20
- # CLICKHOUSE_HOST: localhost
21
- # CLICKHOUSE_PORT: 9000
22
- # CLICKHOUSE_USER: default
23
- # CLICKHOUSE_PASSWORD:
24
- # CLICKHOUSE_DB: default
25
- #
26
- # CLICKHOUSE_SECURE_HOST: github.demo.trial.altinity.cloud
27
- # CLICKHOUSE_SECURE_PORT: 9440
28
- # CLICKHOUSE_SECURE_USER: demo
29
- # CLICKHOUSE_SECURE_PASSWORD: demo
30
- # CLICKHOUSE_SECURE_DB: default
31
- #
32
- # CLICKHOUSE_SECURE2_HOST: gh-api.clickhouse.tech
33
- # CLICKHOUSE_SECURE2_PORT: 9440
34
- # CLICKHOUSE_SECURE2_USER: explorer
35
- # CLICKHOUSE_SECURE2_PASSWORD:
36
- # CLICKHOUSE_SECURE2_DB: default
18
+
19
+ permissions:
20
+ contents: read
37
21
 
38
22
  jobs:
39
23
  build:
40
24
  runs-on: windows-latest
41
25
 
42
26
  steps:
43
- - uses: actions/checkout@v4
27
+ - uses: actions/checkout@v6
44
28
  with:
45
29
  fetch-depth: 100
46
30
  fetch-tags: true
47
31
  - uses: ilammy/msvc-dev-cmd@v1
48
32
 
49
33
  - name: Configure CMake
50
- run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_TESTS=ON
34
+ run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCH_MAP_BOOL_TO_UINT8=OFF -DBUILD_TESTS=ON
51
35
 
52
36
  - name: Build
53
37
  run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
54
38
 
55
- - name: Start tls offoader proxy
56
- shell: bash
57
- # that mimics non-secure clickhouse running on localhost
58
- # by tunneling queries to remote tls server
59
- # (needed because we can't start real clickhouse instance on windows)
39
+ - name: Enable WSL and Install Dependencies
40
+ uses: Vampire/setup-wsl@v5
41
+ with:
42
+ distribution: Ubuntu-24.04
43
+ additional-packages:
44
+ podman
45
+ podman-compose
46
+
47
+ - name: Start ClickHouse Server
48
+ shell: wsl-bash {0}
49
+ run: |
50
+ echo "Starting ClickHouse container"
51
+ cd $(wslpath -u "${{ github.workspace }}/ci/")
52
+ podman-compose up -d
53
+
54
+ echo "Waiting for ClickHouse to start..."
55
+ timeout 60s bash -c \
56
+ 'until curl -s -o /dev/null -w "%{http_code}" http://localhost:8123 | grep -q "200"; do sleep 2; done'
57
+
58
+ echo "Checking ClickHouse version"
59
+ curl -s http://localhost:8123/?query=SELECT%20VERSION%28%29
60
+
61
+ - name: Ping ClickHouse Server from Windows
60
62
  run: |
61
- choco install wget
62
- wget https://github.com/filimonov/go-tlsoffloader/releases/download/v0.1.2/go-tlsoffloader_0.1.2_Windows_x86_64.tar.gz
63
- tar -xvzf go-tlsoffloader_0.1.2_Windows_x86_64.tar.gz
64
- ./go-tlsoffloader.exe -l localhost:9000 -b ${{ secrets.INTEGRATIONS_TEAM_TESTS_CLOUD_HOST_SMT_PROD }}:9440 &
63
+ curl.exe http://localhost:8123/?query=SELECT%20VERSION%28%29
65
64
 
66
65
  - name: Test
67
- env:
68
- # It is impossible to start CH server in docker on Windows due to github actions limitations,
69
- # so we use remote server to execute tests, some do not allow some features for anonymoust/free users:
70
- # - system.query_log used by 'Client/ClientCase.Query_ID' and 'Client/ClientCase.ClientName'
71
- # - system.opentelemetry_span_log is used by 'Client/ClientCase.TracingContext'
72
- GTEST_FILTER: "-Client/ClientCase.Query_ID*:Client/ClientCase.TracingContext/*:Client/ClientCase.ClientName/*"
73
66
  working-directory: ${{github.workspace}}/build/ut
74
67
  run: Release\clickhouse-cpp-ut.exe "${{env.GTEST_FILTER}}"
@@ -278,3 +278,9 @@ BUCKAROO_DEPS
278
278
  # Vim
279
279
  *.swp
280
280
  *.swo
281
+
282
+ # clangd cache
283
+ /.cache/clangd
284
+
285
+ # Bazel
286
+ /bazel-*
@@ -0,0 +1,13 @@
1
+ # ClickHouse AI Policy
2
+
3
+ You can use AI for ClickHouse development. We welcome and embrace AI usage, as well as research and experiments with the frontier AI models and novel methods of AI applications for software engineering.
4
+
5
+ You don't have to disclose your usage of AI. You can tell about it, share your experience, and show the methods, but it is not required. AI is a normal developer's tool, similar to an IDE, an OS, or a keyboard. We don't judge your work on the basis of the usage of AI, but we recommend taking efforts to filter out slop before sending a pull request; otherwise, it may negatively affect your reputation as an engineer.
6
+
7
+ When sending generated code, you take the responsibility in the same way as for the code you have manually typed. Take efforts to read and review the code before sending - otherwise it is disrespectful to maintainers. Take efforts to understand the code base, with or without the help of AI. Low-effort pull requests that require high effort from maintainers will be closed. Do not use AI to automate your responses to maintainers.
8
+
9
+ Prefer using AI for improving the code base, such as removing and simplifying code, improving the build speed, improving continuous integration tools and quality checks, reverting bad modifications, security research, and bug fixing. Keep in mind that using AI for implementing big features requires as much design consideration as without AI.
10
+
11
+ When using AI, the same rules around intellectual property apply as with manually written code. Do not copy, reproduce, or include code belonging to others unless its license explicitly permits this use and all license requirements are met. You are responsible for ensuring that you have all required permissions for any submitted code, whether AI-generated or not.
12
+
13
+ We will be happy to participate in research and experiments with AI models and their application methods on top of the ClickHouse code base. It could be: - benchmarks and comparisons of models, testing of models by solving identical tasks, AI reproducibility studies, performance of agentic loops, AI sandboxing, etc. ClickHouse provides an extremely comprehensive test suite to fulfill these studies, and it is one of the most actively developed open-source software in the world. If you want to share your research, you can send a letter to ai@clickhouse.com.
@@ -0,0 +1,167 @@
1
+ load("@bazel_skylib//lib:selects.bzl", "selects")
2
+ load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
3
+ load("@rules_cc//cc:cc_library.bzl", "cc_library")
4
+
5
+ # Bazel build for clickhouse-cpp. The canonical build is CMake
6
+ # (top-level CMakeLists.txt); this file mirrors the same library as
7
+ # a bzlmod target so downstream Bazel projects can depend on it via
8
+ # the Bazel Central Registry without standing up CMake.
9
+ #
10
+ # Differences from the CMake build that callers should be aware of:
11
+ # * TLS links against BoringSSL (`@boringssl`) by default; pass
12
+ # `--@clickhouse-cpp-client//:tls=openssl` to use the BCR OpenSSL module
13
+ # instead, or `--@clickhouse-cpp-client//:tls=no` to disable TLS
14
+ # entirely. `USE_BORINGSSL` ifdef-guards the two OpenSSL-only
15
+ # surfaces (`SSL_CONF_*` command API and `SSL_read_ex`) that
16
+ # BoringSSL doesn't provide; see clickhouse/base/sslsocket.cpp.
17
+ # * lz4 / zstd / abseil come from BCR modules instead of contrib/.
18
+ # cityhash is the exception: it is built from contrib/ because the
19
+ # wire protocol needs ClickHouse's frozen CityHash variant, which
20
+ # differs from the stock BCR module (see the :cityhash target).
21
+
22
+ # Selects the TLS implementation: `--@clickhouse-cpp-client//:tls=boringssl`
23
+ # (default), `--@clickhouse-cpp-client//:tls=openssl`, or
24
+ # `--@clickhouse-cpp-client//:tls=no` to disable TLS entirely (matching
25
+ # CMake's `WITH_OPENSSL=OFF` default). The two TLS libraries come from
26
+ # BCR modules and are linked statically, keeping the build hermetic.
27
+ string_flag(
28
+ name = "tls",
29
+ build_setting_default = "boringssl",
30
+ values = [
31
+ "boringssl",
32
+ "openssl",
33
+ "no",
34
+ ],
35
+ )
36
+
37
+ config_setting(
38
+ name = "tls_boringssl",
39
+ flag_values = {":tls": "boringssl"},
40
+ )
41
+
42
+ config_setting(
43
+ name = "tls_openssl",
44
+ flag_values = {":tls": "openssl"},
45
+ )
46
+
47
+ config_setting(
48
+ name = "tls_no",
49
+ flag_values = {":tls": "no"},
50
+ )
51
+
52
+ # OpenSSL on Windows pulls in Win32 system libraries (the cert store via
53
+ # crypt32, plus user32) that BoringSSL bundles itself. Used to gate the
54
+ # extra linkopts below.
55
+ selects.config_setting_group(
56
+ name = "tls_openssl_on_windows",
57
+ match_all = [
58
+ ":tls_openssl",
59
+ "@platforms//os:windows",
60
+ ],
61
+ )
62
+
63
+ # Vendored CityHash from contrib/, NOT the BCR `@cityhash` module.
64
+ # ClickHouse's wire protocol checksums compressed blocks with a specific
65
+ # frozen CityHash128 variant (see clickhouse/base/compressed.cpp); the
66
+ # stock Google CityHash 1.0.2 that BCR packages produces *different*
67
+ # hashes, so a server rejects compressed blocks with "Checksum doesn't
68
+ # match: corrupted data". This is the exact copy the CMake build uses,
69
+ # guaranteeing byte-identical hashing and wire compatibility.
70
+ cc_library(
71
+ name = "cityhash",
72
+ srcs = [
73
+ "contrib/cityhash/cityhash/city.cc",
74
+ "contrib/cityhash/cityhash/config.h",
75
+ ],
76
+ hdrs = [
77
+ "contrib/cityhash/cityhash/city.h",
78
+ "contrib/cityhash/cityhash/citycrc.h",
79
+ ],
80
+ # config.h gates __builtin_expect off with `#if WIN32 || WIN64`, but
81
+ # MSVC only predefines `_WIN32`/`_WIN64` — under CMake it's CMake that
82
+ # defines WIN32, which Bazel's MSVC toolchain doesn't. Define it here
83
+ # so the GCC/Clang-only builtin isn't used on MSVC.
84
+ copts = select({
85
+ "@platforms//os:windows": ["/DWIN32"],
86
+ "//conditions:default": [],
87
+ }),
88
+ strip_include_prefix = "contrib/cityhash/cityhash",
89
+ )
90
+
91
+ # The main clickhouse-cpp library. Downstream callers use
92
+ # `#include <clickhouse/client.h>` and link `@clickhouse-cpp-client//:clickhouse`.
93
+ cc_library(
94
+ name = "clickhouse",
95
+ srcs = glob(
96
+ [
97
+ "clickhouse/*.cpp",
98
+ "clickhouse/base/*.cpp",
99
+ "clickhouse/columns/*.cpp",
100
+ "clickhouse/types/*.cpp",
101
+ ],
102
+ # Only compiled when TLS is enabled, mirroring CMake's
103
+ # `IF (WITH_OPENSSL)` source-list append.
104
+ exclude = ["clickhouse/base/sslsocket.cpp"],
105
+ ) + select({
106
+ ":tls_no": [],
107
+ "//conditions:default": ["clickhouse/base/sslsocket.cpp"],
108
+ }),
109
+ hdrs = glob([
110
+ "clickhouse/*.h",
111
+ "clickhouse/base/*.h",
112
+ "clickhouse/columns/*.h",
113
+ "clickhouse/types/*.h",
114
+ ]),
115
+ defines = select({
116
+ # `WITH_OPENSSL` enables the TLS code paths in client.cpp /
117
+ # sslsocket.cpp (same macro as the CMake option). `USE_BORINGSSL`
118
+ # takes the BoringSSL-compatible branches in sslsocket.cpp.
119
+ ":tls_boringssl": [
120
+ "WITH_OPENSSL",
121
+ "USE_BORINGSSL",
122
+ ],
123
+ ":tls_openssl": ["WITH_OPENSSL"],
124
+ ":tls_no": [],
125
+ }),
126
+ # Winsock, required by base/socket.cpp et al. Mirrors CMake's
127
+ # `IF (WIN32 OR MINGW)` link block. (The BoringSSL backend already
128
+ # propagates ws2_32 itself; declare it explicitly so the openssl
129
+ # and no-TLS configurations link too.)
130
+ linkopts = select({
131
+ "@platforms//os:windows": [
132
+ "-DEFAULTLIB:ws2_32.lib",
133
+ ],
134
+ "//conditions:default": [],
135
+ }) + select({
136
+ # OpenSSL references the Win32 cert store and user32; declare
137
+ # them so downstream executables link without each consumer
138
+ # having to repeat it. Mirrors CMake's MSVC `Crypt32` link.
139
+ ":tls_openssl_on_windows": [
140
+ "-DEFAULTLIB:crypt32.lib",
141
+ "-DEFAULTLIB:user32.lib",
142
+ ],
143
+ "//conditions:default": [],
144
+ }),
145
+ # Expose headers at their workspace path so both internal
146
+ # (`#include "client.h"` from clickhouse/*.cpp via quote-form
147
+ # source-dir search) and external (`#include <clickhouse/client.h>`)
148
+ # include forms resolve.
149
+ strip_include_prefix = "/",
150
+ visibility = ["//visibility:public"],
151
+ deps = [
152
+ "@abseil-cpp//absl/numeric:int128",
153
+ ":cityhash",
154
+ "@lz4//:lz4",
155
+ "@zstd//:zstd",
156
+ ] + select({
157
+ ":tls_boringssl": [
158
+ "@boringssl//:crypto",
159
+ "@boringssl//:ssl",
160
+ ],
161
+ ":tls_openssl": [
162
+ "@openssl//:crypto",
163
+ "@openssl//:ssl",
164
+ ],
165
+ ":tls_no": [],
166
+ }),
167
+ )
@@ -1,4 +1,4 @@
1
- CMAKE_MINIMUM_REQUIRED (VERSION 3.5.2)
1
+ CMAKE_MINIMUM_REQUIRED (VERSION 3.12)
2
2
 
3
3
  LIST (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
4
4
 
@@ -21,6 +21,7 @@ OPTION (WITH_SYSTEM_ZSTD "Use system ZSTD" OFF)
21
21
  OPTION (DEBUG_DEPENDENCIES "Print debug info about dependencies duting build" ON)
22
22
  OPTION (CHECK_VERSION "Check that version number corresponds to git tag, usefull in CI/CD to validate that new version published on GitHub has same version in sources" OFF)
23
23
  OPTION (DISABLE_CLANG_LIBC_WORKAROUND "Disable linking compiler-rt & gcc_s if using clang & libstdc++" OFF)
24
+ OPTION (CH_MAP_BOOL_TO_UINT8 "Map ClickHouse Bool type to UInt8 instead of exposing a distinct Bool API." ON)
24
25
 
25
26
  PROJECT (CLICKHOUSE-CLIENT
26
27
  VERSION "${CLICKHOUSE_CPP_VERSION}"
@@ -0,0 +1,17 @@
1
+ module(name = "clickhouse-cpp-client", version = "2.6.2")
2
+
3
+ # Pinned to 20260107.1, the last version that declares
4
+ # `compatibility_level = 1`, so that the module remains importable on
5
+ # Bazel < 9.1 whose bazel_tools also depends on a level-1 abseil-cpp.
6
+ # See PR discussion; the attribute is a no-op from Bazel 9.1.0 onwards.
7
+ bazel_dep(name = "abseil-cpp", version = "20260107.1")
8
+ bazel_dep(name = "bazel_skylib", version = "1.9.0")
9
+ bazel_dep(name = "boringssl", version = "0.20260526.0")
10
+ bazel_dep(name = "lz4", version = "1.10.0.bcr.1")
11
+ bazel_dep(name = "openssl", version = "3.5.5.bcr.4")
12
+ bazel_dep(name = "platforms", version = "1.1.0")
13
+ bazel_dep(name = "rules_cc", version = "0.2.19")
14
+ bazel_dep(name = "zstd", version = "1.5.7.bcr.1")
15
+
16
+ # Test-only dependencies; not pulled in by consumers of the library.
17
+ bazel_dep(name = "googletest", version = "1.17.0.bcr.2", dev_dependency = True)