Skip to content

Commit

Permalink
chore: fix tpch data generator (apache#1186)
Browse files Browse the repository at this point in the history
  • Loading branch information
milenkovicm authored Feb 19, 2025
1 parent 3578245 commit 488893b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions benchmarks/tpch-gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ FILE=./data/supplier.tbl
if test -f "$FILE"; then
echo "$FILE exists."
else
docker run -v `pwd`/data:/data -it --rm ghcr.io/databloom-ai/tpch-docker:main -vf -s 1
docker run -v `pwd`/data:/data -it --rm ghcr.io/scalytics/tpch-docker:main -vf -s 1
fi

# Copy expected answers into the ./data/answers directory if it does not already exist
FILE=./data/answers/q1.out
if test -f "$FILE"; then
echo "$FILE exists."
else
docker run -v `pwd`/data:/data -it --entrypoint /bin/bash --rm ghcr.io/databloom-ai/tpch-docker:main -c "cp /opt/tpch/2.18.0_rc2/dbgen/answers/* /data/answers/"
docker run -v `pwd`/data:/data -it --entrypoint /bin/bash --rm ghcr.io/scalytics/tpch-docker:main -c "cp /opt/tpch/2.18.0_rc2/dbgen/answers/* /data/answers/"
fi
6 changes: 4 additions & 2 deletions benchmarks/tpch.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@
path = args.path
table_ext = args.ext

import ballista
ctx = ballista.BallistaContext("localhost", 50050)
from ballista import BallistaBuilder
from datafusion.context import SessionContext

ctx: SessionContext = BallistaBuilder().remote("df://127.0.0.1:50050")

tables = ["part", "supplier", "partsupp", "customer", "orders", "lineitem", "nation", "region"]

Expand Down

0 comments on commit 488893b

Please sign in to comment.