44export HOME=/home/ubuntu
55
66# Install requirements
7- apt-get update -y
8- apt install openjdk-17-jre-headless unzip netcat-openbsd -y
7+ sudo apt-get update -y
8+ sudo apt-get install -y unzip netcat-openbsd
99
1010# Detect architecture (maps x86_64->amd64, aarch64->arm64)
1111ARCH=$( uname -m)
@@ -15,17 +15,12 @@ elif [ "$ARCH" = "aarch64" ]; then
1515 ARCH=" arm64"
1616fi
1717
18- # Server setup Install
18+ # Install the GizmoSQL server and client (gizmosql_client is the CLI shell) into a local directory
19+ mkdir -p ./bin
1920curl -L -o gizmosql.zip " https://github.com/gizmodata/gizmosql/releases/latest/download/gizmosql_cli_linux_${ARCH} .zip"
20- unzip gizmosql.zip
21- mv gizmosql_server gizmosql_client /usr/local/bin/
22-
23- # Install Java and the GizmoSQLLine CLI client
24- pushd /tmp
25- curl -L -o gizmosqlline https://github.com/gizmodata/gizmosqlline/releases/latest/download/gizmosqlline
26- chmod +x gizmosqlline
27- mv gizmosqlline /usr/local/bin/
28- popd
21+ unzip -o gizmosql.zip -d ./bin
22+ chmod +x ./bin/gizmosql_server ./bin/gizmosql_client
23+ export PATH=" $PWD /bin:$PATH "
2924
3025# Source our env vars and utility functions for starting/stopping gizmosql server
3126. util.sh
3429start_gizmosql
3530
3631# Create the table
37- gizmosqlline \
38- -u ${GIZMOSQL_SERVER_URI} \
39- -n ${GIZMOSQL_USERNAME} \
40- -p ${GIZMOSQL_PASSWORD} \
41- -f create.sql
32+ gizmosql_client --file create.sql
4233
4334# Load the data
4435../download-hits-parquet-single
4536
4637echo -n " Load time: "
47- time gizmosqlline \
48- -u ${GIZMOSQL_SERVER_URI} \
49- -n ${GIZMOSQL_USERNAME} \
50- -p ${GIZMOSQL_PASSWORD} \
51- -f load.sql
38+ time gizmosql_client --file load.sql
5239
5340stop_gizmosql
5441
@@ -62,8 +49,8 @@ echo -n "Data size: "
6249wc -c clickbench.db
6350
6451cat log.txt | \
65- grep -E ' rows? selected \( [0-9.]+ seconds\) |Killed|Segmentation' | \
66- sed -E ' s/.*rows? selected \(( [0-9.]+) seconds\) .*/\1/; s/.*(Killed|Segmentation).*/null/' | \
52+ grep -E ' Run Time: [0-9.]+s |Killed|Segmentation' | \
53+ sed -E ' s/.*Run Time: ( [0-9.]+)s .*/\1/; s/.*(Killed|Segmentation).*/null/' | \
6754 awk ' {
6855 if (NR % 3 == 1) printf "[";
6956 if ($1 == "null") printf "null";
0 commit comments