Open
Conversation
rschu1ze
reviewed
Feb 4, 2026
| for i in $(seq 1 $TRIES); do | ||
| RES=$(clickhouse-client --host "${FQDN:=localhost}" --password "${PASSWORD:=}" ${PASSWORD:+--secure} --time --format=Null --query="$query" --progress 0 2>&1 ||:) # (*) | ||
| [[ "$?" == "0" ]] && echo -n "${RES}" || echo -n "null" | ||
| OUT=$(clickhouse-client --host "${FQDN:=localhost}" --password "${PASSWORD:=}" ${PASSWORD:+--secure} --time --format=Null --query="$query" --progress 0 2>&1) |
| [[ "$?" == "0" ]] && echo -n "${RES}" || echo -n "null" | ||
| OUT=$(clickhouse-client --host "${FQDN:=localhost}" --password "${PASSWORD:=}" ${PASSWORD:+--secure} --time --format=Null --query="$query" --progress 0 2>&1) | ||
| CH_EXIT=$? | ||
| RES=$(printf '%s\n' "$OUT" | tail -n1) # (*) |
|
|
||
| [[ "$CH_EXIT" == "0" ]] && echo -n "${RES}" || echo -n "null" | ||
| [[ "$i" != $TRIES ]] && echo -n ", " | ||
| [[ "$CH_EXIT" == "139" ]] && echo "SEGFAULT: q=${QUERY_NUM} try=${i} ${RES}" >&2 |
Member
There was a problem hiding this comment.
The scripts to run submissions in an unattended amnner actually make some expectations how the output looks like:
- https://github.com/ClickHouse/ClickBench/?tab=readme-ov-file#how-to-add-a-new-result
- https://github.com/ClickHouse/ClickBench/?tab=readme-ov-file#incomplete-results
Basically: In case of a segfault, we need to print null. We actually did that already before.
To give some background: ClickBench focuses on runtimes for successful queries. If a query doesn't run, it doesn't penalize it based on the reason for this (OOM, crash, etc.).
No such assumptions exist for the format of result.csv (l. 28) but I guess it will be nice to keep its content in-sync with the result that is printed to stdout.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thank You for Your Contribution!
We appreciate your effort and contribution to the project. To ensure that your Pull Request (PR) adheres to our guidelines, please ensure to review the rules mentioned in our contribution guidelines:
ClickHouse/ClickBench Contribution Rules
Thank you for your attention to these details and for helping us maintain the quality and integrity of the project.