@@ -35,6 +35,12 @@ pip3 install --user -r requirements.txt
3535cd ~ /ASAPQuery/asap-query-engine && cargo build --release
3636```
3737
38+ > ** UTC requirement:** Both ASAP and ClickHouse must run in UTC so that bare
39+ > datetime strings (` 'YYYY-MM-DD HH:MM:SS' ` ) are interpreted identically by both
40+ > systems. Set ` TZ=UTC ` in the environment for ASAP processes and ensure
41+ > ClickHouse's ` timezone ` config is set to ` UTC ` . If the two systems run in
42+ > different timezones, queries will target different time windows on each side.
43+
3844---
3945
4046## ClickBench + ClickHouse End-to-End Example
@@ -115,8 +121,7 @@ python generate_queries.py \
115121```
116122
117123This writes:
118- - ` queries/clickbench_asap.sql ` — ASAP queries (ISO timestamps)
119- - ` queries/clickbench_clickhouse.sql ` — ClickHouse queries (datetime timestamps)
124+ - ` queries/clickbench.sql ` — shared query file for both ASAP and ClickHouse
120125- ` queries/clickbench_streaming.yaml ` — Arroyo streaming config
121126- ` queries/clickbench_inference.yaml ` — QueryEngineRust inference config
122127
@@ -166,8 +171,8 @@ Verify: `$INSTALL_DIR/clickhouse client --query "SELECT count(*) FROM hits"`
166171``` bash
167172python run_benchmark.py \
168173 --mode both \
169- --asap-sql-file ./queries/clickbench_asap .sql \
170- --baseline-sql-file ./queries/clickbench_clickhouse .sql \
174+ --asap-sql-file ./queries/clickbench .sql \
175+ --baseline-sql-file ./queries/clickbench .sql \
171176 --asap-url " http://localhost:8088/api/v1/query" \
172177 --output-dir ./results \
173178 --output-prefix clickbench
@@ -258,8 +263,8 @@ python export_to_database.py \
258263``` bash
259264python run_benchmark.py \
260265 --mode both \
261- --asap-sql-file ./queries/h2o_asap .sql \
262- --baseline-sql-file ./queries/h2o_clickhouse .sql \
266+ --asap-sql-file ./queries/h2o .sql \
267+ --baseline-sql-file ./queries/h2o .sql \
263268 --asap-url " http://localhost:8088/api/v1/query" \
264269 --output-dir ./results \
265270 --output-prefix h2o
@@ -290,7 +295,7 @@ python export_to_arroyo.py \
290295cd ~ /ASAPQuery/asap-query-engine
291296
292297./target/release/query_engine_rust \
293- --kafka-topic sketch_topic
298+ --kafka-topic sketch_topic
294299 --input-format json \
295300 --config ~ /ASAPQuery/asap-tools/execution-utilities/benchmark/configs/h2o_inference.yaml \
296301 --streaming-config ~ /ASAPQuery/asap-tools/execution-utilities/benchmark/configs/h2o_streaming.yaml \
@@ -303,25 +308,25 @@ cd ~/ASAPQuery/asap-query-engine
303308### Step 8 — Load data into Elasticsearch (baseline)
304309
305310``` bash
306- python export_to_database.py
307- --dataset h2o
308- --file-path ./data/G1_1e7_1e2_0_0.csv
309- --es-host localhost
310- --es-port 9200
311- --es-index h2o_groupby
311+ python export_to_database.py
312+ --dataset h2o
313+ --file-path ./data/G1_1e7_1e2_0_0.csv
314+ --es-host localhost
315+ --es-port 9200
316+ --es-index h2o_groupby
312317 --es-api-key your-api-key
313318 --es-bulk-size 5000
314319```
315320
316321### Step 9 — Run benchmark
317322
318323``` bash
319- python run_benchmark.py
320- --mode asap
321- --asap-sql-file ./queries/h2o_asap .sql
322- --baseline-sql-file ./queries/h2o_elasticsearch .sql
323- --elastic-host localhost
324- --elastic-port 9200
324+ python run_benchmark.py
325+ --mode asap
326+ --asap-sql-file ./queries/h2o .sql
327+ --baseline-sql-file ./queries/h2o .sql
328+ --elastic-host localhost
329+ --elastic-port 9200
325330 --elastic-api-key your-api-key
326331 --output-dir ./results --output-prefix h2o
327332```
@@ -370,8 +375,8 @@ python export_to_database.py \
370375# 6. Run benchmark
371376python run_benchmark.py \
372377 --mode both \
373- --asap-sql-file ./queries/my_dataset_asap .sql \
374- --baseline-sql-file ./queries/my_dataset_clickhouse .sql \
378+ --asap-sql-file ./queries/my_dataset .sql \
379+ --baseline-sql-file ./queries/my_dataset .sql \
375380 --asap-url " http://localhost:8088/api/v1/query" \
376381 --output-dir ./results
377382```
@@ -407,6 +412,6 @@ $INSTALL_DIR/clickhouse client --query "TRUNCATE TABLE hits"
407412| ` prepare_data.py ` | Convert raw data to Arroyo file source format (RFC3339, string columns) |
408413| ` export_to_arroyo.py ` | Launch Arroyo sketch pipeline (file or kafka source) |
409414| ` export_to_database.py ` | Load data into ClickHouse for baseline |
410- | ` generate_queries.py ` | Generate paired ASAP + ClickHouse SQL query files and streaming/inference YAML configs |
415+ | ` generate_queries.py ` | Generate a shared SQL query file ( ClickHouse-compatible syntax, used for both ASAP and ClickHouse) and optional streaming/inference YAML configs |
411416| ` run_benchmark.py ` | Run queries and produce CSV results + plots |
412417| ` configs/ ` | ClickHouse init SQL (CREATE TABLE statements) |
0 commit comments