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
use bench_vortex::clickbench::{clickbench_queries,HITS_SCHEMA};
7
+
use bench_vortex::{clickbench, execute_query, get_session_with_cache, idempotent,IdempotentPath};
8
+
use criterion::{criterion_group, criterion_main,Criterion};
9
+
use tokio::runtime::Builder;
10
+
11
+
fnbenchmark(c:&mutCriterion){
12
+
let runtime = Builder::new_multi_thread().enable_all().build().unwrap();
13
+
let basepath = "clickbench".to_data_path();
14
+
15
+
// The clickbench-provided file is missing some higher-level type info, so we reprocess it
16
+
// to add that info, see https://github.com/ClickHouse/ClickBench/issues/7.
17
+
for idx in0..100{
18
+
let output_path = basepath.join(format!("hits_{idx}.parquet"));
19
+
idempotent(&output_path, |output_path| {
20
+
eprintln!("Fixing parquet file {idx}");
21
+
let home = std::env::var("HOME").unwrap_or_else(|_| "/home/ci-runner".to_string());
22
+
let command = format!(
23
+
"
24
+
SET home_directory='{home}';
25
+
INSTALL HTTPFS;
26
+
COPY (SELECT * REPLACE
27
+
(epoch_ms(EventTime * 1000) AS EventTime, \
28
+
epoch_ms(ClientEventTime * 1000) AS ClientEventTime, \
29
+
epoch_ms(LocalEventTime * 1000) AS LocalEventTime, \
30
+
DATE '1970-01-01' + INTERVAL (EventDate) DAYS AS EventDate) \
31
+
FROM read_parquet('https://datasets.clickhouse.com/hits_compatible/athena_partitioned/hits_{idx}.parquet', binary_as_string=True)) TO '{}' (FORMAT 'parquet');",
0 commit comments