diff --git a/datafusion-vortex-partitioned/README.md b/datafusion-vortex-partitioned/README.md new file mode 100644 index 0000000000..4842587a95 --- /dev/null +++ b/datafusion-vortex-partitioned/README.md @@ -0,0 +1,43 @@ +# DataFusion + Vortex + +Partitioned Vortex dataset, converted one-for-one from the 100 ClickBench Parquet files and queried with [`vortex-datafusion-cli`]. + +[`vortex-datafusion-cli`]: https://github.com/vortex-data/vortex-datafusion-cli + +## Cookbook: Generate benchmark results + +Follow the same EC2 setup used by [datafusion-partitioned](../datafusion-partitioned/README.md), then run: + +```bash +cd ClickBench/datafusion-vortex-partitioned +bash benchmark.sh +``` + +The shared benchmark harness builds `vortex-datafusion-cli`, downloads the partitioned Parquet files, converts each `partitioned/hits_N.parquet` file into exactly one `vortex/hits_N.vortex` file, and runs the query set. + +The `install` script checks out `vortex-datafusion-cli` tag `0.70.0-53.1.0`. CLI tags use `-`, where the first component is the `vortex-datafusion` crate version and the second is the DataFusion/DataFusion CLI version. + +You can update/preview the results by running: + +```bash +./make-json.sh # Example. ./make-json.sh c6a.xlarge +``` + +## Parquet To Vortex Conversion + +Each input file is converted independently through `vortex-datafusion-cli`: + +```sql +CREATE EXTERNAL TABLE hits_parquet +STORED AS PARQUET +LOCATION 'partitioned/hits_0.parquet' +OPTIONS ('binary_as_string' 'true'); + +COPY ( + SELECT * EXCEPT ("EventDate"), + CAST(CAST("EventDate" AS INTEGER) AS DATE) AS "EventDate" + FROM hits_parquet +) TO 'vortex/hits_0.vortex' STORED AS VORTEX; +``` + +`binary_as_string=true` handles the incorrect Parquet logical annotation before Vortex is written. The produced Vortex files store those fields as strings, so benchmark reads use only the Vortex table registration. diff --git a/datafusion-vortex-partitioned/benchmark.sh b/datafusion-vortex-partitioned/benchmark.sh index c78ca0e002..b7ae16ae72 100755 --- a/datafusion-vortex-partitioned/benchmark.sh +++ b/datafusion-vortex-partitioned/benchmark.sh @@ -1,6 +1,5 @@ #!/bin/bash -# query_bench (the vortex driver) handles its own dataset download/conversion. -export BENCH_DOWNLOAD_SCRIPT="" +export BENCH_DOWNLOAD_SCRIPT="download-hits-parquet-partitioned" export BENCH_RESTARTABLE=no # Single-process engine: each query forks a fresh full-machine process with no # shared scheduler across connections, so the concurrent-QPS test only diff --git a/datafusion-vortex-partitioned/check b/datafusion-vortex-partitioned/check index 1a9d479a70..98d385b378 100755 --- a/datafusion-vortex-partitioned/check +++ b/datafusion-vortex-partitioned/check @@ -1,6 +1,5 @@ #!/bin/bash set -e -# Stateless system — confirm datafusion-cli (the playground's query -# driver) is on PATH. -command -v datafusion-cli >/dev/null +DF=vortex-datafusion-cli/target/release/vortex-datafusion-cli +"$DF" -q -c "SELECT 1" >/dev/null diff --git a/datafusion-vortex-partitioned/create.sql b/datafusion-vortex-partitioned/create.sql index 858646b651..e54d401ac9 100644 --- a/datafusion-vortex-partitioned/create.sql +++ b/datafusion-vortex-partitioned/create.sql @@ -1,9 +1,3 @@ -CREATE EXTERNAL TABLE hits_raw -STORED AS PARQUET -LOCATION 'partitioned' -OPTIONS ('binary_as_string' 'true'); - -CREATE VIEW hits AS -SELECT * EXCEPT ("EventDate"), - CAST(CAST("EventDate" AS INTEGER) AS DATE) AS "EventDate" -FROM hits_raw; +CREATE EXTERNAL TABLE hits +STORED AS VORTEX +LOCATION 'vortex'; diff --git a/datafusion-vortex-partitioned/data-size b/datafusion-vortex-partitioned/data-size index ec6675b0ed..a8311fb4bf 100755 --- a/datafusion-vortex-partitioned/data-size +++ b/datafusion-vortex-partitioned/data-size @@ -1,5 +1,4 @@ #!/bin/bash set -e -# Sum the byte counts of all generated .vortex files. -find . -name '*.vortex' -printf '%s\n' | awk '{s+=$1} END {print s+0}' +find vortex -name '*.vortex' -printf '%s\n' | awk '{s+=$1} END {print s+0}' diff --git a/datafusion-vortex-partitioned/install b/datafusion-vortex-partitioned/install index 6a24ecfe63..5d88f819f4 100755 --- a/datafusion-vortex-partitioned/install +++ b/datafusion-vortex-partitioned/install @@ -1,41 +1,36 @@ #!/bin/bash set -e -VORTEX_VERSION=0.44.0 +if [ ! -x vortex-datafusion-cli/target/release/vortex-datafusion-cli ]; then + # - + CLI_TAG=0.70.0-53.1.0 -if ! command -v cargo >/dev/null 2>&1; then - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rust-init.sh - bash rust-init.sh -y -fi -export HOME=${HOME:=~} -# shellcheck disable=SC1091 -source ~/.cargo/env + if ! command -v cargo >/dev/null 2>&1; then + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rust-init.sh + bash rust-init.sh -y + fi + export HOME=${HOME:=~} + # shellcheck disable=SC1091 + source "$HOME/.cargo/env" -sudo apt-get update -y -# vortex-duckdb's build.rs runs bindgen, which needs libclang plus the -# clang freestanding headers (stdbool.h etc.); without libclang-dev the -# build fails with `'stdbool.h' file not found`. -sudo apt-get install -y gcc jq build-essential git clang libclang-dev + if [ "$(free -g | awk '/^Mem:/{print $2}')" -lt 12 ]; then + if [ "$(swapon --noheadings --show | wc -l)" -eq 0 ]; then + sudo fallocate -l 8G /swapfile + sudo chmod 600 /swapfile + sudo mkswap /swapfile + sudo swapon /swapfile + fi + fi -if [ ! -d vortex ]; then - git clone https://github.com/spiraldb/vortex.git -fi -( - cd vortex - git fetch --tags - git checkout "$VORTEX_VERSION" - # See datafusion-vortex/install — submodule update isn't idempotent - # without sync + --force when a previous run left a partial clone. - git submodule sync --recursive - git submodule update --init --recursive --force - cargo build --release --bin query_bench --package bench-vortex -) + sudo apt-get update -y + sudo apt-get install -y build-essential clang cmake git libclang-dev pkg-config -# Build datafusion-cli so ./query can return actual rows instead of -# the bench driver's JSON timing blob. See datafusion-vortex/install. -if ! command -v datafusion-cli >/dev/null 2>&1; then - cargo install --locked --version 49.0.2 datafusion-cli - # Cargo installs into $HOME/.cargo/bin; the playground agent - # runs scripts with a stripped PATH, so symlink into /usr/local/bin. - sudo ln -sf "$HOME/.cargo/bin/datafusion-cli" /usr/local/bin/datafusion-cli + if [ ! -d vortex-datafusion-cli ]; then + git clone https://github.com/vortex-data/vortex-datafusion-cli.git + fi + cd vortex-datafusion-cli + git fetch --tags + git checkout "$CLI_TAG" + CARGO_PROFILE_RELEASE_LTO=true RUSTFLAGS="-C codegen-units=1" \ + cargo build --release --bin vortex-datafusion-cli fi diff --git a/datafusion-vortex-partitioned/load b/datafusion-vortex-partitioned/load index 68db5b446c..c485043cb0 100755 --- a/datafusion-vortex-partitioned/load +++ b/datafusion-vortex-partitioned/load @@ -1,9 +1,23 @@ #!/bin/bash set -e -# ./query uses datafusion-cli against the partitioned parquet files -# under partitioned/. See datafusion-vortex/load for the rationale. +DF=vortex-datafusion-cli/target/release/vortex-datafusion-cli + mkdir -p partitioned -../lib/download-hits-parquet-partitioned partitioned +mv hits_*.parquet partitioned/ 2>/dev/null || true + +rm -rf vortex +mkdir -p vortex + +seq 0 99 | xargs -P"$(nproc)" -I{} "$DF" -q \ + -c "SET datafusion.execution.target_partitions = 1;" \ + -c "CREATE EXTERNAL TABLE hits_parquet STORED AS PARQUET LOCATION 'partitioned/hits_{}.parquet' OPTIONS ('binary_as_string' 'true');" \ + -c "COPY (SELECT * EXCEPT (\"EventDate\"), CAST(CAST(\"EventDate\" AS INTEGER) AS DATE) AS \"EventDate\" FROM hits_parquet) TO 'vortex/hits_{}.vortex' STORED AS VORTEX;" + +files=$(find vortex -maxdepth 1 -name 'hits_*.vortex' | wc -l) +if [ "$files" -ne 100 ]; then + echo "Expected 100 Vortex files, found $files" >&2 + exit 1 +fi sync diff --git a/datafusion-vortex-partitioned/make-json.sh b/datafusion-vortex-partitioned/make-json.sh new file mode 100755 index 0000000000..9ebfc16429 --- /dev/null +++ b/datafusion-vortex-partitioned/make-json.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +# This script converts the raw `result.csv` data from `benchmark.sh` into the +# final json format used by the benchmark dashboard. +# +# usage : ./make-json.sh +# +# example (save results//c6a.4xlarge.json) +# ./make-json.sh c6a.4xlarge + +MACHINE=$1 +DATE=$(date -u +%Y-%m-%d) +YYYYMMDD=${DATE//-/} +mkdir -p "results/${YYYYMMDD}" +OUTPUT_FILE="results/${YYYYMMDD}/${MACHINE}.json" +SYSTEM_NAME="DataFusion (Vortex, partitioned)" +LOAD_TIME=${LOAD_TIME:-null} +DATA_SIZE=${DATA_SIZE:-$(./data-size 2>/dev/null || echo null)} +DATA_SIZE=${DATA_SIZE:-null} + +# Read the CSV and build the result array using sed +RESULT_ARRAY=$(awk -F, '{arr[$1]=arr[$1]","$3} END {for (i=1;i<=length(arr);i++) {gsub(/^,/, "", arr[i]); printf " ["arr[i]"]"; if (i $OUTPUT_FILE +{ + "system": "$SYSTEM_NAME", + "date": "$DATE", + "machine": "$MACHINE", + "cluster_size": 1, + "proprietary": "no", + "tuned": "no", + "hardware": "cpu", + "tags": ["Rust","column-oriented","embedded","stateless"], + "load_time": $LOAD_TIME, + "data_size": $DATA_SIZE, + "result": [ + $RESULT_ARRAY + ] +} +EOF diff --git a/datafusion-vortex-partitioned/queries.sql b/datafusion-vortex-partitioned/queries.sql index bca0820629..5be85b3f87 100644 --- a/datafusion-vortex-partitioned/queries.sql +++ b/datafusion-vortex-partitioned/queries.sql @@ -16,7 +16,7 @@ SELECT "SearchEngineID", "SearchPhrase", COUNT(*) AS c FROM hits WHERE "SearchPh SELECT "UserID", COUNT(*) FROM hits GROUP BY "UserID" ORDER BY COUNT(*) DESC LIMIT 10; SELECT "UserID", "SearchPhrase", COUNT(*) FROM hits GROUP BY "UserID", "SearchPhrase" ORDER BY COUNT(*) DESC LIMIT 10; SELECT "UserID", "SearchPhrase", COUNT(*) FROM hits GROUP BY "UserID", "SearchPhrase" LIMIT 10; -SELECT "UserID", extract(minute FROM "EventTime") AS m, "SearchPhrase", COUNT(*) FROM hits GROUP BY "UserID", m, "SearchPhrase" ORDER BY COUNT(*) DESC LIMIT 10; +SELECT "UserID", extract(minute FROM to_timestamp_seconds("EventTime")) AS m, "SearchPhrase", COUNT(*) FROM hits GROUP BY "UserID", m, "SearchPhrase" ORDER BY COUNT(*) DESC LIMIT 10; SELECT "UserID" FROM hits WHERE "UserID" = 435090932899640449; SELECT COUNT(*) FROM hits WHERE "URL" LIKE '%google%'; SELECT "SearchPhrase", MIN("URL"), COUNT(*) AS c FROM hits WHERE "URL" LIKE '%google%' AND "SearchPhrase" <> '' GROUP BY "SearchPhrase" ORDER BY c DESC LIMIT 10; @@ -40,4 +40,4 @@ SELECT "URL", COUNT(*) AS PageViews FROM hits WHERE "CounterID" = 62 AND "EventD SELECT "TraficSourceID", "SearchEngineID", "AdvEngineID", CASE WHEN ("SearchEngineID" = 0 AND "AdvEngineID" = 0) THEN "Referer" ELSE '' END AS Src, "URL" AS Dst, COUNT(*) AS PageViews FROM hits WHERE "CounterID" = 62 AND "EventDate" >= '2013-07-01' AND "EventDate" <= '2013-07-31' AND "IsRefresh" = 0 GROUP BY "TraficSourceID", "SearchEngineID", "AdvEngineID", Src, Dst ORDER BY PageViews DESC LIMIT 10 OFFSET 1000; SELECT "URLHash", "EventDate", COUNT(*) AS PageViews FROM hits WHERE "CounterID" = 62 AND "EventDate" >= '2013-07-01' AND "EventDate" <= '2013-07-31' AND "IsRefresh" = 0 AND "TraficSourceID" IN (-1, 6) AND "RefererHash" = 3594120000172545465 GROUP BY "URLHash", "EventDate" ORDER BY PageViews DESC LIMIT 10 OFFSET 100; SELECT "WindowClientWidth", "WindowClientHeight", COUNT(*) AS PageViews FROM hits WHERE "CounterID" = 62 AND "EventDate" >= '2013-07-01' AND "EventDate" <= '2013-07-31' AND "IsRefresh" = 0 AND "DontCountHits" = 0 AND "URLHash" = 2868770270353813622 GROUP BY "WindowClientWidth", "WindowClientHeight" ORDER BY PageViews DESC LIMIT 10 OFFSET 10000; -SELECT DATE_TRUNC('minute', "EventTime") AS M, COUNT(*) AS PageViews FROM hits WHERE "CounterID" = 62 AND "EventDate" >= '2013-07-14' AND "EventDate" <= '2013-07-15' AND "IsRefresh" = 0 AND "DontCountHits" = 0 GROUP BY DATE_TRUNC('minute', "EventTime") ORDER BY DATE_TRUNC('minute', M) LIMIT 10 OFFSET 1000; +SELECT DATE_TRUNC('minute', to_timestamp_seconds("EventTime")) AS M, COUNT(*) AS PageViews FROM hits WHERE "CounterID" = 62 AND "EventDate" >= '2013-07-14' AND "EventDate" <= '2013-07-15' AND "IsRefresh" = 0 AND "DontCountHits" = 0 GROUP BY DATE_TRUNC('minute', to_timestamp_seconds("EventTime")) ORDER BY DATE_TRUNC('minute', M) LIMIT 10 OFFSET 1000; diff --git a/datafusion-vortex-partitioned/query b/datafusion-vortex-partitioned/query index 090d16b735..2e4df9d6a9 100755 --- a/datafusion-vortex-partitioned/query +++ b/datafusion-vortex-partitioned/query @@ -1,17 +1,16 @@ #!/bin/bash -# Reads a SQL query from stdin, runs it via datafusion-cli against the -# partitioned parquet files. See ../datafusion-vortex/query for the -# rationale; the vortex bench binary is benchmark-only. -# Stdout: query result. -# Stderr: query runtime in fractional seconds on the last line. +# Reads a SQL query from stdin and runs it via vortex-datafusion-cli. +# Stdout: query result. Stderr: query runtime in fractional seconds. set -e +DF=vortex-datafusion-cli/target/release/vortex-datafusion-cli + query=$(cat) -tmp=$(mktemp /tmp/datafusion.XXXXXX.sql) +tmp=$(mktemp /tmp/datafusion-vortex.XXXXXX.sql) trap 'rm -f "$tmp"' EXIT printf '%s\n' "$query" > "$tmp" -out=$(datafusion-cli -f create.sql "$tmp" 2>&1) && status=0 || status=$? +out=$("$DF" -f create.sql -f "$tmp" 2>&1) && status=0 || status=$? if [ "$status" -ne 0 ]; then printf '%s\n' "$out" >&2 @@ -19,5 +18,4 @@ if [ "$status" -ne 0 ]; then fi printf '%s\n' "$out" | grep -v 'Elapsed' || true - printf '%s\n' "$out" | awk '/Elapsed/ { e = $2 } END { print e }' >&2 diff --git a/datafusion-vortex-partitioned/results/20260721/c6a.2xlarge.json b/datafusion-vortex-partitioned/results/20260721/c6a.2xlarge.json new file mode 100644 index 0000000000..3608b129a5 --- /dev/null +++ b/datafusion-vortex-partitioned/results/20260721/c6a.2xlarge.json @@ -0,0 +1,60 @@ +{ + "system": "DataFusion (Vortex, partitioned)", + "date": "2026-07-21", + "machine": "c6a.2xlarge", + "cluster_size": 1, + "proprietary": "no", + "hardware": "cpu", + "tuned": "no", + "tags": ["Rust","column-oriented","embedded","stateless"], + "load_time": 120, + "data_size": 15328662856, + "concurrent_qps": null, + "concurrent_error_ratio": null, + "result": [ + [0.074, 0.002, 0.002], + [0.159, 0.029, 0.03], + [0.228, 0.078, 0.077], + [0.622, 0.078, 0.079], + [1.244, 0.892, 0.905], + [1.248, 0.844, 0.84], + [0.06, 0.002, 0.002], + [0.171, 0.034, 0.037], + [1.348, 1.118, 1.112], + [1.673, 1.353, 1.309], + [0.717, 0.173, 0.162], + [0.982, 0.203, 0.201], + [1.361, 0.729, 0.746], + [3.284, 1.306, 1.33], + [1.429, 0.701, 0.714], + [1.168, 1.026, 1.029], + [3.22, 1.905, 1.902], + [3.202, 1.904, 1.899], + [5.2, 3.771, 3.756], + [0.363, 0.048, 0.053], + [15.441, 0.931, 0.923], + [17.855, 1.008, 1.011], + [22.754, 1.201, 1.176], + [22.888, 1.622, 1.712], + [0.311, 0.088, 0.088], + [1.486, 0.157, 0.158], + [0.446, 0.086, 0.09], + [16.13, 1.112, 1.062], + [15.69, 15.277, 15.4], + [0.852, 0.707, 0.695], + [2.841, 0.648, 0.642], + [5.863, 0.689, 0.688], + [3.928, 3.188, 3.237], + [15.996, 3.841, 3.896], + [16.071, 3.78, 3.809], + [1.553, 1.377, 1.384], + [0.242, 0.078, 0.079], + [0.199, 0.036, 0.037], + [0.197, 0.027, 0.024], + [0.339, 0.141, 0.138], + [0.231, 0.018, 0.017], + [0.233, 0.018, 0.016], + [0.229, 0.015, 0.015] +] + } + \ No newline at end of file diff --git a/datafusion-vortex-partitioned/results/20260721/c6a.4xlarge.json b/datafusion-vortex-partitioned/results/20260721/c6a.4xlarge.json new file mode 100644 index 0000000000..c187789855 --- /dev/null +++ b/datafusion-vortex-partitioned/results/20260721/c6a.4xlarge.json @@ -0,0 +1,60 @@ +{ + "system": "DataFusion (Vortex, partitioned)", + "date": "2026-07-21", + "machine": "c6a.4xlarge", + "cluster_size": 1, + "proprietary": "no", + "hardware": "cpu", + "tuned": "no", + "tags": ["Rust","column-oriented","embedded","stateless"], + "load_time": 111, + "data_size": 15328662856, + "concurrent_qps": null, + "concurrent_error_ratio": null, + "result": [ + [0.068, 0.002, 0.002], + [0.132, 0.026, 0.029], + [0.176, 0.06, 0.055], + [0.62, 0.094, 0.087], + [1.184, 0.624, 0.623], + [1.301, 0.597, 0.596], + [0.058, 0.002, 0.002], + [0.144, 0.031, 0.031], + [1.191, 0.79, 0.788], + [1.685, 0.888, 0.886], + [0.708, 0.142, 0.134], + [1.033, 0.154, 0.151], + [1.501, 0.583, 0.582], + [3.148, 1.076, 1.072], + [1.372, 0.603, 0.601], + [0.898, 0.724, 0.714], + [3.121, 1.525, 1.525], + [3.088, 1.509, 1.526], + [4.93, 2.91, 2.907], + [0.295, 0.055, 0.051], + [15.715, 0.549, 0.547], + [17.849, 0.804, 0.795], + [22.979, 0.903, 0.91], + [21.059, 0.796, 0.806], + [0.456, 0.096, 0.096], + [1.538, 0.15, 0.152], + [0.691, 0.093, 0.091], + [16.164, 0.868, 0.87], + [13.667, 8.139, 8.224], + [0.493, 0.377, 0.373], + [2.807, 0.499, 0.506], + [5.865, 0.6, 0.598], + [3.904, 2.775, 2.825], + [15.93, 3.05, 3.043], + [15.946, 3.07, 3.024], + [1.074, 0.94, 0.936], + [0.242, 0.082, 0.082], + [0.185, 0.035, 0.035], + [0.187, 0.024, 0.023], + [0.391, 0.149, 0.145], + [0.244, 0.018, 0.015], + [0.237, 0.016, 0.014], + [0.231, 0.015, 0.014] +] + } + \ No newline at end of file diff --git a/datafusion-vortex-partitioned/results/20260721/c6a.metal.json b/datafusion-vortex-partitioned/results/20260721/c6a.metal.json new file mode 100644 index 0000000000..af800f3bdd --- /dev/null +++ b/datafusion-vortex-partitioned/results/20260721/c6a.metal.json @@ -0,0 +1,60 @@ +{ + "system": "DataFusion (Vortex, partitioned)", + "date": "2026-07-21", + "machine": "c6a.metal", + "cluster_size": 1, + "proprietary": "no", + "hardware": "cpu", + "tuned": "no", + "tags": ["Rust","column-oriented","embedded","stateless"], + "load_time": 110, + "data_size": 15328662856, + "concurrent_qps": null, + "concurrent_error_ratio": null, + "result": [ + [0.086, 0.002, 0.002], + [0.193, 0.096, 0.086], + [0.201, 0.093, 0.121], + [0.54, 0.113, 0.112], + [0.636, 0.275, 0.241], + [0.886, 0.289, 0.295], + [0.07, 0.002, 0.002], + [0.204, 0.093, 0.091], + [0.958, 0.312, 0.317], + [1.459, 0.389, 0.421], + [0.677, 0.161, 0.149], + [0.752, 0.149, 0.147], + [0.912, 0.279, 0.262], + [2.479, 0.462, 0.458], + [1.054, 0.28, 0.277], + [0.606, 0.264, 0.267], + [2.358, 0.524, 0.493], + [2.353, 0.523, 0.51], + [3.624, 0.948, 0.92], + [0.315, 0.1, 0.091], + [0.136, 0.018, 0.016], + [0.133, 0.017, 0.018], + [22.477, 0.377, 0.38], + [52.396, 0.807, 0.788], + [1.571, 0.103, 0.087], + [0.931, 0.134, 0.167], + [1.547, 0.12, 0.107], + [0.129, 0.018, 0.019], + [0.137, 0.019, 6.337], + [0.286, 0.141, 0.14], + [2.391, 0.274, 0.263], + [5.351, 0.375, 0.355], + [3.79, 1.489, 1.429], + [0.129, 0.017, 0.02], + [0.135, 0.018, 0.019], + [0.647, 0.341, 0.351], + [0.281, 0.105, 0.112], + [0.239, 0.056, 0.055], + [0.233, 0.045, 0.047], + [0.426, 0.206, 0.189], + [0.224, 0.041, 0.041], + [0.224, 0.043, 0.042], + [0.21, 0.04, 0.04] +] + } + \ No newline at end of file diff --git a/datafusion-vortex-partitioned/results/20260721/c6a.xlarge.json b/datafusion-vortex-partitioned/results/20260721/c6a.xlarge.json new file mode 100644 index 0000000000..7e87a3fcac --- /dev/null +++ b/datafusion-vortex-partitioned/results/20260721/c6a.xlarge.json @@ -0,0 +1,60 @@ +{ + "system": "DataFusion (Vortex, partitioned)", + "date": "2026-07-21", + "machine": "c6a.xlarge", + "cluster_size": 1, + "proprietary": "no", + "hardware": "cpu", + "tuned": "no", + "tags": ["Rust","column-oriented","embedded","stateless"], + "load_time": 210, + "data_size": 15328662856, + "concurrent_qps": null, + "concurrent_error_ratio": null, + "result": [ + [0.089, 0.002, 0.002], + [0.24, 0.047, 0.048], + [0.377, 0.132, 0.135], + [1.173, 0.102, 0.105], + [1.628, 1.46, 1.459], + [1.466, 1.303, 1.315], + [0.068, 0.002, 0.002], + [0.247, 0.058, 0.066], + [2.125, 1.847, 1.827], + [2.592, 2.208, 2.229], + [0.786, 0.278, 0.28], + [0.849, 0.346, 0.346], + [1.511, 1.065, 1.073], + [3.279, 1.751, 1.559], + [1.623, 1.041, 1.043], + [1.795, 1.605, 1.641], + [3.664, 2.967, 2.975], + [3.649, 3.034, 2.95], + [33.258, 16.835, 12.797], + [0.536, 0.07, 0.068], + [15.078, 1.706, 1.694], + [17.841, 1.691, 1.673], + [22.541, 1.938, 1.919], + [18.066, 2.254, 2.238], + [0.356, 0.103, 0.112], + [1.183, 0.246, 0.253], + [0.354, 0.117, 0.118], + [15.922, 1.759, 1.762], + [28.956, 28.463, 28.425], + [1.495, 1.317, 1.331], + [2.867, 0.967, 0.973], + [5.887, 0.95, 0.957], + [16.777, 16.597, 7.056], + [29.362, 24.905, 19.86], + [19.115, 19.409, 22.832], + [2.446, 2.238, 2.252], + [0.273, 0.082, 0.078], + [0.218, 0.038, 0.038], + [0.256, 0.03, 0.03], + [0.414, 0.138, 0.134], + [0.245, 0.019, 0.017], + [0.231, 0.019, 0.02], + [0.224, 0.017, 0.016] +] + } + \ No newline at end of file diff --git a/datafusion-vortex-partitioned/results/20260721/c7a.metal-48xl.json b/datafusion-vortex-partitioned/results/20260721/c7a.metal-48xl.json new file mode 100644 index 0000000000..ccba44a647 --- /dev/null +++ b/datafusion-vortex-partitioned/results/20260721/c7a.metal-48xl.json @@ -0,0 +1,60 @@ +{ + "system": "DataFusion (Vortex, partitioned)", + "date": "2026-07-21", + "machine": "c7a.metal-48xl", + "cluster_size": 1, + "proprietary": "no", + "hardware": "cpu", + "tuned": "no", + "tags": ["Rust","column-oriented","embedded","stateless"], + "load_time": 118, + "data_size": 15328662856, + "concurrent_qps": null, + "concurrent_error_ratio": null, + "result": [ + [0.083, 0.002, 0.002], + [0.181, 0.056, 0.061], + [0.28, 0.061, 0.062], + [0.532, 0.063, 0.068], + [0.75, 0.176, 0.186], + [0.923, 0.184, 0.182], + [0.073, 0.002, 0.003], + [0.193, 0.061, 0.067], + [0.942, 0.213, 0.22], + [1.426, 0.299, 0.301], + [0.661, 0.1, 0.108], + [0.753, 0.106, 0.108], + [0.916, 0.16, 0.163], + [2.405, 0.284, 0.289], + [1.052, 0.167, 0.174], + [0.616, 0.19, 0.188], + [2.343, 0.303, 0.298], + [2.334, 0.3, 0.322], + [3.664, 0.595, 0.609], + [0.333, 0.061, 0.061], + [0.131, 0.017, 0.018], + [0.137, 0.018, 0.016], + [0.132, 14.012, 0.555], + [53.432, 0.641, 0.633], + [1.529, 0.058, 0.053], + [1.016, 0.092, 0.1], + [1.581, 0.057, 0.057], + [0.127, 0.018, 0.017], + [0.122, 0.018, 6.674], + [0.229, 0.086, 0.09], + [2.387, 0.185, 0.189], + [5.339, 0.235, 0.246], + [3.848, 1.031, 1.025], + [0.128, 0.016, 0.016], + [0.125, 0.015, 0.017], + [0.595, 0.227, 0.221], + [0.303, 0.095, 0.099], + [0.248, 0.056, 0.046], + [0.239, 0.043, 0.041], + [0.447, 0.191, 0.232], + [0.248, 0.039, 0.042], + [0.231, 0.038, 0.035], + [0.217, 0.03, 0.037] +] + } + \ No newline at end of file diff --git a/datafusion-vortex-partitioned/results/20260721/c8g.4xlarge.json b/datafusion-vortex-partitioned/results/20260721/c8g.4xlarge.json new file mode 100644 index 0000000000..293cbf73ab --- /dev/null +++ b/datafusion-vortex-partitioned/results/20260721/c8g.4xlarge.json @@ -0,0 +1,60 @@ +{ + "system": "DataFusion (Vortex, partitioned)", + "date": "2026-07-21", + "machine": "c8g.4xlarge", + "cluster_size": 1, + "proprietary": "no", + "hardware": "cpu", + "tuned": "no", + "tags": ["Rust","column-oriented","embedded","stateless"], + "load_time": 121, + "data_size": 15329147920, + "concurrent_qps": null, + "concurrent_error_ratio": null, + "result": [ + [0.041, 0.001, 0.001], + [0.093, 0.016, 0.015], + [0.128, 0.038, 0.036], + [0.593, 0.032, 0.031], + [1.198, 0.226, 0.235], + [1.159, 0.241, 0.24], + [0.039, 0.001, 0.001], + [0.101, 0.018, 0.018], + [1.031, 0.32, 0.312], + [1.604, 0.595, 0.598], + [0.662, 0.06, 0.063], + [1.215, 0.077, 0.075], + [1.535, 0.225, 0.223], + [2.824, 0.363, 0.363], + [1.279, 0.236, 0.228], + [0.782, 0.265, 0.268], + [2.691, 0.517, 0.517], + [2.69, 0.505, 0.52], + [3.913, 0.957, 0.972], + [0.284, 0.027, 0.021], + [15.797, 0.472, 0.466], + [17.741, 0.304, 0.307], + [22.947, 0.388, 0.377], + [20.103, 0.516, 0.494], + [0.501, 0.031, 0.038], + [1.657, 0.059, 0.06], + [0.928, 0.038, 0.032], + [16.255, 0.323, 0.325], + [13.373, 6.411, 6.402], + [0.442, 0.355, 0.352], + [2.718, 0.191, 0.194], + [5.956, 0.197, 0.199], + [3.962, 0.755, 0.752], + [15.882, 1.076, 1.065], + [15.884, 1.076, 1.074], + [0.573, 0.456, 0.457], + [0.164, 0.054, 0.055], + [0.135, 0.033, 0.032], + [0.135, 0.019, 0.016], + [0.262, 0.108, 0.107], + [0.129, 0.013, 0.013], + [0.127, 0.013, 0.012], + [0.124, 0.014, 0.014] +] + } + \ No newline at end of file diff --git a/datafusion-vortex-partitioned/results/20260721/c8g.metal-48xl.json b/datafusion-vortex-partitioned/results/20260721/c8g.metal-48xl.json new file mode 100644 index 0000000000..e572327132 --- /dev/null +++ b/datafusion-vortex-partitioned/results/20260721/c8g.metal-48xl.json @@ -0,0 +1,60 @@ +{ + "system": "DataFusion (Vortex, partitioned)", + "date": "2026-07-21", + "machine": "c8g.metal-48xl", + "cluster_size": 1, + "proprietary": "no", + "hardware": "cpu", + "tuned": "no", + "tags": ["Rust","column-oriented","embedded","stateless"], + "load_time": 120, + "data_size": 15329147920, + "concurrent_qps": null, + "concurrent_error_ratio": null, + "result": [ + [0.04, 0.002, 0.002], + [0.106, 0.057, 0.057], + [0.126, 0.053, 0.069], + [0.485, 0.059, 0.077], + [1.002, 0.178, 0.185], + [0.983, 0.163, 0.153], + [0.032, 0.002, 0.002], + [0.112, 0.055, 0.054], + [0.853, 0.195, 0.212], + [1.46, 0.244, 0.254], + [0.583, 0.09, 0.105], + [1.031, 0.103, 0.106], + [1.187, 0.15, 0.138], + [2.545, 0.238, 0.244], + [0.942, 0.141, 0.142], + [0.818, 0.168, 0.163], + [2.448, 0.282, 0.268], + [2.242, 0.283, 0.296], + [3.339, 0.49, 0.478], + [0.251, 0.069, 0.059], + [0.093, 0.012, 0.011], + [0.093, 0.011, 0.012], + [22.533, 0.504, 0.233], + [53.536, 1.708, 1.414], + [1.454, 0.058, 0.057], + [1.308, 0.081, 0.072], + [1.979, 0.056, 0.055], + [0.091, 0.012, 0.011], + [0.091, 0.011, 0.011], + [0.188, 0.137, 0.154], + [2.57, 0.141, 0.143], + [5.52, 0.195, 0.173], + [3.743, 0.759, 0.763], + [0.085, 0.012, 0.011], + [0.086, 0.011, 0.012], + [0.752, 0.181, 0.181], + [0.149, 0.068, 0.066], + [0.13, 0.044, 0.043], + [0.126, 0.032, 0.031], + [0.237, 0.126, 0.127], + [0.121, 0.03, 0.03], + [0.117, 0.029, 0.028], + [0.106, 0.029, 0.028] +] + } + \ No newline at end of file diff --git a/datafusion-vortex/README.md b/datafusion-vortex/README.md new file mode 100644 index 0000000000..ed45008536 --- /dev/null +++ b/datafusion-vortex/README.md @@ -0,0 +1,43 @@ +# DataFusion + Vortex + +Single-file Vortex dataset, converted from the ClickBench Parquet file and queried with [`vortex-datafusion-cli`]. + +[`vortex-datafusion-cli`]: https://github.com/vortex-data/vortex-datafusion-cli + +## Cookbook: Generate benchmark results + +Follow the same EC2 setup used by [datafusion](../datafusion/README.md), then run: + +```bash +cd ClickBench/datafusion-vortex +bash benchmark.sh +``` + +The shared benchmark harness builds `vortex-datafusion-cli`, downloads `hits.parquet`, converts it to `vortex/hits.vortex`, and runs the query set. + +The `install` script checks out `vortex-datafusion-cli` tag `0.70.0-53.1.0`. CLI tags use `-`, where the first component is the `vortex-datafusion` crate version and the second is the DataFusion/DataFusion CLI version. + +You can update/preview the results by running: + +```bash +./make-json.sh # Example. ./make-json.sh c6a.xlarge +``` + +## Parquet To Vortex Conversion + +The conversion intentionally goes through the DataFusion CLI path: + +```sql +CREATE EXTERNAL TABLE hits_parquet +STORED AS PARQUET +LOCATION 'hits.parquet' +OPTIONS ('binary_as_string' 'true'); + +COPY ( + SELECT * EXCEPT ("EventDate"), + CAST(CAST("EventDate" AS INTEGER) AS DATE) AS "EventDate" + FROM hits_parquet +) TO 'vortex/hits.vortex' STORED AS VORTEX; +``` + +`binary_as_string=true` handles the ClickBench Parquet byte/string mismatch before Vortex is written. The resulting Vortex file stores those columns as strings, so Vortex reads do not need the Parquet-only option. diff --git a/datafusion-vortex/benchmark.sh b/datafusion-vortex/benchmark.sh index ae4a29cf69..fb3b4d1318 100755 --- a/datafusion-vortex/benchmark.sh +++ b/datafusion-vortex/benchmark.sh @@ -1,6 +1,5 @@ #!/bin/bash -# clickbench (the vortex driver) handles its own dataset download/conversion. -export BENCH_DOWNLOAD_SCRIPT="" +export BENCH_DOWNLOAD_SCRIPT="download-hits-parquet-single" export BENCH_RESTARTABLE=no # Single-process engine: each query forks a fresh full-machine process with no # shared scheduler across connections, so the concurrent-QPS test only diff --git a/datafusion-vortex/check b/datafusion-vortex/check index bc7a2938f9..98d385b378 100755 --- a/datafusion-vortex/check +++ b/datafusion-vortex/check @@ -1,8 +1,5 @@ #!/bin/bash set -e -# Stateless system — confirm datafusion-cli (the playground's query -# driver) is built. The vortex bench binary (used by benchmark.sh, -# not by ./query) was renamed from `clickbench` to `query_bench` -# upstream, so the old check would always fail post-install. -command -v datafusion-cli >/dev/null +DF=vortex-datafusion-cli/target/release/vortex-datafusion-cli +"$DF" -q -c "SELECT 1" >/dev/null diff --git a/datafusion-vortex/create.sql b/datafusion-vortex/create.sql index 8efc6dea74..a5cfc6c05d 100644 --- a/datafusion-vortex/create.sql +++ b/datafusion-vortex/create.sql @@ -1,10 +1,3 @@ -CREATE EXTERNAL TABLE hits_raw -STORED AS PARQUET -LOCATION 'hits.parquet' -OPTIONS ('binary_as_string' 'true'); - - -CREATE VIEW hits AS -SELECT * EXCEPT ("EventDate"), - CAST(CAST("EventDate" AS INTEGER) AS DATE) AS "EventDate" -FROM hits_raw; +CREATE EXTERNAL TABLE hits +STORED AS VORTEX +LOCATION 'vortex/hits.vortex'; diff --git a/datafusion-vortex/data-size b/datafusion-vortex/data-size index ec6675b0ed..a8311fb4bf 100755 --- a/datafusion-vortex/data-size +++ b/datafusion-vortex/data-size @@ -1,5 +1,4 @@ #!/bin/bash set -e -# Sum the byte counts of all generated .vortex files. -find . -name '*.vortex' -printf '%s\n' | awk '{s+=$1} END {print s+0}' +find vortex -name '*.vortex' -printf '%s\n' | awk '{s+=$1} END {print s+0}' diff --git a/datafusion-vortex/install b/datafusion-vortex/install index 057159ae6d..5d88f819f4 100755 --- a/datafusion-vortex/install +++ b/datafusion-vortex/install @@ -1,56 +1,36 @@ #!/bin/bash set -e -# 0.34.0 referenced two private spiraldb-owned submodules -# (spiraldb/duckdb and spiraldb/duckdb-rs) under duckdb-vortex/, which -# now 404 on GitHub. From 0.41.0 onward the duckdb dep moved to the -# upstream duckdb/duckdb repo, and 0.42.0+ ship without a .gitmodules -# file at all (vendored / Cargo registry deps). 0.44.0 matches what -# datafusion-vortex-partitioned uses. -VORTEX_VERSION=0.44.0 +if [ ! -x vortex-datafusion-cli/target/release/vortex-datafusion-cli ]; then + # - + CLI_TAG=0.70.0-53.1.0 -if ! command -v cargo >/dev/null 2>&1; then - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rust-init.sh - bash rust-init.sh -y -fi -export HOME=${HOME:=~} -# shellcheck disable=SC1091 -source ~/.cargo/env + if ! command -v cargo >/dev/null 2>&1; then + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rust-init.sh + bash rust-init.sh -y + fi + export HOME=${HOME:=~} + # shellcheck disable=SC1091 + source "$HOME/.cargo/env" -sudo apt-get update -y -# vortex-duckdb's build.rs runs bindgen, which needs libclang plus the -# clang freestanding headers (stdbool.h etc.); without libclang-dev the -# build fails with `'stdbool.h' file not found`. -sudo apt-get install -y gcc jq build-essential git clang libclang-dev + if [ "$(free -g | awk '/^Mem:/{print $2}')" -lt 12 ]; then + if [ "$(swapon --noheadings --show | wc -l)" -eq 0 ]; then + sudo fallocate -l 8G /swapfile + sudo chmod 600 /swapfile + sudo mkswap /swapfile + sudo swapon /swapfile + fi + fi -if [ ! -d vortex ]; then - git clone https://github.com/spiraldb/vortex.git -fi -( - cd vortex - git fetch --tags - git checkout "$VORTEX_VERSION" - # `git submodule update --init` fails with - # "fatal: destination path 'duckdb-vortex/duckdb' exists and is not an - # empty directory" once the submodule has been cloned but isn't fully - # registered (a partial state previous runs leave behind). `sync` - # refreshes the configured URLs and `--force` re-checkouts cleanly, - # which is what we want for an idempotent setup. - git submodule sync --recursive - git submodule update --init --recursive --force - # Upstream renamed the `clickbench` bin to `query_bench` — match - # the partitioned variant's install. - cargo build --release --bin query_bench --package bench-vortex -) + sudo apt-get update -y + sudo apt-get install -y build-essential clang cmake git libclang-dev pkg-config -# Build datafusion-cli so ./query can return actual rows instead of -# the bench driver's JSON timing blob. The benchmark binary above -# emits gh-json stats only; for an interactive playground we want a -# proper SQL client. datafusion-cli reads parquet directly — close -# enough to "datafusion (parquet)" semantics for the playground. -if ! command -v datafusion-cli >/dev/null 2>&1; then - cargo install --locked --version 49.0.2 datafusion-cli - # Cargo installs into $HOME/.cargo/bin; the playground agent - # runs scripts with a stripped PATH, so symlink into /usr/local/bin. - sudo ln -sf "$HOME/.cargo/bin/datafusion-cli" /usr/local/bin/datafusion-cli + if [ ! -d vortex-datafusion-cli ]; then + git clone https://github.com/vortex-data/vortex-datafusion-cli.git + fi + cd vortex-datafusion-cli + git fetch --tags + git checkout "$CLI_TAG" + CARGO_PROFILE_RELEASE_LTO=true RUSTFLAGS="-C codegen-units=1" \ + cargo build --release --bin vortex-datafusion-cli fi diff --git a/datafusion-vortex/load b/datafusion-vortex/load index 4fed22b64e..de2a689823 100755 --- a/datafusion-vortex/load +++ b/datafusion-vortex/load @@ -1,12 +1,15 @@ #!/bin/bash set -e -# The ./query path uses datafusion-cli reading hits.parquet directly, -# so make sure that file is in CWD. (The shared bench_download already -# stages it; we don't need vortex's clickbench warmup for playground -# query output.) -if [ ! -e hits.parquet ]; then - ../lib/download-hits-parquet-single . -fi +DF=vortex-datafusion-cli/target/release/vortex-datafusion-cli +rm -rf vortex +mkdir -p vortex + +"$DF" -q \ + -c "SET datafusion.execution.target_partitions = 1;" \ + -c "CREATE EXTERNAL TABLE hits_parquet STORED AS PARQUET LOCATION 'hits.parquet' OPTIONS ('binary_as_string' 'true');" \ + -c "COPY (SELECT * EXCEPT (\"EventDate\"), CAST(CAST(\"EventDate\" AS INTEGER) AS DATE) AS \"EventDate\" FROM hits_parquet) TO 'vortex/hits.vortex' STORED AS VORTEX;" + +test -f vortex/hits.vortex sync diff --git a/datafusion-vortex/make-json.sh b/datafusion-vortex/make-json.sh new file mode 100755 index 0000000000..d19a3ddfab --- /dev/null +++ b/datafusion-vortex/make-json.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +# This script converts the raw `result.csv` data from `benchmark.sh` into the +# final json format used by the benchmark dashboard. +# +# usage : ./make-json.sh +# +# example ./make-json.sh c6a.4xlarge # saves results//c6a.4xlarge.json +# + +MACHINE=$1 +DATE=$(date -u +%Y-%m-%d) +YYYYMMDD=${DATE//-/} +mkdir -p "results/${YYYYMMDD}" +OUTPUT_FILE="results/${YYYYMMDD}/${MACHINE}.json" +SYSTEM_NAME="DataFusion (Vortex, single)" +LOAD_TIME=${LOAD_TIME:-null} +DATA_SIZE=${DATA_SIZE:-$(./data-size 2>/dev/null || echo null)} +DATA_SIZE=${DATA_SIZE:-null} + +# Read the CSV and build the result array using sed +RESULT_ARRAY=$(awk -F, '{arr[$1]=arr[$1]","$3} END {for (i=1;i<=length(arr);i++) {gsub(/^,/, "", arr[i]); printf " ["arr[i]"]"; if (i $OUTPUT_FILE +{ + "system": "$SYSTEM_NAME", + "date": "$DATE", + "machine": "$MACHINE", + "cluster_size": 1, + "proprietary": "no", + "tuned": "no", + "hardware": "cpu", + "tags": ["Rust","column-oriented","embedded","stateless"], + "load_time": $LOAD_TIME, + "data_size": $DATA_SIZE, + "result": [ + $RESULT_ARRAY + ] +} +EOF diff --git a/datafusion-vortex/queries.sql b/datafusion-vortex/queries.sql index bca0820629..5be85b3f87 100644 --- a/datafusion-vortex/queries.sql +++ b/datafusion-vortex/queries.sql @@ -16,7 +16,7 @@ SELECT "SearchEngineID", "SearchPhrase", COUNT(*) AS c FROM hits WHERE "SearchPh SELECT "UserID", COUNT(*) FROM hits GROUP BY "UserID" ORDER BY COUNT(*) DESC LIMIT 10; SELECT "UserID", "SearchPhrase", COUNT(*) FROM hits GROUP BY "UserID", "SearchPhrase" ORDER BY COUNT(*) DESC LIMIT 10; SELECT "UserID", "SearchPhrase", COUNT(*) FROM hits GROUP BY "UserID", "SearchPhrase" LIMIT 10; -SELECT "UserID", extract(minute FROM "EventTime") AS m, "SearchPhrase", COUNT(*) FROM hits GROUP BY "UserID", m, "SearchPhrase" ORDER BY COUNT(*) DESC LIMIT 10; +SELECT "UserID", extract(minute FROM to_timestamp_seconds("EventTime")) AS m, "SearchPhrase", COUNT(*) FROM hits GROUP BY "UserID", m, "SearchPhrase" ORDER BY COUNT(*) DESC LIMIT 10; SELECT "UserID" FROM hits WHERE "UserID" = 435090932899640449; SELECT COUNT(*) FROM hits WHERE "URL" LIKE '%google%'; SELECT "SearchPhrase", MIN("URL"), COUNT(*) AS c FROM hits WHERE "URL" LIKE '%google%' AND "SearchPhrase" <> '' GROUP BY "SearchPhrase" ORDER BY c DESC LIMIT 10; @@ -40,4 +40,4 @@ SELECT "URL", COUNT(*) AS PageViews FROM hits WHERE "CounterID" = 62 AND "EventD SELECT "TraficSourceID", "SearchEngineID", "AdvEngineID", CASE WHEN ("SearchEngineID" = 0 AND "AdvEngineID" = 0) THEN "Referer" ELSE '' END AS Src, "URL" AS Dst, COUNT(*) AS PageViews FROM hits WHERE "CounterID" = 62 AND "EventDate" >= '2013-07-01' AND "EventDate" <= '2013-07-31' AND "IsRefresh" = 0 GROUP BY "TraficSourceID", "SearchEngineID", "AdvEngineID", Src, Dst ORDER BY PageViews DESC LIMIT 10 OFFSET 1000; SELECT "URLHash", "EventDate", COUNT(*) AS PageViews FROM hits WHERE "CounterID" = 62 AND "EventDate" >= '2013-07-01' AND "EventDate" <= '2013-07-31' AND "IsRefresh" = 0 AND "TraficSourceID" IN (-1, 6) AND "RefererHash" = 3594120000172545465 GROUP BY "URLHash", "EventDate" ORDER BY PageViews DESC LIMIT 10 OFFSET 100; SELECT "WindowClientWidth", "WindowClientHeight", COUNT(*) AS PageViews FROM hits WHERE "CounterID" = 62 AND "EventDate" >= '2013-07-01' AND "EventDate" <= '2013-07-31' AND "IsRefresh" = 0 AND "DontCountHits" = 0 AND "URLHash" = 2868770270353813622 GROUP BY "WindowClientWidth", "WindowClientHeight" ORDER BY PageViews DESC LIMIT 10 OFFSET 10000; -SELECT DATE_TRUNC('minute', "EventTime") AS M, COUNT(*) AS PageViews FROM hits WHERE "CounterID" = 62 AND "EventDate" >= '2013-07-14' AND "EventDate" <= '2013-07-15' AND "IsRefresh" = 0 AND "DontCountHits" = 0 GROUP BY DATE_TRUNC('minute', "EventTime") ORDER BY DATE_TRUNC('minute', M) LIMIT 10 OFFSET 1000; +SELECT DATE_TRUNC('minute', to_timestamp_seconds("EventTime")) AS M, COUNT(*) AS PageViews FROM hits WHERE "CounterID" = 62 AND "EventDate" >= '2013-07-14' AND "EventDate" <= '2013-07-15' AND "IsRefresh" = 0 AND "DontCountHits" = 0 GROUP BY DATE_TRUNC('minute', to_timestamp_seconds("EventTime")) ORDER BY DATE_TRUNC('minute', M) LIMIT 10 OFFSET 1000; diff --git a/datafusion-vortex/query b/datafusion-vortex/query index cbd082fae5..2e4df9d6a9 100755 --- a/datafusion-vortex/query +++ b/datafusion-vortex/query @@ -1,19 +1,16 @@ #!/bin/bash -# Reads a SQL query from stdin, runs it via datafusion-cli against the -# parquet file. The vortex bench binary (built in ./install for the -# benchmark.sh path) only emits gh-json timing blobs and has no -# result-printing mode, so for the interactive playground we use -# datafusion-cli directly — matching datafusion (Parquet). -# Stdout: query result. -# Stderr: query runtime in fractional seconds on the last line. +# Reads a SQL query from stdin and runs it via vortex-datafusion-cli. +# Stdout: query result. Stderr: query runtime in fractional seconds. set -e +DF=vortex-datafusion-cli/target/release/vortex-datafusion-cli + query=$(cat) -tmp=$(mktemp /tmp/datafusion.XXXXXX.sql) +tmp=$(mktemp /tmp/datafusion-vortex.XXXXXX.sql) trap 'rm -f "$tmp"' EXIT printf '%s\n' "$query" > "$tmp" -out=$(datafusion-cli -f create.sql "$tmp" 2>&1) && status=0 || status=$? +out=$("$DF" -f create.sql -f "$tmp" 2>&1) && status=0 || status=$? if [ "$status" -ne 0 ]; then printf '%s\n' "$out" >&2 @@ -21,5 +18,4 @@ if [ "$status" -ne 0 ]; then fi printf '%s\n' "$out" | grep -v 'Elapsed' || true - printf '%s\n' "$out" | awk '/Elapsed/ { e = $2 } END { print e }' >&2 diff --git a/datafusion-vortex/results/20260721/c6a.2xlarge.json b/datafusion-vortex/results/20260721/c6a.2xlarge.json new file mode 100644 index 0000000000..604308eeb8 --- /dev/null +++ b/datafusion-vortex/results/20260721/c6a.2xlarge.json @@ -0,0 +1,60 @@ +{ + "system": "DataFusion (Vortex, single)", + "date": "2026-07-21", + "machine": "c6a.2xlarge", + "cluster_size": 1, + "proprietary": "no", + "hardware": "cpu", + "tuned": "no", + "tags": ["Rust","column-oriented","embedded","stateless"], + "load_time": 144, + "data_size": 15269997296, + "concurrent_qps": null, + "concurrent_error_ratio": null, + "result": [ + [0.087, 0.001, 0.001], + [0.289, 0.121, 0.121], + [0.336, 0.171, 0.169], + [0.616, 0.203, 0.199], + [1.184, 0.94, 0.943], + [1.453, 0.89, 0.902], + [0.074, 0.001, 0.001], + [0.313, 0.126, 0.125], + [1.421, 1.166, 1.149], + [1.76, 1.33, 1.353], + [0.741, 0.253, 0.257], + [0.794, 0.284, 0.29], + [1.565, 0.804, 0.795], + [3.071, 1.11, 1.294], + [1.608, 0.768, 0.772], + [1.289, 1.059, 1.048], + [3.455, 1.874, 1.915], + [3.455, 1.908, 1.913], + [5.216, 3.375, 3.162], + [0.376, 0.171, 0.168], + [15.235, 1.076, 1.061], + [18.25, 1.373, 1.368], + [21.978, 9.66, 9.684], + [242.866, null, 290.571], + [2.333, 0.332, 0.327], + [1.254, 0.283, 0.276], + [2.331, 0.328, 0.327], + [16.221, 1.323, 1.347], + [15.908, 15.212, 15.311], + [0.902, 0.747, 0.75], + [2.781, 0.686, 0.682], + [5.807, 0.736, 0.742], + [4.149, 3.08, 3.091], + [16.428, 3.71, 3.631], + [16.426, 3.573, 3.593], + [1.605, 1.367, 1.355], + [0.386, 0.19, 0.193], + [0.327, 0.132, 0.13], + [0.332, 0.145, 0.143], + [0.497, 0.265, 0.266], + [0.321, 0.12, 0.118], + [0.304, 0.117, 0.115], + [0.305, 0.115, 0.115] +] + } + \ No newline at end of file diff --git a/datafusion-vortex/results/20260721/c6a.4xlarge.json b/datafusion-vortex/results/20260721/c6a.4xlarge.json new file mode 100644 index 0000000000..ec7ef7bfbc --- /dev/null +++ b/datafusion-vortex/results/20260721/c6a.4xlarge.json @@ -0,0 +1,60 @@ +{ + "system": "DataFusion (Vortex, single)", + "date": "2026-07-21", + "machine": "c6a.4xlarge", + "cluster_size": 1, + "proprietary": "no", + "hardware": "cpu", + "tuned": "no", + "tags": ["Rust","column-oriented","embedded","stateless"], + "load_time": 81, + "data_size": 15269997296, + "concurrent_qps": null, + "concurrent_error_ratio": null, + "result": [ + [0.081, 0.001, 0.001], + [0.305, 0.153, 0.155], + [0.356, 0.179, 0.184], + [0.635, 0.227, 0.228], + [0.98, 0.767, 0.745], + [1.429, 0.777, 0.805], + [0.073, 0.001, 0.001], + [0.326, 0.155, 0.153], + [1.392, 0.903, 0.915], + [1.852, 1.028, 1.013], + [0.765, 0.245, 0.239], + [0.804, 0.263, 0.254], + [1.54, 0.788, 0.754], + [3.036, 1.072, 1.07], + [1.669, 0.772, 0.795], + [1.375, 0.837, 0.836], + [3.27, 1.654, 1.661], + [3.351, 1.631, 1.65], + [4.885, 2.987, 2.944], + [0.502, 0.201, 0.197], + [15.777, 0.854, 0.858], + [18.274, 1.382, 1.372], + [22.022, 1.449, 1.457], + [57.998, 57.906, 57.955], + [2.369, 0.356, 0.376], + [1.286, 0.328, 0.322], + [2.343, 0.364, 0.364], + [16.275, 1.36, 1.348], + [13.488, 8.362, 8.42], + [0.602, 0.465, 0.477], + [2.834, 0.632, 0.648], + [5.858, 0.734, 0.739], + [5.37, 2.868, 2.841], + [16.398, 3.056, 3.127], + [16.464, 3.109, 3.087], + [1.313, 1.021, 1.002], + [0.393, 0.207, 0.212], + [0.35, 0.165, 0.16], + [0.363, 0.17, 0.182], + [0.528, 0.305, 0.313], + [0.345, 0.156, 0.153], + [0.345, 0.152, 0.144], + [0.337, 0.149, 0.147] +] + } + \ No newline at end of file diff --git a/datafusion-vortex/results/20260721/c6a.metal.json b/datafusion-vortex/results/20260721/c6a.metal.json new file mode 100644 index 0000000000..b4d145452f --- /dev/null +++ b/datafusion-vortex/results/20260721/c6a.metal.json @@ -0,0 +1,60 @@ +{ + "system": "DataFusion (Vortex, single)", + "date": "2026-07-21", + "machine": "c6a.metal", + "cluster_size": 1, + "proprietary": "no", + "hardware": "cpu", + "tuned": "no", + "tags": ["Rust","column-oriented","embedded","stateless"], + "load_time": 94, + "data_size": 15269997296, + "concurrent_qps": null, + "concurrent_error_ratio": null, + "result": [ + [0.085, 0.001, 0.001], + [0.945, 0.823, 0.861], + [0.897, 0.846, 0.845], + [1.07, 0.846, 0.843], + [1.282, 0.974, 0.978], + [1.493, 1, 1.007], + [0.06, 0.001, 0.001], + [0.977, 0.864, 0.85], + [1.537, 1.051, 1.033], + [1.795, 1.152, 1.161], + [1.206, 0.916, 0.926], + [1.221, 0.911, 0.904], + [1.684, 1.041, 1.049], + [3.186, 1.279, 1.26], + [1.863, 1.05, 1.026], + [1.748, 1.011, 0.973], + [2.869, 1.184, 1.19], + [2.832, 1.246, 1.208], + [3.973, 1.498, 1.594], + [1.12, 0.89, 0.844], + [14.85, 1.22, 1.275], + [17.084, 1.495, 1.495], + [21.786, 1.677, 1.661], + [57.708, 2.912, 3.144], + [2.661, 0.962, 0.943], + [1.635, 0.953, 0.9], + [2.621, 0.927, 0.933], + [15.104, 1.452, 1.341], + [12.436, 2.262, 1.958], + [0.912, 0.85, 0.87], + [2.982, 0.993, 0.986], + [6.075, 1.191, 1.152], + [5.096, 1.899, 1.981], + [14.824, 1.619, 1.567], + [14.856, 1.549, 1.551], + [1.129, 1.034, 1.062], + [1.058, 0.974, 0.922], + [1.047, 0.905, 0.939], + [1.027, 0.917, 0.948], + [1.111, 1.092, 1.027], + [1.001, 0.866, 0.856], + [0.986, 0.869, 0.857], + [0.976, 0.88, 0.914] +] + } + \ No newline at end of file diff --git a/datafusion-vortex/results/20260721/c6a.xlarge.json b/datafusion-vortex/results/20260721/c6a.xlarge.json new file mode 100644 index 0000000000..ab62cbb786 --- /dev/null +++ b/datafusion-vortex/results/20260721/c6a.xlarge.json @@ -0,0 +1,60 @@ +{ + "system": "DataFusion (Vortex, single)", + "date": "2026-07-21", + "machine": "c6a.xlarge", + "cluster_size": 1, + "proprietary": "no", + "hardware": "cpu", + "tuned": "no", + "tags": ["Rust","column-oriented","embedded","stateless"], + "load_time": 218, + "data_size": 15269997296, + "concurrent_qps": null, + "concurrent_error_ratio": null, + "result": [ + [0.089, 0.001, 0.001], + [0.298, 0.124, 0.121], + [0.368, 0.217, 0.215], + [0.612, 0.216, 0.206], + [1.689, 1.537, 1.522], + [1.579, 1.394, 1.394], + [0.072, 0.001, 0.001], + [0.306, 0.133, 0.13], + [2.084, 1.909, 1.9], + [2.463, 2.146, 2.099], + [0.751, 0.35, 0.348], + [0.797, 0.404, 0.404], + [1.656, 1.159, 1.165], + [3.495, 1.638, 1.844], + [1.734, 1.123, 1.12], + [1.941, 1.714, 1.691], + [3.768, 2.985, 2.995], + [3.807, 2.995, 3.008], + [15.691, 15.883, 14.003], + [0.381, 0.173, 0.171], + [15.06, 2.225, 2.174], + [33.934, 34.064, 34.152], + [39.818, 39.336, 41.348], + [null, null, null], + [2.318, 0.427, 0.422], + [1.255, 0.348, 0.349], + [2.328, 0.427, 0.431], + [23.213, 25.933, 26.103], + [41.427, 35.796, 37.191], + [1.502, 1.327, 1.321], + [2.805, 1.017, 1.021], + [5.797, 1.02, 1.019], + [6.66, 6.928, 17.016], + [22.291, 23.25, 17.967], + [29.503, 28.045, 17.886], + [2.409, 2.247, 2.244], + [0.379, 0.19, 0.188], + [0.344, 0.133, 0.126], + [0.361, 0.141, 0.139], + [0.551, 0.292, 0.271], + [0.337, 0.111, 0.11], + [0.325, 0.111, 0.109], + [0.323, 0.108, 0.106] +] + } + \ No newline at end of file diff --git a/datafusion-vortex/results/20260721/c7a.metal-48xl.json b/datafusion-vortex/results/20260721/c7a.metal-48xl.json new file mode 100644 index 0000000000..e728c546c0 --- /dev/null +++ b/datafusion-vortex/results/20260721/c7a.metal-48xl.json @@ -0,0 +1,60 @@ +{ + "system": "DataFusion (Vortex, single)", + "date": "2026-07-21", + "machine": "c7a.metal-48xl", + "cluster_size": 1, + "proprietary": "no", + "hardware": "cpu", + "tuned": "no", + "tags": ["Rust","column-oriented","embedded","stateless"], + "load_time": 97, + "data_size": 15269997296, + "concurrent_qps": null, + "concurrent_error_ratio": null, + "result": [ + [0.084, 0.001, 0.001], + [0.999, 0.688, 0.851], + [0.983, 0.869, 0.84], + [1.16, 0.84, 0.78], + [1.155, 0.86, 0.875], + [1.476, 0.823, 0.937], + [0.055, 0.001, 0.001], + [1.015, 0.883, 0.902], + [1.55, 0.893, 0.955], + [1.825, 0.956, 1.078], + [1.192, 0.902, 0.9], + [1.266, 0.823, 0.922], + [1.801, 0.852, 0.922], + [3.105, 1.027, 1.081], + [1.666, 0.963, 0.958], + [1.148, 0.905, 0.883], + [2.868, 0.958, 0.975], + [2.846, 0.943, 0.993], + [3.953, 1.207, 1.246], + [1.189, 0.824, 0.905], + [14.795, 1.107, 1.121], + [16.972, 1.194, 1.291], + [21.772, 1.373, 1.468], + [57.682, 2.511, 2.598], + [2.701, 0.859, 0.933], + [1.656, 0.828, 0.899], + [2.657, 0.876, 0.909], + [15.016, 1.152, 1.157], + [12.329, 1.703, 1.643], + [0.9, 0.862, 0.866], + [2.934, 0.94, 1], + [5.959, 1.024, 0.997], + [4.864, 1.492, 1.459], + [14.887, 1.087, 1.196], + [14.842, 1.178, 1.108], + [1.053, 0.865, 0.971], + [1.119, 0.936, 0.992], + [1.069, 0.896, 0.932], + [1.081, 0.968, 0.941], + [1.214, 0.873, 0.906], + [0.995, 0.913, 0.897], + [0.991, 0.87, 0.824], + [1.029, 0.775, 0.878] +] + } + \ No newline at end of file diff --git a/datafusion-vortex/results/20260721/c8g.4xlarge.json b/datafusion-vortex/results/20260721/c8g.4xlarge.json new file mode 100644 index 0000000000..70dae982c4 --- /dev/null +++ b/datafusion-vortex/results/20260721/c8g.4xlarge.json @@ -0,0 +1,60 @@ +{ + "system": "DataFusion (Vortex, single)", + "date": "2026-07-21", + "machine": "c8g.4xlarge", + "cluster_size": 1, + "proprietary": "no", + "hardware": "cpu", + "tuned": "no", + "tags": ["Rust","column-oriented","embedded","stateless"], + "load_time": 69, + "data_size": 15269901360, + "concurrent_qps": null, + "concurrent_error_ratio": null, + "result": [ + [0.039, 0.001, 0.001], + [0.202, 0.123, 0.121], + [0.21, 0.133, 0.14], + [0.555, 0.134, 0.143], + [0.933, 0.316, 0.322], + [1.212, 0.382, 0.417], + [0.034, 0.001, 0.001], + [0.204, 0.126, 0.126], + [1.13, 0.416, 0.402], + [1.481, 0.608, 0.617], + [0.63, 0.155, 0.166], + [0.896, 0.176, 0.177], + [1.389, 0.344, 0.369], + [2.735, 0.406, 0.416], + [1.39, 0.361, 0.378], + [0.669, 0.358, 0.347], + [2.71, 0.612, 0.626], + [2.692, 0.654, 0.597], + [3.883, 0.962, 1.003], + [0.279, 0.148, 0.141], + [15.957, 0.631, 0.62], + [18.146, 0.524, 0.528], + [21.868, 0.599, 0.603], + [57.995, 131.697, 54.56], + [2.552, 0.194, 0.197], + [1.299, 0.184, 0.177], + [2.391, 0.2, 0.204], + [16.216, 0.529, 0.542], + [15.037, 6.809, 7.709], + [0.469, 0.4, 0.432], + [2.585, 0.376, 0.32], + [5.734, 0.302, 0.307], + [3.751, 0.825, 0.799], + [16.142, 1.176, 1.176], + [16.149, 1.186, 1.171], + [0.592, 0.466, 0.478], + [0.249, 0.162, 0.16], + [0.23, 0.138, 0.146], + [0.244, 0.144, 0.15], + [0.368, 0.272, 0.268], + [0.223, 0.13, 0.129], + [0.22, 0.124, 0.126], + [0.217, 0.122, 0.122] +] + } + \ No newline at end of file diff --git a/datafusion-vortex/results/20260721/c8g.metal-48xl.json b/datafusion-vortex/results/20260721/c8g.metal-48xl.json new file mode 100644 index 0000000000..e8b4c21315 --- /dev/null +++ b/datafusion-vortex/results/20260721/c8g.metal-48xl.json @@ -0,0 +1,60 @@ +{ + "system": "DataFusion (Vortex, single)", + "date": "2026-07-21", + "machine": "c8g.metal-48xl", + "cluster_size": 1, + "proprietary": "no", + "hardware": "cpu", + "tuned": "no", + "tags": ["Rust","column-oriented","embedded","stateless"], + "load_time": 88, + "data_size": 15269901360, + "concurrent_qps": null, + "concurrent_error_ratio": null, + "result": [ + [0.042, 0.001, 0.001], + [0.554, 0.561, 0.534], + [0.541, 0.555, 0.516], + [0.753, 0.494, 0.508], + [0.867, 0.559, 0.559], + [1.154, 0.564, 0.575], + [0.033, 0.001, 0.001], + [0.569, 0.502, 0.491], + [1.18, 0.596, 0.592], + [1.516, 0.666, 0.677], + [0.805, 0.638, 0.542], + [0.856, 0.534, 0.562], + [1.271, 0.581, 0.572], + [2.671, 0.688, 0.687], + [1.47, 0.603, 0.588], + [0.863, 0.568, 0.604], + [2.524, 0.673, 0.831], + [2.522, 0.672, 0.663], + [3.576, 0.816, 0.835], + [0.718, 0.506, 0.514], + [14.429, 0.754, 0.763], + [16.552, 1.173, 1.063], + [21.378, 1.324, 1.295], + [57.62, 3.704, 3.383], + [2.244, 0.556, 0.546], + [1.248, 0.522, 0.518], + [2.336, 0.553, 0.554], + [14.586, 0.799, 0.784], + [12.186, 1.492, 2.312], + [0.574, 0.563, 0.568], + [2.554, 0.586, 0.595], + [5.573, 0.659, 0.625], + [4.168, 0.928, 0.92], + [14.487, 0.884, 0.822], + [14.489, 0.823, 1.071], + [0.693, 0.583, 0.59], + [0.711, 0.577, 0.574], + [0.654, 0.681, 0.567], + [0.675, 0.629, 0.575], + [0.79, 0.687, 0.795], + [0.604, 0.542, 0.569], + [0.599, 0.522, 0.514], + [0.583, 0.504, 0.51] +] + } + \ No newline at end of file