Skip to content

GizmoSQL: switch from gizmosqlline (Java) to gizmosql_client#863

Merged
rschu1ze merged 3 commits intoClickHouse:mainfrom
gizmodata:gizmosql-cli-client
May 7, 2026
Merged

GizmoSQL: switch from gizmosqlline (Java) to gizmosql_client#863
rschu1ze merged 3 commits intoClickHouse:mainfrom
gizmodata:gizmosql-cli-client

Conversation

@prmoore77
Copy link
Copy Markdown
Contributor

@prmoore77 prmoore77 commented May 7, 2026

Summary

Switches the GizmoSQL ClickBench scripts from the Java-based gizmosqlline SQLLine client to the new C++ gizmosql_client shell that ships in the same release archive as gizmosql_server.

  • Drops the openjdk-17-jre-headless apt install and the separate gizmosqlline binary download — gizmosql_client is already in gizmosql_cli_linux_${ARCH}.zip.
  • Replaces gizmosqlline -u <jdbc-uri> -n -p -f invocations with gizmosql_client --file ..., which reads connection parameters from the GIZMOSQL_HOST / GIZMOSQL_PORT / GIZMOSQL_USER / GIZMOSQL_PASSWORD env vars natively.
  • In run.sh, prepends .timer on and .mode trash to each per-query batch so the client emits one Run Time: X.XXs line per statement (to stderr) and skips rendering result rows. stderr is merged into stdout for log capture.
  • Updates the result parser regex in benchmark.sh from sqlline's rows? selected ([0-9.]+ seconds) to Run Time: [0-9.]+s.

See https://docs.gizmosql.com/#/client for full client usage.

Test plan

  • Smoke-tested locally with gizmosql_server / gizmosql_client v1.22.4 on a small in-memory table; the Run Time: X.XXs parser produced the expected [t1, t2, t3], output rows.
  • Full ClickBench run on a Linux host (the cache-drop and apt steps are Linux-only).

Use the new gizmosql_client CLI shell (shipped with the gizmosql server
release) instead of the Java-based gizmosqlline client. This removes the
openjdk-17 install and the separate gizmosqlline download.

- benchmark.sh / run.sh: replace gizmosqlline (-u JDBC-URI -n -p -f) with
  "gizmosql_client --file ...", which reads connection settings from the
  GIZMOSQL_HOST / GIZMOSQL_PORT / GIZMOSQL_USER / GIZMOSQL_PASSWORD env vars.
- run.sh: prepend ".timer on" and ".mode trash" so the client emits one
  "Run Time: X.XXs" line per statement (to stderr) without rendering result
  rows; merge stderr into stdout for log capture.
- benchmark.sh: update the result parser regex from sqlline-style
  "rows? selected ([0-9.]+ seconds)" to "Run Time: [0-9.]+s".
- util.sh: rename GIZMOSQL_USERNAME -> GIZMOSQL_USER and switch from a
  JDBC URI to host/port env vars (the names gizmosql_client reads natively).

See https://docs.gizmosql.com/#/client for client usage details.
@prmoore77 prmoore77 force-pushed the gizmosql-cli-client branch from b44aadd to 1dd4994 Compare May 7, 2026 15:52
@prmoore77 prmoore77 changed the title GizmoSQL: switch from gizmosqlline (Java) to gizmosql_client GizmoSQL: split benchmark.sh + use gizmosql_client (depends on #860) May 7, 2026
@prmoore77 prmoore77 force-pushed the gizmosql-cli-client branch from 1dd4994 to b44aadd Compare May 7, 2026 16:03
@prmoore77 prmoore77 changed the title GizmoSQL: split benchmark.sh + use gizmosql_client (depends on #860) GizmoSQL: switch from gizmosqlline (Java) to gizmosql_client May 7, 2026
Comment thread gizmosql/benchmark.sh Outdated
# Install requirements
apt-get update -y
apt install openjdk-17-jre-headless unzip netcat-openbsd -y
apt install unzip netcat-openbsd -y
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

L. 7 and 8 need sudo, please check the other invocations of apt in the repository.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi @rschu1ze - this should be fixed now.

Comment thread gizmosql/benchmark.sh Outdated
fi

# Server setup Install
# Install the GizmoSQL server and client (gizmosql_client is the CLI shell)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

L. 21: Please don't copy binaries into /usr/local/bin/. Instead, please copy to a local directory and modify $PATH so that it finds the binary.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi @rschu1ze - this should be fixed now.

- Use sudo for apt invocations
- Install gizmosql binaries into a local ./bin and prepend to PATH
  instead of copying to /usr/local/bin

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@prmoore77 prmoore77 requested a review from rschu1ze May 7, 2026 20:17
Comment thread gizmosql/run.sh
# Start the GizmoSQL server
start_gizmosql

# Enable timer and discard result rows (we only care about Run Time)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change l. 22 to

echo 3 | sudo tee /proc/sys/vm/drop_caches > /dev/null

I got tee: /proc/sys/vm/drop_caches: Permission denied errors locally.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done - thanks!

Without sudo, tee fails with "Permission denied" writing to
/proc/sys/vm/drop_caches.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rschu1ze rschu1ze merged commit 9aadf3a into ClickHouse:main May 7, 2026
@prmoore77 prmoore77 deleted the gizmosql-cli-client branch May 7, 2026 21:42
@prmoore77
Copy link
Copy Markdown
Contributor Author

🚀🚀🚀🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants