You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cpp/README.md
+32-31Lines changed: 32 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
-
# Pixels Reader C++ Implementation
1
+
# Pixels C++ Implementation
2
2
3
3
## Usage
4
4
5
5
### Compilation
6
6
7
-
The repository relies on [duckdb](https://github.com/yuly16/duckdb), It is refered from [pixels reader](https://github.com/yuly16/pixels-reader-cxx).
8
-
It also relies on protobuf and liburing. We don't need to manually install these prerequisites, since our compilation code would
9
-
automatically download them.
7
+
Pixels C++ relies on protobuf and liburing. And it builds the pixels extension of duckdb by default,
8
+
which relies on [duckdb](https://github.com/pixelsdb/duckdb).
9
+
We don't need to manually install these prerequisites, since the Makefile would automatically download them.
10
10
11
-
Pixels C++ reader uses `iouring` system call. You can use the following command to check if iouring is supported in your system:
11
+
Pixels C++ reader uses `iouring` system calls. You can use the following command to check if iouring is supported in your system:
12
12
13
13
```shell
14
14
grep io_uring_setup /proc/kallsyms
@@ -35,27 +35,34 @@ Then set the `PIXELS_SRC` and `PIXELS_HOME` environment variable (Ignore it if y
35
35
36
36
Pull the dependency code:
37
37
38
-
```
38
+
```shell
39
39
make pull
40
40
```
41
41
42
-
Finally, compile the code:
42
+
If it is not the first time to execute `make pull`, you can check out the latest submodules:
43
43
44
+
```shell
45
+
make update
44
46
```
47
+
48
+
Finally, compile the code:
49
+
50
+
```shell
45
51
make -j
46
52
```
47
53
48
54
### Example
49
55
50
-
Here is a pixels reader example in the directory `duckdb/examples/pixels-example`. This example validates the correctness of compilation and gives you an idea how to load the pixels data.
56
+
Here is a pixels reader example in the directory `duckdb/examples/pixels-example`.
57
+
This example validates the correctness of compilation and gives you an idea how to load the Pixels data.
Please make sure you don't use the official `duckdb` repository. The official `duckdb` has some name conflicts with `iouring` (which is a linux async IO library), which would lead to the compilation failure.
212
-
213
-
214
-
### 3. I can't load the pixels data via pixels C++ reader
215
-
216
-
Currently, the pixels Java writer and reader uses big endian to write/read pixels data. We find that small endian is more efficient for pixels c++ reader. Therefore, in order to generate the pixels data with small endian, please use Pixels in [little-endian branch](https://github.com/pixelsdb/pixels/tree/little-endian). We will merge the small endian to pixels java reader in the future.
217
-
218
+
Please make sure you don't use the official `duckdb` repository. The official `duckdb` has some name conflicts with `iouring` (which is a linux async IO library), which would lead to the compilation failure.
218
219
219
-
### 4. I fail to run the pixels and parquet benchmark
220
+
### 3. I fail to run the pixels and parquet benchmark
220
221
221
222
This code is tested in diascld31 server. I hardcode the pixels data directory and parquet data directory in `parquet_tpch_template.benchmark.in`, `parquet_tpch_template_no_verification.benchmark.in`, `pixels_tpch_template.benchmark.in` and `pixels_tpch_template_no_verification.benchmark.in`. If you want to run this benchmark in another machine, make sure to modify the pixels and parquet directory to the correct location. `TODO`: In the future I will rewrite this to a more user-friendly benchmark.
222
223
@@ -244,10 +245,10 @@ def clean_page_cache():
244
245
os.system(cmd)
245
246
```
246
247
247
-
### 5. The protobuf version issue
248
-
I use protobuf [v3.21.6](https://github.com/protocolbuffers/protobuf/releases/tag/v3.21.6). The latest protobuf version doesn't work for pixels c++ reader.
248
+
### 4. The protobuf version issue
249
+
We use protobuf [v3.21.6](https://github.com/protocolbuffers/protobuf/releases/tag/v3.21.6). It is pulled as a submodule. The latest protobuf version doesn't work for pixels c++ reader.
249
250
250
-
### 6. Install Boost C++ Libraries
251
+
### 5. Install Boost C++ Libraries
251
252
We need the Boost C++ Libraries in pixels-cli, which can be installed with the following command.
0 commit comments