Maksim Kita. Guide to your first contribution to ClickHouse.

In this video Maksim shows typical workflow with ClickHouse codebase
To give an overview of CH development he is implementing SHOW SETTING server feature.

Read more at Maksim’s blog .

Useful commands
Install Prerequisites
sudo apt-get install git cmake ccache python3 ninja-build nasm yasm gawk lsb-release wget software-properties-common gnupg

Install and Use the Clang compiler
chmod +x
sudo ./ 17
sudo ./ 17 all

Clone ClickHouse repository
git clone
cd ClickHouse
git submodule update –init –recursive

Build ClickHouse
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=/usr/bin/clang++-17 -DCMAKE_C_COMPILER=/usr/bin/clang-17
ninja -j64

Copy compiler_commands.json to ClickHouse folder
cd ..
cp build/compiler_commands.json .

Start ClickHouse server
cd build
cd programs
./clickhouse server

Start ClickHouse client
cd build
cd programs
./clickhouse client

Work with ClickHouse tables
CREATE TABLE test_table (id UInt64, value String) ENGINE=MergeTree ORDER BY id;
INSERT INTO test_table VALUES(0, ’Value’);
SELECT * FROM test_table;
SELECT id, value FROM test_table;
USE system
USE default
SELECT * FROM system.settings FORMAT Vertical;
SELECT * FROM system.settings WHERE name = ‘max_threads‘ FORMAT Vertical;

Check style
sudo utils/check-style/check-style – n

Add git fork
git remote add clickhouse_fork your_fork_goes_here

Git push
git push –set-upstream clickhouse_fork your_branch_goes_here

Information referenced in this video:

Previous interview with Maksim


Leave a Reply

Your email address will not be published. Required fields are marked *