SlideShare a Scribd company logo
1 of 64
Download to read offline
ClickHouse 101
Building ClickHouse and Making Your First
Contribution: A Tutorial
Vasily Nemkov @ Altinity 06.10.2021
About me
Server team lead @ Altinity
working on CH for ~3 years now
~70 merged PRs in CH
IPv4 and IPv6 datatype
Gorilla and DoubleDelta codecs
DateTime64 datatype + extended range for date/time*
system.session_log
+ many others
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
2
About Altinity
The #1 enterprise ClickHouse provider

Now offering Altinity.Cloud

Major committer and community sponsor for ClickHouse in US/EU
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
3
Overview
What CH is
How to
Clone
Make changes
Build
Run tests
Submit a PR
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
4
What ClickHouse is
an OLAP DBMS [0][1]
Open source software [2]
fastest growing open source project now
highly optimized modern C++
~0.5M LOC (excluding third-party)
80-ish third-party libraries
Lots of tests
Docs are in the repo [3]
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
5
Why contribute
Fastest way to have a bug fixed or feature implemented
Learn a lot in the process
Fame
system.contributors
ClickHouse merged contributors badge
Arctic Code Vault Contributor [4]
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
6
Ways to contribute
Benchmarks
Docs
Tests
Code [5]
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
7
The Flow
Review Release
Development
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
8
Development
Review Release
Development
clone
change
build
test
commit & push
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
9
Clone
Review Release
Development
clone
change
build
test
commit & push
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
10
Clone
Make a fork (if you are going to contribute changes to the community)
Clone repo and fetch submodules
$ cd ~
$ git clone https://github.com/ClickHouse/ClickHouse.git ClickHouse
$ cd ClickHouse
$ git submodule update --init --recursive
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
11
Make changes
Review Release
Development
clone
change
build
test
commit & push
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
12
Make changes - complexity hierarchy
[7]
Functions: regular, aggregate,
table-function
Data format
Table Engine
Codec ( None , LZ4 , DoubleDelta )
SQL feature: clause ( UNION ALL ),
section ( LIMIT BY ), request type (
SYSTEM )
DB engine
Dictionaries: layout, source
Data type ( UUID )
Client/server protocol
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
13
Make changes
We are going to add a helloWorld() function
SELECT helloWorld();
"Hello World!"
Follow guides [8]
$ vim ~/ClickHouse/src/Functions/helloWorld.cpp
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
14
Make changes
#include <DataTypes/DataTypeString.h>
#include <Functions/IFunction.h>
#include <Functions/FunctionFactory.h>
#include <Core/Field.h>
namespace DB
{
class FunctionHelloWorld : public IFunction
{
public:
static constexpr auto name = "helloWorld";
static FunctionPtr create(ContextPtr) { return std::make_shared<FunctionHelloWorld>(); }
String getName() const override { return name; }
bool useDefaultImplementationForConstants() const override { return true; }
bool isSuitableForShortCircuitArgumentsExecution(const DataTypesWithConstInfo &) const override { return false; }
size_t getNumberOfArguments() const override { return 0; }
DataTypePtr getReturnTypeImpl(const DataTypes &) const override { return std::make_shared<DataTypeString>(); }
ColumnPtr executeImpl(const ColumnsWithTypeAndName &, const DataTypePtr & result_type, size_t input_rows_count) const override
{
return result_type->createColumnConst(input_rows_count, "Hello World!");
}
};
void registerFunctionHelloWrold(FunctionFactory & factory)
{
factory.registerFunction<FunctionHelloWorld>();
}
}
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
15
Make changes
diff --git a/src/Functions/registerFunctions.cpp b/src/Functions/registerFunctions.cpp
index 9b1a7faebb..0451ff0ead 100644
--- a/src/Functions/registerFunctions.cpp
+++ b/src/Functions/registerFunctions.cpp
@@ -68,2 +68,5 @@ void registerFunctionAESDecryptMysql(FunctionFactory & factory);
+void registerFunctionHelloWorld(FunctionFactory & factory);
+
void registerFunctions()
@@ -132,2 +135,3 @@ void registerFunctions()
registerFunctionLogTrace(factory);
+ registerFunctionHelloWorld(factory);
}
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
16
Build
Review Release
Development
clone
change
build
test
commit & push
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
17
Build
Build in Docker
Can produce .deb , .rpm and .tar.gz
Easy to set up - no prerequisites, only docker
any OS
Build on Host
More suitable for development process (i.e. developing CH core)
Ubuntu, Prerequisites
faster (~2x)
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
18
Build - Hardware Requirements
16GB of RAM (32 is better)
multiple cores (4+)
20-50GB on disk
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
19
Build in Docker
$ docker run 
--network=host 
--rm 
--volume=$(realpath ./PACKAGES):/output 
--volume=$(realpath .):/build 
-e DEB_CC=clang-11 
-e DEB_CXX=clang++-11 
-e ALIEN_PKGS='--rpm --tgz' 
-e CMAKE_FLAGS="$CMAKE_FLAGS -DADD_GDB_INDEX_FOR_GOLD=1" 
clickhouse/clickhouse-deb-builder
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
20
Build in Docker
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
21
Build in Docker
$ cd ~/ClickHouse/PACKAGE
$ ls *.deb
clickhouse-client_21.11.1_all.deb clickhouse-common-static-dbg_21.11.1_amd64.deb
clickhouse-common-static_21.11.1_amd64.deb clickhouse-server_21.11.1_all.deb
clickhouse-test_21.11.1_all.deb
$ ls *.rpm
clickhouse-client-21.11.1-2.noarch.rpm clickhouse-common-static-21.11.1-2.x86_64.rpm
clickhouse-common-static-dbg-21.11.1-2.x86_64.rpm clickhouse-server-21.11.1-2.noarch.rpm
clickhouse-test-21.11.1-2.noarch.rpm
$ ls *.tgz
clickhouse-client-21.11.1.tgz clickhouse-common-static-21.11.1.tgz
clickhouse-common-static-dbg-21.11.1.tgz clickhouse-server-21.11.1.tgz
clickhouse-test-21.11.1.tgz
$ ls *.buildinfo *.changes
clickhouse_21.11.1_amd64.buildinfo clickhouse_21.11.1_amd64.changes
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
22
Build on Host - Prerequisites
for Ubuntu 20.04:
$ apt-get install 
clang-11 
clang-tidy-11 
cmake 
lld-11 
llvm-11 
llvm-11-dev 
ninja-build 
tzdata 
--yes --no-install-recommends
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
23
Build on Host - Building
$ mkdir ~/build
$ cd ~/build
$ CC=clang-11 CXX=clang++-11 cmake ~/ClickHouse -GNinja
$ ninja clickhouse
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
24
Build on Host - Building
~80 mins
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
25
Build on Host - Building
$ ls ~/build/programs/
CMakeFiles benchmark cmake_install.cmake
extract-from-config install library-bridge
odbc-bridge CTestTestfile.cmake **clickhouse**
compressor format keeper
local server bash-completion
client copier git-import
keeper-converter obfuscator static-files-disk-uploader
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
26
Test
Review Release
Development
clone
change
build
test
commit & push
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
27
Test - Smoke-test
$ cd ~/ClickHouse/programs/server
$ ~/build/programs/clickhouse server
$ ~/build/programs/clickhouse client
ClickHouse client version 21.11.1.1.
Connecting to localhost:9000 as user default.
Connected to ClickHouse server version 21.11.1 revision 54449.
Warnings:
* Server was built in debug mode. It will work slowly.
:)
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
28
Test - Smoke-test
:) SELECT version()
SELECT version()
Query id: 6f8b1cd8-f5d9-4f49-87ce-125ea27e08f8
┌─version()─┐
│ 21.11.1.1 │
└───────────┘
1 rows in set. Elapsed: 0.008 sec.
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
29
Tests
Executed on CI, but can also be run locally

There are multiple ways to validate a build [6]
Unit-tests - src/.../tests/gtest_*.cpp ~ 81 files ~ 10K test (4 min)
Stateless* - tests/queries/0_stateless ~ 3424 tests (45min)
Integration* - tests/integration/test_x/test.py ~ 276 tests
Performance* - tests/performance/*.xml ~ 220 tests
Lots of others

* either of those must be present in PR
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
30
Test - add test
$ cat ~/ClickHouse/tests/queries/0_stateless/02030_hello_world.sql
SELECT helloWorld() as r, toTypeName(r);
$ cat ~/ClickHouse/tests/queries/0_stateless/02030_hello_world.reference
Hello World! String
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
31
Test - run test
$ cd ~/ClickHouse/tests
$ # Requires server accessible via port 9000
$ ./clickhouse-test -b ~/build/programs/server/clickhouse 02030_hello_world
WARNING: jinja2 not installed! Template tests will be skipped.
Using queries from 'queries' directory
Using ~/ClickHouse/programs/server/clickhouse as client program (expecting split build)
Connecting to ClickHouse server... OK
Running 1 stateless tests (MainProcess).
02030_hello_world: [ OK ]
1 tests passed. 0 tests skipped. 1.85 s elapsed (MainProcess).
Won't run stateful tests because test data wasn't loaded.
All tests have finished.
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
32
Commit & Push
Review Release
Development
clone
change
build
test
commit & push
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
33
Commit & Push
$ git checkout -b hello_world
$ git add src/Functions/helloWorld.cpp 
src/Functions/registerFunctions.cpp 
tests/queries/0_stateless/02030_hello_world.sql 
tests/queries/0_stateless/02030_hello_world.reference
$ git commit
$ git push enmk HEAD #*
* enmk - name of the remote, you can add a remote after cloning a repo
with git remote add
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
34
Review
Review Release
Development
description
CLA
fix checks
fix requests
merge to master
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
35
Review
Pushed a review:
https://github.com/ClickHouse/ClickHouse/pull/29800
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
36
Review - Description
Review Release
Development
description
CLA
fix checks
fix requests
merge to master
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
37
Review - Description
Changelog category (leave one):
- New Feature
- Improvement
- Bug Fix (user-visible misbehaviour in official stable or prestable release)
- Performance Improvement
- Backward Incompatible Change
- Build/Testing/Packaging Improvement
- Documentation (changelog entry is not required)
- Not for changelog (changelog entry is not required)
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
...
Detailed description / Documentation draft:
...
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
38
Review - Description
Changelog category (leave one):
- New Feature
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Added `helloWorld` function that outputs a "Hello World!"
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
39
Review - CLA
Review Release
Development
description
CLA
fix checks
fix requests
merge to master
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
40
Review - CLA
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
41
Review - checks
Review Release
Development
description
CLA
fix checks
fix requests
merge to master
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
42
Review - checks
There are ~50 checks [9], roughly grouped as:
style checks
fasttest
builds
stateless
Unit tests
statefull
integration
sanitizers
performance
AST Fuzzer
Stress tests
TestFlows tests
PVS Checks
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
43
Review - checks
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
44
Review - check page - Fasttest
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
45
Review - check page - Stateless
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
46
Review - check page - Integration
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
47
Review - fix change requests
Review Release
Development
description
CLA
fix checks
fix requests
merge to master
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
48
Review - Merge
Review Release
Development
description
CLA
fix checks
fix requests
merge to master
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
49
Review - Merge
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
50
Release
Review Release
Development
new release
backported
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
51
References
[0]: clickhouse.com

[1]: altinity.com

[2]: github.com/ClickHouse/ClickHouse

[3]: clickhouse.com/docs
[4]: archiveprogram.github.com

[5]: clickhouse.com/docs/en/development/developer-instruction

[6]: clickhouse.com/docs/en/development/tests

[7]: youtu.be/g5CDi8Nbut4?t=3669
[8]: clickhouse.com/docs/en/development/style/

[9]: clickhouse.com/docs/en/development/continuous-integration/
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
52
BTW, we are hiring!
altinity.com/careers
altinity.com/job/clickhouse-server-engineer
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
53
Questions?
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
54
!!! BONUS PAGES !!!
Examples of how to the execute most important tests on your machine
Unit-tests
Stateless
Integration
Performance
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
55
Tests - Unit-tests
src/.../tests/gtest_*.cpp ~ 81 files
cover specific isolated thing
fast to execute
GTest-based
easy to debug
not so easy to write
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
56
Tests - Unit-tests - run on Host
Need to build a test binary first
$ cd ~/build
$ ninja unit_tests_dbms
Run the tests
$ ~/build/src/unit_tests_dbms --gtest_filter="*GTEST-FILTER-CLAUSE*"
# $ ~/build/src/unit_tests_dbms --gtest_filter="*TokenExtractorTest*"
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
57
Tests - Stateless
tests/queries/0_stateless ~ 3424 tests
functional test
require running ClickHouse server
executed by tests/clickhouse-test
easy to write, can be written in either SQL , bash , or Python
require .reference file
simple to run
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
58
Tests - Stateless - run in Docker
$ docker run 
--rm 
-v $(realpath ~/ClickHouse/PACKAGES):/package_folder 
-v $(realpath ./test_output):/test_output 
-v $(realpath ./ch_server_logs):/var/log/clickhouse-server/ 
clickhouse/stateless-test
# image can be built locally
$ cd ~/ClickHouse/docker/test/stateless
$ docker build . -t clickhouse/stateless-test
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
59
Tests - Stateless - run on Host
Needs a running server
$ cd ~/ClickHouse/programs/server
$ ~/build/programs/clickhouse server
Execute test driver
$ cd ~/ClickHouse/tests
$ ./clickhouse-test -b ~/build/programs/clickhouse
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
60
Tests - Integration
tests/integration/test_x/test.py ~ 276 tests
check how CH cooperates with various external entities
Distributed (replicas, distributed queries, Zookeeper)
External storages (MySQL, PostgreSQL, Kafka, S3, etc)
Python-based + Docker-compose
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
61
Tests - Integration - run in Docker
Requires docker in docker, hence sudo
$ cd ~/ClickHouse/tests/integration
$ sudo ./runner 
--binary ~/build/programs/clickhouse 
--odbc-bridge-binary ~/build/programs/clickhouse-odbc-bridge 
--base-configs-dir ../../programs/server/ 
'test_odbc_interaction -ss'
# image can be built locally
$ cd ~/ClickHouse/docker/test/integration/runner
$ docker build -t clickhouse/integration-tests-runner .
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
62
Tests - Performance
tests/performance/*.xml ~ 220 tests
XML-based
preconditions: <preconditions>
parameters: <substitution>
setup: <settings> , <create_query> , <fill_query>
run: <query>
tear down: <drop_query>
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
63
Tests - Performance - run in Docker
Usefull for measuring performance of the
Requires a running server, reachable on port 9000
$ docker run 
-it 
--network=host 
-v $(realpath ~/ClickHouse/tests/performance/encrypt_decrypt.xml):/perf.xml 
clickhouse/clickhouse-performance-comparison 
bash -c "./perf.py /perf.xml"
Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021
64

More Related Content

What's hot

ClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTO
ClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTOClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTO
ClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTOAltinity Ltd
 
Data Warehouses in Kubernetes Visualized: the ClickHouse Kubernetes Operator UI
Data Warehouses in Kubernetes Visualized: the ClickHouse Kubernetes Operator UIData Warehouses in Kubernetes Visualized: the ClickHouse Kubernetes Operator UI
Data Warehouses in Kubernetes Visualized: the ClickHouse Kubernetes Operator UIAltinity Ltd
 
PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs PGConf APAC
 
A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...
A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...
A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...Altinity Ltd
 
High Performance, High Reliability Data Loading on ClickHouse
High Performance, High Reliability Data Loading on ClickHouseHigh Performance, High Reliability Data Loading on ClickHouse
High Performance, High Reliability Data Loading on ClickHouseAltinity Ltd
 
Dangerous on ClickHouse in 30 minutes, by Robert Hodges, Altinity CEO
Dangerous on ClickHouse in 30 minutes, by Robert Hodges, Altinity CEODangerous on ClickHouse in 30 minutes, by Robert Hodges, Altinity CEO
Dangerous on ClickHouse in 30 minutes, by Robert Hodges, Altinity CEOAltinity Ltd
 
Fun with click house window functions webinar slides 2021-08-19
Fun with click house window functions webinar slides  2021-08-19Fun with click house window functions webinar slides  2021-08-19
Fun with click house window functions webinar slides 2021-08-19Altinity Ltd
 
ClickHouse materialized views - a secret weapon for high performance analytic...
ClickHouse materialized views - a secret weapon for high performance analytic...ClickHouse materialized views - a secret weapon for high performance analytic...
ClickHouse materialized views - a secret weapon for high performance analytic...Altinity Ltd
 
Webinar: Secrets of ClickHouse Query Performance, by Robert Hodges
Webinar: Secrets of ClickHouse Query Performance, by Robert HodgesWebinar: Secrets of ClickHouse Query Performance, by Robert Hodges
Webinar: Secrets of ClickHouse Query Performance, by Robert HodgesAltinity Ltd
 
Clickhouse Capacity Planning for OLAP Workloads, Mik Kocikowski of CloudFlare
Clickhouse Capacity Planning for OLAP Workloads, Mik Kocikowski of CloudFlareClickhouse Capacity Planning for OLAP Workloads, Mik Kocikowski of CloudFlare
Clickhouse Capacity Planning for OLAP Workloads, Mik Kocikowski of CloudFlareAltinity Ltd
 
Instana - ClickHouse presentation
Instana - ClickHouse presentationInstana - ClickHouse presentation
Instana - ClickHouse presentationMiel Donkers
 
ClickHouse and the Magic of Materialized Views, By Robert Hodges and Altinity...
ClickHouse and the Magic of Materialized Views, By Robert Hodges and Altinity...ClickHouse and the Magic of Materialized Views, By Robert Hodges and Altinity...
ClickHouse and the Magic of Materialized Views, By Robert Hodges and Altinity...Altinity Ltd
 
ClickHouse Query Performance Tips and Tricks, by Robert Hodges, Altinity CEO
ClickHouse Query Performance Tips and Tricks, by Robert Hodges, Altinity CEOClickHouse Query Performance Tips and Tricks, by Robert Hodges, Altinity CEO
ClickHouse Query Performance Tips and Tricks, by Robert Hodges, Altinity CEOAltinity Ltd
 
Altinity Cluster Manager: ClickHouse Management for Kubernetes and Cloud
Altinity Cluster Manager: ClickHouse Management for Kubernetes and CloudAltinity Cluster Manager: ClickHouse Management for Kubernetes and Cloud
Altinity Cluster Manager: ClickHouse Management for Kubernetes and CloudAltinity Ltd
 
Altinity Quickstart for ClickHouse-2202-09-15.pdf
Altinity Quickstart for ClickHouse-2202-09-15.pdfAltinity Quickstart for ClickHouse-2202-09-15.pdf
Altinity Quickstart for ClickHouse-2202-09-15.pdfAltinity Ltd
 
ClickHouse Mark Cache, by Mik Kocikowski, Cloudflare
ClickHouse Mark Cache, by Mik Kocikowski, CloudflareClickHouse Mark Cache, by Mik Kocikowski, Cloudflare
ClickHouse Mark Cache, by Mik Kocikowski, CloudflareAltinity Ltd
 
ClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEO
ClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEOClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEO
ClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEOAltinity Ltd
 
ClickHouse Monitoring 101: What to monitor and how
ClickHouse Monitoring 101: What to monitor and howClickHouse Monitoring 101: What to monitor and how
ClickHouse Monitoring 101: What to monitor and howAltinity Ltd
 
Materialize: a platform for changing data
Materialize: a platform for changing dataMaterialize: a platform for changing data
Materialize: a platform for changing dataAltinity Ltd
 
Altinity Quickstart for ClickHouse
Altinity Quickstart for ClickHouseAltinity Quickstart for ClickHouse
Altinity Quickstart for ClickHouseAltinity Ltd
 

What's hot (20)

ClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTO
ClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTOClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTO
ClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTO
 
Data Warehouses in Kubernetes Visualized: the ClickHouse Kubernetes Operator UI
Data Warehouses in Kubernetes Visualized: the ClickHouse Kubernetes Operator UIData Warehouses in Kubernetes Visualized: the ClickHouse Kubernetes Operator UI
Data Warehouses in Kubernetes Visualized: the ClickHouse Kubernetes Operator UI
 
PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs
 
A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...
A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...
A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...
 
High Performance, High Reliability Data Loading on ClickHouse
High Performance, High Reliability Data Loading on ClickHouseHigh Performance, High Reliability Data Loading on ClickHouse
High Performance, High Reliability Data Loading on ClickHouse
 
Dangerous on ClickHouse in 30 minutes, by Robert Hodges, Altinity CEO
Dangerous on ClickHouse in 30 minutes, by Robert Hodges, Altinity CEODangerous on ClickHouse in 30 minutes, by Robert Hodges, Altinity CEO
Dangerous on ClickHouse in 30 minutes, by Robert Hodges, Altinity CEO
 
Fun with click house window functions webinar slides 2021-08-19
Fun with click house window functions webinar slides  2021-08-19Fun with click house window functions webinar slides  2021-08-19
Fun with click house window functions webinar slides 2021-08-19
 
ClickHouse materialized views - a secret weapon for high performance analytic...
ClickHouse materialized views - a secret weapon for high performance analytic...ClickHouse materialized views - a secret weapon for high performance analytic...
ClickHouse materialized views - a secret weapon for high performance analytic...
 
Webinar: Secrets of ClickHouse Query Performance, by Robert Hodges
Webinar: Secrets of ClickHouse Query Performance, by Robert HodgesWebinar: Secrets of ClickHouse Query Performance, by Robert Hodges
Webinar: Secrets of ClickHouse Query Performance, by Robert Hodges
 
Clickhouse Capacity Planning for OLAP Workloads, Mik Kocikowski of CloudFlare
Clickhouse Capacity Planning for OLAP Workloads, Mik Kocikowski of CloudFlareClickhouse Capacity Planning for OLAP Workloads, Mik Kocikowski of CloudFlare
Clickhouse Capacity Planning for OLAP Workloads, Mik Kocikowski of CloudFlare
 
Instana - ClickHouse presentation
Instana - ClickHouse presentationInstana - ClickHouse presentation
Instana - ClickHouse presentation
 
ClickHouse and the Magic of Materialized Views, By Robert Hodges and Altinity...
ClickHouse and the Magic of Materialized Views, By Robert Hodges and Altinity...ClickHouse and the Magic of Materialized Views, By Robert Hodges and Altinity...
ClickHouse and the Magic of Materialized Views, By Robert Hodges and Altinity...
 
ClickHouse Query Performance Tips and Tricks, by Robert Hodges, Altinity CEO
ClickHouse Query Performance Tips and Tricks, by Robert Hodges, Altinity CEOClickHouse Query Performance Tips and Tricks, by Robert Hodges, Altinity CEO
ClickHouse Query Performance Tips and Tricks, by Robert Hodges, Altinity CEO
 
Altinity Cluster Manager: ClickHouse Management for Kubernetes and Cloud
Altinity Cluster Manager: ClickHouse Management for Kubernetes and CloudAltinity Cluster Manager: ClickHouse Management for Kubernetes and Cloud
Altinity Cluster Manager: ClickHouse Management for Kubernetes and Cloud
 
Altinity Quickstart for ClickHouse-2202-09-15.pdf
Altinity Quickstart for ClickHouse-2202-09-15.pdfAltinity Quickstart for ClickHouse-2202-09-15.pdf
Altinity Quickstart for ClickHouse-2202-09-15.pdf
 
ClickHouse Mark Cache, by Mik Kocikowski, Cloudflare
ClickHouse Mark Cache, by Mik Kocikowski, CloudflareClickHouse Mark Cache, by Mik Kocikowski, Cloudflare
ClickHouse Mark Cache, by Mik Kocikowski, Cloudflare
 
ClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEO
ClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEOClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEO
ClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEO
 
ClickHouse Monitoring 101: What to monitor and how
ClickHouse Monitoring 101: What to monitor and howClickHouse Monitoring 101: What to monitor and how
ClickHouse Monitoring 101: What to monitor and how
 
Materialize: a platform for changing data
Materialize: a platform for changing dataMaterialize: a platform for changing data
Materialize: a platform for changing data
 
Altinity Quickstart for ClickHouse
Altinity Quickstart for ClickHouseAltinity Quickstart for ClickHouse
Altinity Quickstart for ClickHouse
 

Similar to ClickHouse 101: Build and Contribute Guide

Data warehouse on Kubernetes - gentle intro to Clickhouse Operator, by Robert...
Data warehouse on Kubernetes - gentle intro to Clickhouse Operator, by Robert...Data warehouse on Kubernetes - gentle intro to Clickhouse Operator, by Robert...
Data warehouse on Kubernetes - gentle intro to Clickhouse Operator, by Robert...Altinity Ltd
 
An Introduction to CMake
An Introduction to CMakeAn Introduction to CMake
An Introduction to CMakeICS
 
Contributing to an os project
Contributing to an os projectContributing to an os project
Contributing to an os projectLasse Schuirmann
 
Cloud-Native Builds & Deployments in Bitbucket Pipelines
Cloud-Native Builds & Deployments in Bitbucket PipelinesCloud-Native Builds & Deployments in Bitbucket Pipelines
Cloud-Native Builds & Deployments in Bitbucket PipelinesAtlassian
 
Turnkey Continuous Delivery
Turnkey Continuous DeliveryTurnkey Continuous Delivery
Turnkey Continuous DeliveryGianni Bombelli
 
Lean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushLean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushPantheon
 
Intro to Git Devnet-1080 Cisco Live 2018
Intro to Git Devnet-1080 Cisco Live 2018Intro to Git Devnet-1080 Cisco Live 2018
Intro to Git Devnet-1080 Cisco Live 2018Ashley Roach
 
Life of a Chromium Developer
Life of a Chromium DeveloperLife of a Chromium Developer
Life of a Chromium Developermpaproductions
 
Why so continuous
Why so continuousWhy so continuous
Why so continuousMax Lobur
 
Modern Release Engineering in a Nutshell - Why Researchers should Care!
Modern Release Engineering in a Nutshell - Why Researchers should Care!Modern Release Engineering in a Nutshell - Why Researchers should Care!
Modern Release Engineering in a Nutshell - Why Researchers should Care!Bram Adams
 
Acquia BLT for the Win, or How to speed up the project setup, development an...
Acquia BLT for the Win, or  How to speed up the project setup, development an...Acquia BLT for the Win, or  How to speed up the project setup, development an...
Acquia BLT for the Win, or How to speed up the project setup, development an...DrupalCamp Kyiv
 
Installing Component Pack 6.0.0.6
Installing Component Pack 6.0.0.6Installing Component Pack 6.0.0.6
Installing Component Pack 6.0.0.6LetsConnect
 
GitHub Actions (Nakov at RuseConf, Sept 2022)
GitHub Actions (Nakov at RuseConf, Sept 2022)GitHub Actions (Nakov at RuseConf, Sept 2022)
GitHub Actions (Nakov at RuseConf, Sept 2022)Svetlin Nakov
 
Advancing Bitcoin 2019 - BTCPayServer Architecture
Advancing Bitcoin 2019  - BTCPayServer ArchitectureAdvancing Bitcoin 2019  - BTCPayServer Architecture
Advancing Bitcoin 2019 - BTCPayServer ArchitectureAndrew Camilleri
 
Continuous Integration & Development with Gitlab
Continuous Integration & Development with GitlabContinuous Integration & Development with Gitlab
Continuous Integration & Development with GitlabAyush Sharma
 
Igalia Focus and Goals 2020 (2019 WebKit Contributors Meeting)
Igalia Focus and Goals 2020 (2019 WebKit Contributors Meeting)Igalia Focus and Goals 2020 (2019 WebKit Contributors Meeting)
Igalia Focus and Goals 2020 (2019 WebKit Contributors Meeting)Igalia
 
Jump into Squeak - Integrate Squeak projects with Docker & Github
Jump into Squeak - Integrate Squeak projects with Docker & GithubJump into Squeak - Integrate Squeak projects with Docker & Github
Jump into Squeak - Integrate Squeak projects with Docker & Githubhubx
 
Gitlab ci, cncf.sk
Gitlab ci, cncf.skGitlab ci, cncf.sk
Gitlab ci, cncf.skJuraj Hantak
 
Poky meets Debian: Understanding how to make an embedded Linux by using an ex...
Poky meets Debian: Understanding how to make an embedded Linux by using an ex...Poky meets Debian: Understanding how to make an embedded Linux by using an ex...
Poky meets Debian: Understanding how to make an embedded Linux by using an ex...Yoshitake Kobayashi
 
Infrastructure as code
Infrastructure as codeInfrastructure as code
Infrastructure as codedaisuke awaji
 

Similar to ClickHouse 101: Build and Contribute Guide (20)

Data warehouse on Kubernetes - gentle intro to Clickhouse Operator, by Robert...
Data warehouse on Kubernetes - gentle intro to Clickhouse Operator, by Robert...Data warehouse on Kubernetes - gentle intro to Clickhouse Operator, by Robert...
Data warehouse on Kubernetes - gentle intro to Clickhouse Operator, by Robert...
 
An Introduction to CMake
An Introduction to CMakeAn Introduction to CMake
An Introduction to CMake
 
Contributing to an os project
Contributing to an os projectContributing to an os project
Contributing to an os project
 
Cloud-Native Builds & Deployments in Bitbucket Pipelines
Cloud-Native Builds & Deployments in Bitbucket PipelinesCloud-Native Builds & Deployments in Bitbucket Pipelines
Cloud-Native Builds & Deployments in Bitbucket Pipelines
 
Turnkey Continuous Delivery
Turnkey Continuous DeliveryTurnkey Continuous Delivery
Turnkey Continuous Delivery
 
Lean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushLean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and Drush
 
Intro to Git Devnet-1080 Cisco Live 2018
Intro to Git Devnet-1080 Cisco Live 2018Intro to Git Devnet-1080 Cisco Live 2018
Intro to Git Devnet-1080 Cisco Live 2018
 
Life of a Chromium Developer
Life of a Chromium DeveloperLife of a Chromium Developer
Life of a Chromium Developer
 
Why so continuous
Why so continuousWhy so continuous
Why so continuous
 
Modern Release Engineering in a Nutshell - Why Researchers should Care!
Modern Release Engineering in a Nutshell - Why Researchers should Care!Modern Release Engineering in a Nutshell - Why Researchers should Care!
Modern Release Engineering in a Nutshell - Why Researchers should Care!
 
Acquia BLT for the Win, or How to speed up the project setup, development an...
Acquia BLT for the Win, or  How to speed up the project setup, development an...Acquia BLT for the Win, or  How to speed up the project setup, development an...
Acquia BLT for the Win, or How to speed up the project setup, development an...
 
Installing Component Pack 6.0.0.6
Installing Component Pack 6.0.0.6Installing Component Pack 6.0.0.6
Installing Component Pack 6.0.0.6
 
GitHub Actions (Nakov at RuseConf, Sept 2022)
GitHub Actions (Nakov at RuseConf, Sept 2022)GitHub Actions (Nakov at RuseConf, Sept 2022)
GitHub Actions (Nakov at RuseConf, Sept 2022)
 
Advancing Bitcoin 2019 - BTCPayServer Architecture
Advancing Bitcoin 2019  - BTCPayServer ArchitectureAdvancing Bitcoin 2019  - BTCPayServer Architecture
Advancing Bitcoin 2019 - BTCPayServer Architecture
 
Continuous Integration & Development with Gitlab
Continuous Integration & Development with GitlabContinuous Integration & Development with Gitlab
Continuous Integration & Development with Gitlab
 
Igalia Focus and Goals 2020 (2019 WebKit Contributors Meeting)
Igalia Focus and Goals 2020 (2019 WebKit Contributors Meeting)Igalia Focus and Goals 2020 (2019 WebKit Contributors Meeting)
Igalia Focus and Goals 2020 (2019 WebKit Contributors Meeting)
 
Jump into Squeak - Integrate Squeak projects with Docker & Github
Jump into Squeak - Integrate Squeak projects with Docker & GithubJump into Squeak - Integrate Squeak projects with Docker & Github
Jump into Squeak - Integrate Squeak projects with Docker & Github
 
Gitlab ci, cncf.sk
Gitlab ci, cncf.skGitlab ci, cncf.sk
Gitlab ci, cncf.sk
 
Poky meets Debian: Understanding how to make an embedded Linux by using an ex...
Poky meets Debian: Understanding how to make an embedded Linux by using an ex...Poky meets Debian: Understanding how to make an embedded Linux by using an ex...
Poky meets Debian: Understanding how to make an embedded Linux by using an ex...
 
Infrastructure as code
Infrastructure as codeInfrastructure as code
Infrastructure as code
 

More from Altinity Ltd

Building an Analytic Extension to MySQL with ClickHouse and Open Source.pptx
Building an Analytic Extension to MySQL with ClickHouse and Open Source.pptxBuilding an Analytic Extension to MySQL with ClickHouse and Open Source.pptx
Building an Analytic Extension to MySQL with ClickHouse and Open Source.pptxAltinity Ltd
 
Cloud Native ClickHouse at Scale--Using the Altinity Kubernetes Operator-2022...
Cloud Native ClickHouse at Scale--Using the Altinity Kubernetes Operator-2022...Cloud Native ClickHouse at Scale--Using the Altinity Kubernetes Operator-2022...
Cloud Native ClickHouse at Scale--Using the Altinity Kubernetes Operator-2022...Altinity Ltd
 
Building an Analytic Extension to MySQL with ClickHouse and Open Source
Building an Analytic Extension to MySQL with ClickHouse and Open SourceBuilding an Analytic Extension to MySQL with ClickHouse and Open Source
Building an Analytic Extension to MySQL with ClickHouse and Open SourceAltinity Ltd
 
Fun with ClickHouse Window Functions-2021-08-19.pdf
Fun with ClickHouse Window Functions-2021-08-19.pdfFun with ClickHouse Window Functions-2021-08-19.pdf
Fun with ClickHouse Window Functions-2021-08-19.pdfAltinity Ltd
 
Cloud Native Data Warehouses - Intro to ClickHouse on Kubernetes-2021-07.pdf
Cloud Native Data Warehouses - Intro to ClickHouse on Kubernetes-2021-07.pdfCloud Native Data Warehouses - Intro to ClickHouse on Kubernetes-2021-07.pdf
Cloud Native Data Warehouses - Intro to ClickHouse on Kubernetes-2021-07.pdfAltinity Ltd
 
Building High Performance Apps with Altinity Stable Builds for ClickHouse | A...
Building High Performance Apps with Altinity Stable Builds for ClickHouse | A...Building High Performance Apps with Altinity Stable Builds for ClickHouse | A...
Building High Performance Apps with Altinity Stable Builds for ClickHouse | A...Altinity Ltd
 
Application Monitoring using Open Source - VictoriaMetrics & Altinity ClickHo...
Application Monitoring using Open Source - VictoriaMetrics & Altinity ClickHo...Application Monitoring using Open Source - VictoriaMetrics & Altinity ClickHo...
Application Monitoring using Open Source - VictoriaMetrics & Altinity ClickHo...Altinity Ltd
 
Own your ClickHouse data with Altinity.Cloud Anywhere-2023-01-17.pdf
Own your ClickHouse data with Altinity.Cloud Anywhere-2023-01-17.pdfOwn your ClickHouse data with Altinity.Cloud Anywhere-2023-01-17.pdf
Own your ClickHouse data with Altinity.Cloud Anywhere-2023-01-17.pdfAltinity Ltd
 
ClickHouse ReplacingMergeTree in Telecom Apps
ClickHouse ReplacingMergeTree in Telecom AppsClickHouse ReplacingMergeTree in Telecom Apps
ClickHouse ReplacingMergeTree in Telecom AppsAltinity Ltd
 
Adventures with the ClickHouse ReplacingMergeTree Engine
Adventures with the ClickHouse ReplacingMergeTree EngineAdventures with the ClickHouse ReplacingMergeTree Engine
Adventures with the ClickHouse ReplacingMergeTree EngineAltinity Ltd
 
Building a Real-Time Analytics Application with Apache Pulsar and Apache Pinot
Building a Real-Time Analytics Application with  Apache Pulsar and Apache PinotBuilding a Real-Time Analytics Application with  Apache Pulsar and Apache Pinot
Building a Real-Time Analytics Application with Apache Pulsar and Apache PinotAltinity Ltd
 
Altinity Webinar: Introduction to Altinity.Cloud-Platform for Real-Time Data.pdf
Altinity Webinar: Introduction to Altinity.Cloud-Platform for Real-Time Data.pdfAltinity Webinar: Introduction to Altinity.Cloud-Platform for Real-Time Data.pdf
Altinity Webinar: Introduction to Altinity.Cloud-Platform for Real-Time Data.pdfAltinity Ltd
 
OSA Con 2022 - What Data Engineering Can Learn from Frontend Engineering - Pe...
OSA Con 2022 - What Data Engineering Can Learn from Frontend Engineering - Pe...OSA Con 2022 - What Data Engineering Can Learn from Frontend Engineering - Pe...
OSA Con 2022 - What Data Engineering Can Learn from Frontend Engineering - Pe...Altinity Ltd
 
OSA Con 2022 - Welcome to OSA CON Version 2022 - Robert Hodges - Altinity.pdf
OSA Con 2022 - Welcome to OSA CON Version 2022 - Robert Hodges - Altinity.pdfOSA Con 2022 - Welcome to OSA CON Version 2022 - Robert Hodges - Altinity.pdf
OSA Con 2022 - Welcome to OSA CON Version 2022 - Robert Hodges - Altinity.pdfAltinity Ltd
 
OSA Con 2022 - Using ClickHouse Database to Power Analytics and Customer Enga...
OSA Con 2022 - Using ClickHouse Database to Power Analytics and Customer Enga...OSA Con 2022 - Using ClickHouse Database to Power Analytics and Customer Enga...
OSA Con 2022 - Using ClickHouse Database to Power Analytics and Customer Enga...Altinity Ltd
 
OSA Con 2022 - Tips and Tricks to Keep Your Queries under 100ms with ClickHou...
OSA Con 2022 - Tips and Tricks to Keep Your Queries under 100ms with ClickHou...OSA Con 2022 - Tips and Tricks to Keep Your Queries under 100ms with ClickHou...
OSA Con 2022 - Tips and Tricks to Keep Your Queries under 100ms with ClickHou...Altinity Ltd
 
OSA Con 2022 - The Open Source Analytic Universe, Version 2022 - Robert Hodge...
OSA Con 2022 - The Open Source Analytic Universe, Version 2022 - Robert Hodge...OSA Con 2022 - The Open Source Analytic Universe, Version 2022 - Robert Hodge...
OSA Con 2022 - The Open Source Analytic Universe, Version 2022 - Robert Hodge...Altinity Ltd
 
OSA Con 2022 - Switching Jaeger Distributed Tracing to ClickHouse to Enable A...
OSA Con 2022 - Switching Jaeger Distributed Tracing to ClickHouse to Enable A...OSA Con 2022 - Switching Jaeger Distributed Tracing to ClickHouse to Enable A...
OSA Con 2022 - Switching Jaeger Distributed Tracing to ClickHouse to Enable A...Altinity Ltd
 
OSA Con 2022 - Streaming Data Made Easy - Tim Spann & David Kjerrumgaard - St...
OSA Con 2022 - Streaming Data Made Easy - Tim Spann & David Kjerrumgaard - St...OSA Con 2022 - Streaming Data Made Easy - Tim Spann & David Kjerrumgaard - St...
OSA Con 2022 - Streaming Data Made Easy - Tim Spann & David Kjerrumgaard - St...Altinity Ltd
 
OSA Con 2022 - State of Open Source Databases - Peter Zaitsev - Percona.pdf
OSA Con 2022 - State of Open Source Databases - Peter Zaitsev - Percona.pdfOSA Con 2022 - State of Open Source Databases - Peter Zaitsev - Percona.pdf
OSA Con 2022 - State of Open Source Databases - Peter Zaitsev - Percona.pdfAltinity Ltd
 

More from Altinity Ltd (20)

Building an Analytic Extension to MySQL with ClickHouse and Open Source.pptx
Building an Analytic Extension to MySQL with ClickHouse and Open Source.pptxBuilding an Analytic Extension to MySQL with ClickHouse and Open Source.pptx
Building an Analytic Extension to MySQL with ClickHouse and Open Source.pptx
 
Cloud Native ClickHouse at Scale--Using the Altinity Kubernetes Operator-2022...
Cloud Native ClickHouse at Scale--Using the Altinity Kubernetes Operator-2022...Cloud Native ClickHouse at Scale--Using the Altinity Kubernetes Operator-2022...
Cloud Native ClickHouse at Scale--Using the Altinity Kubernetes Operator-2022...
 
Building an Analytic Extension to MySQL with ClickHouse and Open Source
Building an Analytic Extension to MySQL with ClickHouse and Open SourceBuilding an Analytic Extension to MySQL with ClickHouse and Open Source
Building an Analytic Extension to MySQL with ClickHouse and Open Source
 
Fun with ClickHouse Window Functions-2021-08-19.pdf
Fun with ClickHouse Window Functions-2021-08-19.pdfFun with ClickHouse Window Functions-2021-08-19.pdf
Fun with ClickHouse Window Functions-2021-08-19.pdf
 
Cloud Native Data Warehouses - Intro to ClickHouse on Kubernetes-2021-07.pdf
Cloud Native Data Warehouses - Intro to ClickHouse on Kubernetes-2021-07.pdfCloud Native Data Warehouses - Intro to ClickHouse on Kubernetes-2021-07.pdf
Cloud Native Data Warehouses - Intro to ClickHouse on Kubernetes-2021-07.pdf
 
Building High Performance Apps with Altinity Stable Builds for ClickHouse | A...
Building High Performance Apps with Altinity Stable Builds for ClickHouse | A...Building High Performance Apps with Altinity Stable Builds for ClickHouse | A...
Building High Performance Apps with Altinity Stable Builds for ClickHouse | A...
 
Application Monitoring using Open Source - VictoriaMetrics & Altinity ClickHo...
Application Monitoring using Open Source - VictoriaMetrics & Altinity ClickHo...Application Monitoring using Open Source - VictoriaMetrics & Altinity ClickHo...
Application Monitoring using Open Source - VictoriaMetrics & Altinity ClickHo...
 
Own your ClickHouse data with Altinity.Cloud Anywhere-2023-01-17.pdf
Own your ClickHouse data with Altinity.Cloud Anywhere-2023-01-17.pdfOwn your ClickHouse data with Altinity.Cloud Anywhere-2023-01-17.pdf
Own your ClickHouse data with Altinity.Cloud Anywhere-2023-01-17.pdf
 
ClickHouse ReplacingMergeTree in Telecom Apps
ClickHouse ReplacingMergeTree in Telecom AppsClickHouse ReplacingMergeTree in Telecom Apps
ClickHouse ReplacingMergeTree in Telecom Apps
 
Adventures with the ClickHouse ReplacingMergeTree Engine
Adventures with the ClickHouse ReplacingMergeTree EngineAdventures with the ClickHouse ReplacingMergeTree Engine
Adventures with the ClickHouse ReplacingMergeTree Engine
 
Building a Real-Time Analytics Application with Apache Pulsar and Apache Pinot
Building a Real-Time Analytics Application with  Apache Pulsar and Apache PinotBuilding a Real-Time Analytics Application with  Apache Pulsar and Apache Pinot
Building a Real-Time Analytics Application with Apache Pulsar and Apache Pinot
 
Altinity Webinar: Introduction to Altinity.Cloud-Platform for Real-Time Data.pdf
Altinity Webinar: Introduction to Altinity.Cloud-Platform for Real-Time Data.pdfAltinity Webinar: Introduction to Altinity.Cloud-Platform for Real-Time Data.pdf
Altinity Webinar: Introduction to Altinity.Cloud-Platform for Real-Time Data.pdf
 
OSA Con 2022 - What Data Engineering Can Learn from Frontend Engineering - Pe...
OSA Con 2022 - What Data Engineering Can Learn from Frontend Engineering - Pe...OSA Con 2022 - What Data Engineering Can Learn from Frontend Engineering - Pe...
OSA Con 2022 - What Data Engineering Can Learn from Frontend Engineering - Pe...
 
OSA Con 2022 - Welcome to OSA CON Version 2022 - Robert Hodges - Altinity.pdf
OSA Con 2022 - Welcome to OSA CON Version 2022 - Robert Hodges - Altinity.pdfOSA Con 2022 - Welcome to OSA CON Version 2022 - Robert Hodges - Altinity.pdf
OSA Con 2022 - Welcome to OSA CON Version 2022 - Robert Hodges - Altinity.pdf
 
OSA Con 2022 - Using ClickHouse Database to Power Analytics and Customer Enga...
OSA Con 2022 - Using ClickHouse Database to Power Analytics and Customer Enga...OSA Con 2022 - Using ClickHouse Database to Power Analytics and Customer Enga...
OSA Con 2022 - Using ClickHouse Database to Power Analytics and Customer Enga...
 
OSA Con 2022 - Tips and Tricks to Keep Your Queries under 100ms with ClickHou...
OSA Con 2022 - Tips and Tricks to Keep Your Queries under 100ms with ClickHou...OSA Con 2022 - Tips and Tricks to Keep Your Queries under 100ms with ClickHou...
OSA Con 2022 - Tips and Tricks to Keep Your Queries under 100ms with ClickHou...
 
OSA Con 2022 - The Open Source Analytic Universe, Version 2022 - Robert Hodge...
OSA Con 2022 - The Open Source Analytic Universe, Version 2022 - Robert Hodge...OSA Con 2022 - The Open Source Analytic Universe, Version 2022 - Robert Hodge...
OSA Con 2022 - The Open Source Analytic Universe, Version 2022 - Robert Hodge...
 
OSA Con 2022 - Switching Jaeger Distributed Tracing to ClickHouse to Enable A...
OSA Con 2022 - Switching Jaeger Distributed Tracing to ClickHouse to Enable A...OSA Con 2022 - Switching Jaeger Distributed Tracing to ClickHouse to Enable A...
OSA Con 2022 - Switching Jaeger Distributed Tracing to ClickHouse to Enable A...
 
OSA Con 2022 - Streaming Data Made Easy - Tim Spann & David Kjerrumgaard - St...
OSA Con 2022 - Streaming Data Made Easy - Tim Spann & David Kjerrumgaard - St...OSA Con 2022 - Streaming Data Made Easy - Tim Spann & David Kjerrumgaard - St...
OSA Con 2022 - Streaming Data Made Easy - Tim Spann & David Kjerrumgaard - St...
 
OSA Con 2022 - State of Open Source Databases - Peter Zaitsev - Percona.pdf
OSA Con 2022 - State of Open Source Databases - Peter Zaitsev - Percona.pdfOSA Con 2022 - State of Open Source Databases - Peter Zaitsev - Percona.pdf
OSA Con 2022 - State of Open Source Databases - Peter Zaitsev - Percona.pdf
 

Recently uploaded

Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 

Recently uploaded (20)

Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 

ClickHouse 101: Build and Contribute Guide

  • 1. ClickHouse 101 Building ClickHouse and Making Your First Contribution: A Tutorial Vasily Nemkov @ Altinity 06.10.2021
  • 2. About me Server team lead @ Altinity working on CH for ~3 years now ~70 merged PRs in CH IPv4 and IPv6 datatype Gorilla and DoubleDelta codecs DateTime64 datatype + extended range for date/time* system.session_log + many others Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 2
  • 3. About Altinity The #1 enterprise ClickHouse provider Now offering Altinity.Cloud Major committer and community sponsor for ClickHouse in US/EU Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 3
  • 4. Overview What CH is How to Clone Make changes Build Run tests Submit a PR Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 4
  • 5. What ClickHouse is an OLAP DBMS [0][1] Open source software [2] fastest growing open source project now highly optimized modern C++ ~0.5M LOC (excluding third-party) 80-ish third-party libraries Lots of tests Docs are in the repo [3] Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 5
  • 6. Why contribute Fastest way to have a bug fixed or feature implemented Learn a lot in the process Fame system.contributors ClickHouse merged contributors badge Arctic Code Vault Contributor [4] Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 6
  • 7. Ways to contribute Benchmarks Docs Tests Code [5] Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 7
  • 8. The Flow Review Release Development Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 8
  • 9. Development Review Release Development clone change build test commit & push Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 9
  • 10. Clone Review Release Development clone change build test commit & push Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 10
  • 11. Clone Make a fork (if you are going to contribute changes to the community) Clone repo and fetch submodules $ cd ~ $ git clone https://github.com/ClickHouse/ClickHouse.git ClickHouse $ cd ClickHouse $ git submodule update --init --recursive Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 11
  • 12. Make changes Review Release Development clone change build test commit & push Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 12
  • 13. Make changes - complexity hierarchy [7] Functions: regular, aggregate, table-function Data format Table Engine Codec ( None , LZ4 , DoubleDelta ) SQL feature: clause ( UNION ALL ), section ( LIMIT BY ), request type ( SYSTEM ) DB engine Dictionaries: layout, source Data type ( UUID ) Client/server protocol Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 13
  • 14. Make changes We are going to add a helloWorld() function SELECT helloWorld(); "Hello World!" Follow guides [8] $ vim ~/ClickHouse/src/Functions/helloWorld.cpp Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 14
  • 15. Make changes #include <DataTypes/DataTypeString.h> #include <Functions/IFunction.h> #include <Functions/FunctionFactory.h> #include <Core/Field.h> namespace DB { class FunctionHelloWorld : public IFunction { public: static constexpr auto name = "helloWorld"; static FunctionPtr create(ContextPtr) { return std::make_shared<FunctionHelloWorld>(); } String getName() const override { return name; } bool useDefaultImplementationForConstants() const override { return true; } bool isSuitableForShortCircuitArgumentsExecution(const DataTypesWithConstInfo &) const override { return false; } size_t getNumberOfArguments() const override { return 0; } DataTypePtr getReturnTypeImpl(const DataTypes &) const override { return std::make_shared<DataTypeString>(); } ColumnPtr executeImpl(const ColumnsWithTypeAndName &, const DataTypePtr & result_type, size_t input_rows_count) const override { return result_type->createColumnConst(input_rows_count, "Hello World!"); } }; void registerFunctionHelloWrold(FunctionFactory & factory) { factory.registerFunction<FunctionHelloWorld>(); } } Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 15
  • 16. Make changes diff --git a/src/Functions/registerFunctions.cpp b/src/Functions/registerFunctions.cpp index 9b1a7faebb..0451ff0ead 100644 --- a/src/Functions/registerFunctions.cpp +++ b/src/Functions/registerFunctions.cpp @@ -68,2 +68,5 @@ void registerFunctionAESDecryptMysql(FunctionFactory & factory); +void registerFunctionHelloWorld(FunctionFactory & factory); + void registerFunctions() @@ -132,2 +135,3 @@ void registerFunctions() registerFunctionLogTrace(factory); + registerFunctionHelloWorld(factory); } Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 16
  • 17. Build Review Release Development clone change build test commit & push Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 17
  • 18. Build Build in Docker Can produce .deb , .rpm and .tar.gz Easy to set up - no prerequisites, only docker any OS Build on Host More suitable for development process (i.e. developing CH core) Ubuntu, Prerequisites faster (~2x) Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 18
  • 19. Build - Hardware Requirements 16GB of RAM (32 is better) multiple cores (4+) 20-50GB on disk Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 19
  • 20. Build in Docker $ docker run --network=host --rm --volume=$(realpath ./PACKAGES):/output --volume=$(realpath .):/build -e DEB_CC=clang-11 -e DEB_CXX=clang++-11 -e ALIEN_PKGS='--rpm --tgz' -e CMAKE_FLAGS="$CMAKE_FLAGS -DADD_GDB_INDEX_FOR_GOLD=1" clickhouse/clickhouse-deb-builder Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 20
  • 21. Build in Docker Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 21
  • 22. Build in Docker $ cd ~/ClickHouse/PACKAGE $ ls *.deb clickhouse-client_21.11.1_all.deb clickhouse-common-static-dbg_21.11.1_amd64.deb clickhouse-common-static_21.11.1_amd64.deb clickhouse-server_21.11.1_all.deb clickhouse-test_21.11.1_all.deb $ ls *.rpm clickhouse-client-21.11.1-2.noarch.rpm clickhouse-common-static-21.11.1-2.x86_64.rpm clickhouse-common-static-dbg-21.11.1-2.x86_64.rpm clickhouse-server-21.11.1-2.noarch.rpm clickhouse-test-21.11.1-2.noarch.rpm $ ls *.tgz clickhouse-client-21.11.1.tgz clickhouse-common-static-21.11.1.tgz clickhouse-common-static-dbg-21.11.1.tgz clickhouse-server-21.11.1.tgz clickhouse-test-21.11.1.tgz $ ls *.buildinfo *.changes clickhouse_21.11.1_amd64.buildinfo clickhouse_21.11.1_amd64.changes Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 22
  • 23. Build on Host - Prerequisites for Ubuntu 20.04: $ apt-get install clang-11 clang-tidy-11 cmake lld-11 llvm-11 llvm-11-dev ninja-build tzdata --yes --no-install-recommends Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 23
  • 24. Build on Host - Building $ mkdir ~/build $ cd ~/build $ CC=clang-11 CXX=clang++-11 cmake ~/ClickHouse -GNinja $ ninja clickhouse Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 24
  • 25. Build on Host - Building ~80 mins Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 25
  • 26. Build on Host - Building $ ls ~/build/programs/ CMakeFiles benchmark cmake_install.cmake extract-from-config install library-bridge odbc-bridge CTestTestfile.cmake **clickhouse** compressor format keeper local server bash-completion client copier git-import keeper-converter obfuscator static-files-disk-uploader Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 26
  • 27. Test Review Release Development clone change build test commit & push Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 27
  • 28. Test - Smoke-test $ cd ~/ClickHouse/programs/server $ ~/build/programs/clickhouse server $ ~/build/programs/clickhouse client ClickHouse client version 21.11.1.1. Connecting to localhost:9000 as user default. Connected to ClickHouse server version 21.11.1 revision 54449. Warnings: * Server was built in debug mode. It will work slowly. :) Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 28
  • 29. Test - Smoke-test :) SELECT version() SELECT version() Query id: 6f8b1cd8-f5d9-4f49-87ce-125ea27e08f8 ┌─version()─┐ │ 21.11.1.1 │ └───────────┘ 1 rows in set. Elapsed: 0.008 sec. Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 29
  • 30. Tests Executed on CI, but can also be run locally There are multiple ways to validate a build [6] Unit-tests - src/.../tests/gtest_*.cpp ~ 81 files ~ 10K test (4 min) Stateless* - tests/queries/0_stateless ~ 3424 tests (45min) Integration* - tests/integration/test_x/test.py ~ 276 tests Performance* - tests/performance/*.xml ~ 220 tests Lots of others * either of those must be present in PR Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 30
  • 31. Test - add test $ cat ~/ClickHouse/tests/queries/0_stateless/02030_hello_world.sql SELECT helloWorld() as r, toTypeName(r); $ cat ~/ClickHouse/tests/queries/0_stateless/02030_hello_world.reference Hello World! String Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 31
  • 32. Test - run test $ cd ~/ClickHouse/tests $ # Requires server accessible via port 9000 $ ./clickhouse-test -b ~/build/programs/server/clickhouse 02030_hello_world WARNING: jinja2 not installed! Template tests will be skipped. Using queries from 'queries' directory Using ~/ClickHouse/programs/server/clickhouse as client program (expecting split build) Connecting to ClickHouse server... OK Running 1 stateless tests (MainProcess). 02030_hello_world: [ OK ] 1 tests passed. 0 tests skipped. 1.85 s elapsed (MainProcess). Won't run stateful tests because test data wasn't loaded. All tests have finished. Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 32
  • 33. Commit & Push Review Release Development clone change build test commit & push Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 33
  • 34. Commit & Push $ git checkout -b hello_world $ git add src/Functions/helloWorld.cpp src/Functions/registerFunctions.cpp tests/queries/0_stateless/02030_hello_world.sql tests/queries/0_stateless/02030_hello_world.reference $ git commit $ git push enmk HEAD #* * enmk - name of the remote, you can add a remote after cloning a repo with git remote add Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 34
  • 35. Review Review Release Development description CLA fix checks fix requests merge to master Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 35
  • 36. Review Pushed a review: https://github.com/ClickHouse/ClickHouse/pull/29800 Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 36
  • 37. Review - Description Review Release Development description CLA fix checks fix requests merge to master Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 37
  • 38. Review - Description Changelog category (leave one): - New Feature - Improvement - Bug Fix (user-visible misbehaviour in official stable or prestable release) - Performance Improvement - Backward Incompatible Change - Build/Testing/Packaging Improvement - Documentation (changelog entry is not required) - Not for changelog (changelog entry is not required) Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md): ... Detailed description / Documentation draft: ... Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 38
  • 39. Review - Description Changelog category (leave one): - New Feature Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md): Added `helloWorld` function that outputs a "Hello World!" Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 39
  • 40. Review - CLA Review Release Development description CLA fix checks fix requests merge to master Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 40
  • 41. Review - CLA Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 41
  • 42. Review - checks Review Release Development description CLA fix checks fix requests merge to master Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 42
  • 43. Review - checks There are ~50 checks [9], roughly grouped as: style checks fasttest builds stateless Unit tests statefull integration sanitizers performance AST Fuzzer Stress tests TestFlows tests PVS Checks Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 43
  • 44. Review - checks Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 44
  • 45. Review - check page - Fasttest Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 45
  • 46. Review - check page - Stateless Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 46
  • 47. Review - check page - Integration Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 47
  • 48. Review - fix change requests Review Release Development description CLA fix checks fix requests merge to master Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 48
  • 49. Review - Merge Review Release Development description CLA fix checks fix requests merge to master Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 49
  • 50. Review - Merge Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 50
  • 51. Release Review Release Development new release backported Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 51
  • 52. References [0]: clickhouse.com [1]: altinity.com [2]: github.com/ClickHouse/ClickHouse [3]: clickhouse.com/docs [4]: archiveprogram.github.com [5]: clickhouse.com/docs/en/development/developer-instruction [6]: clickhouse.com/docs/en/development/tests [7]: youtu.be/g5CDi8Nbut4?t=3669 [8]: clickhouse.com/docs/en/development/style/ [9]: clickhouse.com/docs/en/development/continuous-integration/ Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 52
  • 53. BTW, we are hiring! altinity.com/careers altinity.com/job/clickhouse-server-engineer Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 53
  • 54. Questions? Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 54
  • 55. !!! BONUS PAGES !!! Examples of how to the execute most important tests on your machine Unit-tests Stateless Integration Performance Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 55
  • 56. Tests - Unit-tests src/.../tests/gtest_*.cpp ~ 81 files cover specific isolated thing fast to execute GTest-based easy to debug not so easy to write Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 56
  • 57. Tests - Unit-tests - run on Host Need to build a test binary first $ cd ~/build $ ninja unit_tests_dbms Run the tests $ ~/build/src/unit_tests_dbms --gtest_filter="*GTEST-FILTER-CLAUSE*" # $ ~/build/src/unit_tests_dbms --gtest_filter="*TokenExtractorTest*" Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 57
  • 58. Tests - Stateless tests/queries/0_stateless ~ 3424 tests functional test require running ClickHouse server executed by tests/clickhouse-test easy to write, can be written in either SQL , bash , or Python require .reference file simple to run Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 58
  • 59. Tests - Stateless - run in Docker $ docker run --rm -v $(realpath ~/ClickHouse/PACKAGES):/package_folder -v $(realpath ./test_output):/test_output -v $(realpath ./ch_server_logs):/var/log/clickhouse-server/ clickhouse/stateless-test # image can be built locally $ cd ~/ClickHouse/docker/test/stateless $ docker build . -t clickhouse/stateless-test Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 59
  • 60. Tests - Stateless - run on Host Needs a running server $ cd ~/ClickHouse/programs/server $ ~/build/programs/clickhouse server Execute test driver $ cd ~/ClickHouse/tests $ ./clickhouse-test -b ~/build/programs/clickhouse Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 60
  • 61. Tests - Integration tests/integration/test_x/test.py ~ 276 tests check how CH cooperates with various external entities Distributed (replicas, distributed queries, Zookeeper) External storages (MySQL, PostgreSQL, Kafka, S3, etc) Python-based + Docker-compose Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 61
  • 62. Tests - Integration - run in Docker Requires docker in docker, hence sudo $ cd ~/ClickHouse/tests/integration $ sudo ./runner --binary ~/build/programs/clickhouse --odbc-bridge-binary ~/build/programs/clickhouse-odbc-bridge --base-configs-dir ../../programs/server/ 'test_odbc_interaction -ss' # image can be built locally $ cd ~/ClickHouse/docker/test/integration/runner $ docker build -t clickhouse/integration-tests-runner . Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 62
  • 63. Tests - Performance tests/performance/*.xml ~ 220 tests XML-based preconditions: <preconditions> parameters: <substitution> setup: <settings> , <create_query> , <fill_query> run: <query> tear down: <drop_query> Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 63
  • 64. Tests - Performance - run in Docker Usefull for measuring performance of the Requires a running server, reachable on port 9000 $ docker run -it --network=host -v $(realpath ~/ClickHouse/tests/performance/encrypt_decrypt.xml):/perf.xml clickhouse/clickhouse-performance-comparison bash -c "./perf.py /perf.xml" Building ClickHouse and Making Your First Contribution: A Tutorial by Vasily Nemkov @ Altinity 06.10.2021 64