Skip to content

Commit b3c7ee7

Browse files
authored
Merge pull request #383 from chdb-io/update_ch_core
Feat(upgrade): update ch core to v25.8.2.29
2 parents da7f3b8 + b0cab40 commit b3c7ee7

File tree

4,196 files changed

+194489
-54140
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,196 files changed

+194489
-54140
lines changed

.clang-tidy

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
HeaderFilterRegex: '^.*/(base|src|programs|utils)/.*(h|hpp)$'
99

10+
# We don't want to use clang-tidy diagnostics in the "contrib" folder.
11+
ExcludeHeaderFilterRegex: '^.*/contrib/.*'
12+
1013
Checks: [
1114
'*',
1215

@@ -28,6 +31,7 @@ Checks: [
2831
'-bugprone-unchecked-optional-access',
2932
'-bugprone-crtp-constructor-accessibility',
3033
'-bugprone-not-null-terminated-result',
34+
'-bugprone-forward-declaration-namespace',
3135

3236
'-cert-dcl16-c',
3337
'-cert-err58-cpp',

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ tests/ci/cancel_and_rerun_workflow_lambda/app.py
1717
- Not for changelog (changelog entry is not required)
1818

1919

20-
### Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
20+
### Changelog entry (a [user-readable short description](https://github.com/ClickHouse/ClickHouse/blob/master/docs/changelog_entry_guidelines.md) of the changes that goes into CHANGELOG.md):
2121
...
2222

2323
### Documentation entry for user-facing changes

.github/workflows/build_linux_arm64_wheels-gh.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,13 @@ jobs:
106106
python -m pip install setuptools tox pandas pyarrow twine psutil deltalake wheel
107107
pyenv shell --unset
108108
done
109+
- name: Upgrade Rust toolchain
110+
run: |
111+
rustup toolchain install nightly-2025-07-07
112+
rustup default nightly-2025-07-07
113+
rustup component add rust-src
114+
rustc --version
115+
cargo --version
109116
- name: Install clang++ for Ubuntu
110117
run: |
111118
pwd
@@ -116,6 +123,13 @@ jobs:
116123
which clang++-19
117124
clang++-19 --version
118125
sudo apt-get install -y make cmake ccache ninja-build yasm gawk wget
126+
# Install WebAssembly linker (wasm-ld)
127+
sudo apt-get install -y lld-19
128+
# Create symlink for wasm-ld
129+
if ! command -v wasm-ld &> /dev/null; then
130+
sudo ln -sf /usr/bin/wasm-ld-19 /usr/bin/wasm-ld || true
131+
fi
132+
which wasm-ld || echo "wasm-ld not found in PATH"
119133
ccache -s
120134
- name: Update git
121135
run: |
@@ -148,6 +162,7 @@ jobs:
148162
run: |
149163
export PATH="$HOME/.pyenv/bin:$PATH"
150164
eval "$(pyenv init -)"
165+
source ~/.cargo/env
151166
pyenv shell 3.8
152167
export CC=/usr/bin/clang
153168
export CXX=/usr/bin/clang++
@@ -161,6 +176,7 @@ jobs:
161176
export CC=/usr/bin/clang
162177
export CXX=/usr/bin/clang++
163178
export PATH="$HOME/.pyenv/bin:$PATH"
179+
source ~/.cargo/env
164180
eval "$(pyenv init -)"
165181
pyenv shell 3.8
166182
bash ./chdb/build/build_static_lib.sh

.github/workflows/build_linux_x86_wheels.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,13 @@ jobs:
106106
python -m pip install setuptools tox pandas pyarrow twine psutil deltalake wheel
107107
pyenv shell --unset
108108
done
109+
- name: Upgrade Rust toolchain
110+
run: |
111+
rustup toolchain install nightly-2025-07-07
112+
rustup default nightly-2025-07-07
113+
rustup component add rust-src
114+
rustc --version
115+
cargo --version
109116
- name: Install clang++ for Ubuntu
110117
run: |
111118
pwd
@@ -116,6 +123,13 @@ jobs:
116123
which clang++-19
117124
clang++-19 --version
118125
sudo apt-get install -y make cmake ccache ninja-build yasm gawk wget
126+
# Install WebAssembly linker (wasm-ld)
127+
sudo apt-get install -y lld-19
128+
# Create symlink for wasm-ld
129+
if ! command -v wasm-ld &> /dev/null; then
130+
sudo ln -sf /usr/bin/wasm-ld-19 /usr/bin/wasm-ld || true
131+
fi
132+
which wasm-ld || echo "wasm-ld not found in PATH"
119133
ccache -s
120134
- name: Update git
121135
run: |
@@ -148,6 +162,7 @@ jobs:
148162
run: |
149163
export PATH="$HOME/.pyenv/bin:$PATH"
150164
eval "$(pyenv init -)"
165+
source ~/.cargo/env
151166
pyenv shell 3.8
152167
export CC=/usr/bin/clang
153168
export CXX=/usr/bin/clang++
@@ -161,6 +176,7 @@ jobs:
161176
export CC=/usr/bin/clang
162177
export CXX=/usr/bin/clang++
163178
export PATH="$HOME/.pyenv/bin:$PATH"
179+
source ~/.cargo/env
164180
eval "$(pyenv init -)"
165181
pyenv shell 3.8
166182
bash ./chdb/build/build_static_lib.sh

.github/workflows/build_macos_arm64_wheels.yml

Lines changed: 15 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -79,61 +79,37 @@ jobs:
7979
brew install ca-certificates lz4 mpdecimal readline sqlite xz z3 zstd
8080
brew install openssl@3 || echo "OpenSSL install failed, continuing..."
8181
brew install --ignore-dependencies llvm@19
82-
brew install git ninja libtool gettext binutils grep findutils nasm
83-
# brew install gcc || echo "GCC install failed, continuing..."
84-
# brew install ccache || echo "ccache installation failed, continuing without it"
82+
brew install git ninja libtool gettext binutils grep findutils nasm lld@19 libiconv
8583
brew install go
8684
cd /usr/local/opt/ && sudo rm -f llvm && sudo ln -sf llvm@19 llvm
87-
export PATH=$(brew --prefix llvm@19)/bin:$PATH
85+
export PATH=$(brew --prefix llvm@19)/bin:$(brew --prefix lld@19)/bin:$PATH
8886
which clang++
8987
clang++ --version
88+
which wasm-ld || echo "wasm-ld not found in PATH"
9089
which go
9190
go version
92-
ccache -s || echo "ccache not available yet"
93-
- name: Scan SQLite vulnerabilities with grype
91+
ccache -s | echo "ccache not available yet"
92+
- name: Upgrade Rust toolchain
9493
run: |
95-
# Install grype
96-
curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh -s -- -b /usr/local/bin
97-
98-
# Update grype vulnerability database
99-
grype db update
100-
101-
# Check SQLite vulnerabilities in Homebrew packages
102-
echo "Scanning SQLite packages for vulnerabilities..."
103-
GRYPE_RAW_OUTPUT=$(grype dir:/opt/homebrew --scope all-layers 2>/dev/null || true)
104-
echo "Raw grype output:"
105-
echo "$GRYPE_RAW_OUTPUT"
106-
107-
SQLITE_SCAN_OUTPUT=$(echo "$GRYPE_RAW_OUTPUT" | grep -i sqlite || true)
108-
109-
if [ -n "$SQLITE_SCAN_OUTPUT" ]; then
110-
echo "❌ SQLite vulnerabilities found in packages! Build should be reviewed."
111-
echo "SQLite vulnerability details:"
112-
echo "$SQLITE_SCAN_OUTPUT"
113-
exit 1
114-
else
115-
echo "✅ No SQLite vulnerabilities found"
116-
fi
117-
continue-on-error: false
94+
rustup toolchain install nightly-2025-07-07
95+
rustup default nightly-2025-07-07
96+
rustup component add rust-src
97+
rustc --version
98+
cargo --version
11899
- uses: actions/checkout@v3
119100
with:
120101
fetch-depth: 0
121102
- name: Update submodules
122103
run: |
123104
git submodule update --init --recursive --jobs 4
124-
# - name: ccache
125-
# uses: hendrikmuhs/[email protected]
126-
# with:
127-
# key: macos-13-xlarge
128-
# max-size: 5G
129-
# append-timestamp: true
130105
- name: Run chdb/build.sh
131106
timeout-minutes: 600
132107
run: |
133108
export PATH="$HOME/.pyenv/bin:$PATH"
134109
eval "$(pyenv init -)"
110+
source ~/.cargo/env
135111
pyenv shell 3.8
136-
export PATH=$(brew --prefix llvm@19)/bin:/usr/local/opt/grep/libexec/gnubin:/usr/local/opt/binutils/bin:$PATH:/usr/local/opt/findutils/libexec/gnubin
112+
export PATH=$(brew --prefix llvm@19)/bin:$(brew --prefix lld@19)/bin:/usr/local/opt/grep/libexec/gnubin:/usr/local/opt/binutils/bin:$PATH:/usr/local/opt/findutils/libexec/gnubin
137113
export CC=$(brew --prefix llvm@19)/bin/clang
138114
export CXX=$(brew --prefix llvm@19)/bin/clang++
139115
bash gen_manifest.sh
@@ -143,9 +119,10 @@ jobs:
143119
- name: Run chdb/build/build_static_lib.sh
144120
timeout-minutes: 600
145121
run: |
146-
export PATH=$HOME/.pyenv/bin:$(brew --prefix llvm@19)/bin:/usr/local/opt/grep/libexec/gnubin:/usr/local/opt/binutils/bin:$PATH:/usr/local/opt/findutils/libexec/gnubin
122+
export PATH=$HOME/.pyenv/bin:$(brew --prefix llvm@19)/bin:$(brew --prefix lld@19)/bin:/usr/local/opt/grep/libexec/gnubin:/usr/local/opt/binutils/bin:$PATH:/usr/local/opt/findutils/libexec/gnubin
147123
export CC=$(brew --prefix llvm@19)/bin/clang
148124
export CXX=$(brew --prefix llvm@19)/bin/clang++
125+
source ~/.cargo/env
149126
eval "$(pyenv init -)"
150127
pyenv shell 3.8
151128
bash ./chdb/build/build_static_lib.sh
@@ -168,28 +145,23 @@ jobs:
168145
- name: Scan chdb libraries with grype
169146
run: |
170147
echo "Scanning chdb libraries for vulnerabilities..."
171-
172148
# Files to scan
173149
FILES_TO_SCAN=""
174150
[ -f libchdb.so ] && FILES_TO_SCAN="$FILES_TO_SCAN libchdb.so"
175151
[ -f libchdb.a ] && FILES_TO_SCAN="$FILES_TO_SCAN libchdb.a"
176152
FILES_TO_SCAN="$FILES_TO_SCAN $(find chdb/ \( -name "*.dylib" -o -name "*.so" \) 2>/dev/null || true)"
177-
178153
SQLITE_VULNERABILITIES_FOUND=false
179-
180154
for file in $FILES_TO_SCAN; do
181155
if [ -f "$file" ]; then
182156
echo "=== Scanning $file ==="
183157
SCAN_OUTPUT=$(grype "$file" 2>/dev/null || true)
184158
echo "$SCAN_OUTPUT"
185-
186159
if echo "$SCAN_OUTPUT" | grep -qi sqlite; then
187160
echo "❌ SQLite vulnerability found in $file"
188161
SQLITE_VULNERABILITIES_FOUND=true
189162
fi
190163
fi
191164
done
192-
193165
if [ "$SQLITE_VULNERABILITIES_FOUND" = true ]; then
194166
echo "❌ SQLite vulnerabilities detected in chdb libraries!"
195167
exit 1
@@ -200,26 +172,11 @@ jobs:
200172
- name: Run libchdb stub in examples dir
201173
run: |
202174
bash -x ./examples/runStub.sh
203-
# - name: Keep killall ccache and wait for ccache to finish
204-
# if: always()
205-
# run: |
206-
# sleep 60
207-
# while ps -ef | grep ccache | grep -v grep; do \
208-
# killall ccache || true; \
209-
# sleep 10; \
210-
# done
211-
# - name: Check ccache statistics
212-
# run: |
213-
# ccache -s || echo "ccache not available"
214-
# ls -lh chdb
215-
# df -h
216-
# env:
217-
# CIBW_ENVIRONMENT_MACOS: "PATH=$(brew --prefix llvm@19)/bin:/usr/local/opt/grep/libexec/gnubin:/usr/local/opt/binutils/bin:$PATH:/usr/local/opt/findutils/libexec/gnubin CC=$(brew --prefix llvm@19)/bin/clang CXX=$(brew --prefix llvm@19)/bin/clang++"
218175
- name: Build wheels
219176
run: |
220177
export PATH="$HOME/.pyenv/bin:$PATH"
221178
eval "$(pyenv init -)"
222-
export PATH=$(brew --prefix llvm@19)/bin:/usr/local/opt/grep/libexec/gnubin:/usr/local/opt/binutils/bin:$PATH:/usr/local/opt/findutils/libexec/gnubin
179+
export PATH=$(brew --prefix llvm@19)/bin:$(brew --prefix lld@19)/bin:/usr/local/opt/grep/libexec/gnubin:/usr/local/opt/binutils/bin:$PATH:/usr/local/opt/findutils/libexec/gnubin
223180
export CC=$(brew --prefix llvm@19)/bin/clang
224181
export CXX=$(brew --prefix llvm@19)/bin/clang++
225182
pyenv shell 3.8

.github/workflows/build_macos_x86_wheels.yml

Lines changed: 17 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -78,32 +78,28 @@ jobs:
7878
brew update
7979
brew install ca-certificates lz4 mpdecimal openssl@3 readline sqlite xz z3 zstd
8080
brew install --ignore-dependencies llvm@19
81-
brew install git ninja libtool gettext gcc binutils grep findutils nasm
81+
brew install git ninja libtool gettext gcc binutils grep findutils nasm lld@19 libiconv
8282
brew install ccache || echo "ccache installation failed, continuing without it"
8383
brew install go
8484
cd /usr/local/opt/ && sudo rm -f llvm && sudo ln -sf llvm@19 llvm
85-
export PATH=$(brew --prefix llvm@19)/bin:$PATH
85+
export PATH=$(brew --prefix llvm@19)/bin:$(brew --prefix lld@19)/bin:$PATH
8686
which clang++
8787
clang++ --version
8888
which go
8989
go version
90-
ccache -s
90+
ccache -s || echo "ccache not available yet"
9191
- name: Scan SQLite vulnerabilities with grype
9292
run: |
9393
# Install grype
9494
curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh -s -- -b /usr/local/bin
95-
9695
# Update grype vulnerability database
9796
grype db update
98-
9997
# Check SQLite vulnerabilities in Homebrew packages
10098
echo "Scanning SQLite packages for vulnerabilities..."
101-
GRYPE_RAW_OUTPUT=$(grype dir:/usr/local --scope all-layers 2>/dev/null || true)
99+
GRYPE_RAW_OUTPUT=$(grype dir:/opt/homebrew --scope all-layers 2>/dev/null || true)
102100
echo "Raw grype output:"
103101
echo "$GRYPE_RAW_OUTPUT"
104-
105102
SQLITE_SCAN_OUTPUT=$(echo "$GRYPE_RAW_OUTPUT" | grep -i sqlite || true)
106-
107103
if [ -n "$SQLITE_SCAN_OUTPUT" ]; then
108104
echo "❌ SQLite vulnerabilities found in packages! Build should be reviewed."
109105
echo "SQLite vulnerability details:"
@@ -113,25 +109,27 @@ jobs:
113109
echo "✅ No SQLite vulnerabilities found"
114110
fi
115111
continue-on-error: false
112+
- name: Upgrade Rust toolchain
113+
run: |
114+
rustup toolchain install nightly-2025-07-07
115+
rustup default nightly-2025-07-07
116+
rustup component add rust-src
117+
rustc --version
118+
cargo --version
116119
- uses: actions/checkout@v3
117120
with:
118121
fetch-depth: 0
119122
- name: Update submodules
120123
run: |
121124
git submodule update --init --recursive --jobs 4
122-
- name: ccache
123-
uses: hendrikmuhs/[email protected]
124-
with:
125-
key: macos-14-x86_64
126-
max-size: 5G
127-
append-timestamp: true
128125
- name: Run chdb/build.sh
129126
timeout-minutes: 600
130127
run: |
131128
export PATH="$HOME/.pyenv/bin:$PATH"
132129
eval "$(pyenv init -)"
130+
source ~/.cargo/env
133131
pyenv shell 3.8
134-
export PATH=$(brew --prefix llvm@19)/bin:/usr/local/opt/grep/libexec/gnubin:/usr/local/opt/binutils/bin:$PATH:/usr/local/opt/findutils/libexec/gnubin
132+
export PATH=$(brew --prefix llvm@19)/bin:$(brew --prefix lld@19)/bin:/usr/local/opt/grep/libexec/gnubin:/usr/local/opt/binutils/bin:$PATH:/usr/local/opt/findutils/libexec/gnubin
135133
export CC=$(brew --prefix llvm@19)/bin/clang
136134
export CXX=$(brew --prefix llvm@19)/bin/clang++
137135
bash gen_manifest.sh
@@ -142,9 +140,10 @@ jobs:
142140
- name: Run chdb/build/build_static_lib.sh
143141
timeout-minutes: 600
144142
run: |
145-
export PATH=$HOME/.pyenv/bin:$(brew --prefix llvm@19)/bin:/usr/local/opt/grep/libexec/gnubin:/usr/local/opt/binutils/bin:$PATH:/usr/local/opt/findutils/libexec/gnubin
143+
export PATH=$HOME/.pyenv/bin:$(brew --prefix llvm@19)/bin:$(brew --prefix lld@19)/bin:/usr/local/opt/grep/libexec/gnubin:/usr/local/opt/binutils/bin:$PATH:/usr/local/opt/findutils/libexec/gnubin
146144
export CC=$(brew --prefix llvm@19)/bin/clang
147145
export CXX=$(brew --prefix llvm@19)/bin/clang++
146+
source ~/.cargo/env
148147
eval "$(pyenv init -)"
149148
pyenv shell 3.8
150149
bash ./chdb/build/build_static_lib.sh
@@ -167,28 +166,23 @@ jobs:
167166
- name: Scan chdb libraries with grype
168167
run: |
169168
echo "Scanning chdb libraries for vulnerabilities..."
170-
171169
# Files to scan
172170
FILES_TO_SCAN=""
173171
[ -f libchdb.so ] && FILES_TO_SCAN="$FILES_TO_SCAN libchdb.so"
174172
[ -f libchdb.a ] && FILES_TO_SCAN="$FILES_TO_SCAN libchdb.a"
175173
FILES_TO_SCAN="$FILES_TO_SCAN $(find chdb/ \( -name "*.dylib" -o -name "*.so" \) 2>/dev/null || true)"
176-
177174
SQLITE_VULNERABILITIES_FOUND=false
178-
179175
for file in $FILES_TO_SCAN; do
180176
if [ -f "$file" ]; then
181177
echo "=== Scanning $file ==="
182178
SCAN_OUTPUT=$(grype "$file" 2>/dev/null || true)
183179
echo "$SCAN_OUTPUT"
184-
185180
if echo "$SCAN_OUTPUT" | grep -qi sqlite; then
186181
echo "❌ SQLite vulnerability found in $file"
187182
SQLITE_VULNERABILITIES_FOUND=true
188183
fi
189184
fi
190185
done
191-
192186
if [ "$SQLITE_VULNERABILITIES_FOUND" = true ]; then
193187
echo "❌ SQLite vulnerabilities detected in chdb libraries!"
194188
exit 1
@@ -199,26 +193,12 @@ jobs:
199193
- name: Run libchdb stub in examples dir
200194
run: |
201195
bash -x ./examples/runStub.sh
202-
- name: Keep killall ccache and wait for ccache to finish
203-
if: always()
204-
run: |
205-
sleep 60
206-
while ps -ef | grep ccache | grep -v grep; do \
207-
killall ccache; \
208-
sleep 10; \
209-
done
210-
- name: Check ccache statistics
211-
run: |
212-
ccache -s
213-
ls -lh chdb
214-
df -h
215-
env:
216-
CIBW_ENVIRONMENT_MACOS: "PATH=$(brew --prefix llvm@19)/bin:/usr/local/opt/grep/libexec/gnubin:/usr/local/opt/binutils/bin:$PATH:/usr/local/opt/findutils/libexec/gnubin CC=$(brew --prefix llvm@19)/bin/clang CXX=$(brew --prefix llvm@19)/bin/clang++"
217196
- name: Build wheels
218197
run: |
219198
export PATH="$HOME/.pyenv/bin:$PATH"
220199
eval "$(pyenv init -)"
221-
export PATH=$(brew --prefix llvm@19)/bin:/usr/local/opt/grep/libexec/gnubin:/usr/local/opt/binutils/bin:$PATH:/usr/local/opt/findutils/libexec/gnubin
200+
source ~/.cargo/env
201+
export PATH=$(brew --prefix llvm@19)/bin:$(brew --prefix lld@19)/bin:/usr/local/opt/grep/libexec/gnubin:/usr/local/opt/binutils/bin:$PATH:/usr/local/opt/findutils/libexec/gnubin
222202
export CC=$(brew --prefix llvm@19)/bin/clang
223203
export CXX=$(brew --prefix llvm@19)/bin/clang++
224204
pyenv shell 3.8

0 commit comments

Comments
 (0)