Repository navigation
tests: run the ClickHouse core SQL tests through the HTTP and TCP clients - #747
Conversation
…ents
Add tests/clickhouse-test-runner/: a .NET console program that imitates
clickhouse-client for the upstream runner (tests/clickhouse-test), so that
the ClickHouse core SQL tests (tests/queries/0_stateless) run through
ClickHouse.Driver (ADO.NET, RowBinary over HTTP) and ClickHouse.Driver.Tcp
(Native). A type-directed renderer writes the values that each client reads
as TabSeparated text, so the upstream .reference files check the type
parsing and decoding of both clients.
- allowlist.txt: the tests that run per protocol, the only=<protocol> and
known=<protocol> lines, and the known failures in 36 groups (29 client,
7 shim), each with its cause and a reproduction.
- clickhouse-version: the server version and the upstream tests are
pinned together (26.10.4.207).
- scripts/: fetch the upstream tests, generate the error-code table, build
the shim, run the tests (protocol, shards, known failures), and run the
same tests through the real clickhouse-client for triage.
- .github/workflows/upstream-sql-tests.yml: nightly, manual, and on changes
of the harness: build, the shim tests, and {http, tcp} x 8 shards.
- README.md, AGENTS.md, CLAUDE.md, and a pointer in the root AGENTS.md.
No file of the clients changes. The port follows the Go harness
(ClickHouse/clickhouse-go#2141).
Tracking issue: ClickHouse/integrations#812
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AI review gate — AI review passedClean review from: Cursor Bugbot. |
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved SQL parsing and output-formatting defects can reject valid queries or produce false failures, while test isolation, retry handling, and missing failure artifacts undermine CI reliability.
6 open issues
Include hidden files in test artifact uploads · New Use unique table names to isolate concurrent test processes · New Decode doubled quotes in SQL string literals · New Write raw TSV header fields without escaping · New Skip heredoc literals when scanning output-setting assignments · New Disable upstream retries when running tests · New
What changed in this PR
Adds a standalone harness that runs ClickHouse’s upstream SQL tests through the HTTP and TCP clients. It checks client-decoded values against upstream reference output without changing the client libraries or NuGet package.
Changes:
- Adds a
clickhouse-clientshim with session handling, SQL splitting, test hints, and TabSeparated output. - Adds harness tests, version-pinned upstream scripts, and failure-triage documentation.
- Adds scheduled and path-filtered CI runs across both protocols and eight shards each.
| File | Description |
|---|---|
tests/clickhouse-test-runner/scripts/selectors.sh |
Builds exact test-selection expressions. |
tests/clickhouse-test-runner/scripts/run-with-real-client.sh |
Runs reference checks through the real client. |
tests/clickhouse-test-runner/scripts/run-upstream-tests.sh |
Selects, shards, and runs upstream tests. |
tests/clickhouse-test-runner/scripts/pinned-version.sh |
Reads and validates the server version. |
tests/clickhouse-test-runner/scripts/gen-error-codes.sh |
Generates the upstream error-code table. |
tests/clickhouse-test-runner/scripts/fetch-upstream.sh |
Fetches matching upstream tests and error codes. |
tests/clickhouse-test-runner/scripts/build.sh |
Publishes the shim and command wrappers. |
tests/clickhouse-test-runner/README.md |
Documents usage, supported behavior, and CI. |
tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/Utf8Buffer.cs |
Buffers output bytes and escaped values. |
tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/TestHint.cs |
Parses expected-error and echo hints. |
tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/TcpBackend.cs |
Executes tests through pinned TCP sessions. |
tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/Statements.cs |
Splits SQL and identifies statement components. |
tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ServerError.cs |
Normalizes errors from both clients. |
tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/Runner.cs |
Coordinates statements, sessions, hints, and output. |
tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ResultWriter.cs |
Writes result headers and rows. |
tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/Program.cs |
Provides the shim entry point and exit handling. |
tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/OutputSettings.cs |
Models settings that affect rendered output. |
tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/OutputFormat.cs |
Detects and selects supported output formats. |
tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/Options.cs |
Parses client-compatible command-line options. |
tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/InvocationLog.cs |
Records diagnostic logs with password redaction. |
tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/IBackend.cs |
Defines the shared backend contract. |
tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/HttpBackend.cs |
Executes tests through the HTTP ADO.NET API. |
tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ErrorCodes.cs |
Resolves error names and numeric codes. |
tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ClickHouse.Driver.TestRunner.csproj |
Defines the standalone .NET 10 shim. |
tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ChType.cs |
Parses type names for value rendering. |
tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/TestHintTests.cs |
Tests hint parsing and matching. |
tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/StatementsTests.cs |
Tests SQL splitting and token handling. |
tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/OutputSettingsTests.cs |
Tests settings extraction and rendering behavior. |
tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/OptionsTests.cs |
Tests options, port mapping, and helper behavior. |
tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/ClickHouse.Driver.TestRunner.Tests.csproj |
Defines the NUnit harness-test project. |
tests/clickhouse-test-runner/clickhouse-version |
Pins the server and upstream test release. |
tests/clickhouse-test-runner/CLAUDE.md |
Points to harness-specific guidance. |
tests/clickhouse-test-runner/AGENTS.md |
Documents triage and allowlist maintenance rules. |
tests/clickhouse-test-runner/.gitignore |
Excludes generated binaries and upstream checkout. |
AGENTS.md |
Adds a pointer to harness guidance. |
.github/workflows/upstream-sql-tests.yml |
Builds the harness and runs sharded CI checks. |
Review effort: Balanced
AI review gate — auto-approval withheldThe AI review gate is green, but the approver did not approve What to do: ask someone with write access who is not the PR author to approve this pull request. History (latest 5 heads, newest first)
|
- Upload the test outputs of a failed shard: they are in the hidden
directory .upstream (include-hidden-files).
- Turn off the runner's own retries (--dont_retry_failures), so that
RETRY_FAILED is the only retry.
- Decode a doubled quote in an output-setting value ('it''s').
- Write the header of TSVRaw formats without escapes, as the server does.
- Skip heredocs when the shim finds the SETTINGS clause and the
top-level words of a statement.
- Give the table of the KILL MUTATION live test a unique name.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The review fixes added it, but it changes nothing: upload-artifact tests for a hidden name only in the directories that it walks into under the search root of a pattern (here .../tests/queries), not in the fixed prefix with .upstream. Artifacts of failed shards with the same paths (clickhouse-connect with upload-artifact@v7; clickhouse-rs, clickhouse-odbc and clickhouse-go with @v4) have the .stdout and .stderr files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 9bbfd7b. Configure here.
## Summary
`scripts/run-upstream-tests.sh` now passes `--dont_retry_failures` to
`tests/clickhouse-test`.
Without the flag, the upstream runner runs a failed test again when its
output contains one of `MESSAGES_TO_RETRY` (for example "No such file or
directory", "Permission denied", "Connection reset by peer", "(total)
memory limit exceeded"), at most 3 times. When the test passes on a
retry, the runner reports it as `OK` and the job is green. So a flaky
test looks stable and can get into the allowlist. That is contrary to
rule 5 of the harness `AGENTS.md` ("remove it ... rather than
retrying"). With the flag, each failure fails the run.
Evidence, `tests/clickhouse-test` at the pinned `UPSTREAM_REF`
(`c6428ebc`, v26.10.2.103-stable):
- `TestResult.check_if_need_retry` sets `need_retry` only if `not
args.dont_retry_failures` (and the output matches `MESSAGES_TO_RETRY`,
and `runs_count <= MAX_RETRIES`).
- The flag is defined after a `parse_known_args()` call, so `--help`
does not list it, but the runner accepts it.
The same change was made in the C# harness after a review:
ClickHouse/clickhouse-cs#747.
No allowlist change, no client change (no CHANGELOG entry: the harness
is not a published package).
## Test
In a local stack (server 26.10.4.207, upstream tests at the pin):
- A probe test that fails on its first run with "No such file or
directory" on stderr and passes on the next run:
- `python3 tests/clickhouse-test <probe>` (as on `main`): `[ OK ]`, "1
tests passed", exit 0. The failed first run shows only under "Some tests
were restarted".
- `run-upstream-tests.sh` with this change: `[ FAIL ]`, "Having 1
errors!", exit 1.
- `run-upstream-tests.sh --no-stateful` with `SHARD_INDEX=1
SHARD_TOTAL=10` (passthrough): 295 tests passed, exit 0.
- `bash -n` on the script; `prettier --check` on the README.
The `upstream-sql-tests` workflow of this PR runs the full allowlist of
both backends with the flag.
## Checklist
- [x] The harness CI runs the full allowlists with the new flag
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Low Risk**
> Test harness-only change; it makes CI stricter without touching client
or runtime code.
>
> **Overview**
> The upstream SQL harness now invokes `tests/clickhouse-test` with
**`--dont_retry_failures`**, so failures are not silently re-run when
output matches the upstream runner’s retryable error messages.
>
> That closes a gap where intermittently failing tests could pass on
retry, look stable, and land on **`upstream-allowlist.txt`**. The README
**allowlist** guidance now states that flaky tests surface as real
failures under this behavior.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
5aa32c0. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Co-authored-by: Polyglot AI <293096396+polyglotAI-bot@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Summary
This PR adds
tests/clickhouse-test-runner/: a harness that runs the ClickHouse core SQL tests (tests/queries/0_stateless) through both clients of this repository, and a workflow that runs them in CI.clickhouse-clientwell enough for the upstream runner (tests/clickhouse-test) to drive it without changes: the same flags, stdin and--querybehavior, test hints,echo, and theextract-from-configshortcut.CLICKHOUSE_TEST_RUNNER_PROTOCOL):http:ClickHouse.Driverthrough ADO.NET (ClickHouseConnection,ClickHouseCommand,ClickHouseDataReader.GetValue; RowBinary over HTTP). One session id keeps the session (SET,USE, temporary tables) for the whole invocation.tcp:ClickHouse.Driver.Tcp(ClickHouseTcpClient.OpenSessionAsync,IClickHouseTcpSession.StreamAsync,IColumn.GetValue; Native). One session is one pinned connection.SETstatements. Values go through the normal .NET type mapping of each client, and the column types come from the reader. A type-directed renderer then writes the values asTabSeparatedtext. Thus the upstream.referencefiles are the oracle for the type parsing and decoding of both clients. The program does not ask the server to format the text.<test> # known=<protocol>: [<id>]line, for a test that fails over one protocol only. It runs over the other protocol, so that a bug of one client does not take passing tests from the CI of the other client (311 such lines).ClickHouse.Driver.slnand not in the NuGet packages. No file of the clients changes.Tracking issue: ClickHouse/integrations#812
Contents
ClickHouse.Driver.TestRunner.Tests, NUnit): unit tests ported from the Gosplit,hintandrendertests, and live tests that compare the rendering with the server's ownFORMAT TSVoutput for many expressions, over both protocols. 457 tests.allowlist.txt: the tests that run, and the known failures in groups. Each client group header gives the cause, a reproduction,Issue: not filed yet(or the issue), and the protocols.clickhouse-version: the server version and the upstream tests are pinned together (26.10.4.207, tagv26.10.4.207-stable, as in the Go harness).scripts/:fetch-upstream.sh(sparse shallow checkout; also generatesErrorCodes.g.cswithgen-error-codes.sh, no .NET needed),build.sh,run-upstream-tests.sh(protocol, shards,KNOWN_FAILURES=<group>, version check, missing-test warning, optionalRETRY_FAILED),run-with-real-client.sh(the same tests through the realclickhouse-client, for triage),selectors.sh,pinned-version.sh..github/workflows/upstream-sql-tests.yml: nightly, manual (inputclickhouse_version), on pushes tomainand on pull requests that change the harness or the workflow. Jobs:build(the shim once, and a check that the committedErrorCodes.g.csmatches the pinned version),harness-tests(unit and live tests of the shim), andupstream-sql-tests={http, tcp} × 8 shardsat-j 4. The server is the stock image of the pinned version withCLICKHOUSE_SKIP_USER_SETUP=1and the host name of the runner.permissions: contents: read. Artifacts on failure (runner output with the diffs, shim log, server error log,.stdout/.stderrfiles).README.md(local runs, how the shim imitatesclickhouse-clientper protocol, the allowlist format, how to grow it, CI, the version bump),AGENTS.md(triage rules, environment causes),CLAUDE.md(@AGENTS.md), and one pointer row in the rootAGENTS.md.Results (server 26.10.4.207)
.sql/.sql.j2tests at-j 6, 926 skipped by the runner:http: 10,076 OK, 1,959 FAIL; 1,472 s.tcp: 10,481 OK, 1,554 FAIL; 1,654 s.[untriaged]group). Per protocol (http / tcp): environment 1,213 / 1,050, client 169 / 97, shim 420 / 309; 157 / 98 failures were fixed in the shim.httpruns 10,073 tests,tcpruns 10,414 tests: 10,010 over both, 155only=tcp, 1only=http, 249known=http, 62known=tcp.only=tcp(environment over HTTP): mostlyWITH TOTALSandextremes(the HTTP RowBinary output has no totals or extremes block), and tests that drop the current database (each later HTTP request fails).only=http: oneEXPLAINtest that reads compressed bytes only over native, also through the realclickhouse-client.-j 6:http: 10,073 OK and 0 FAIL each time (863–899 s); the 593 HTTP known failures failed each time.tcp: 10,414 OK and 0 FAIL each time (764–788 s); the 406 TCP known failures failed each time.generateRandom()without a structure, so over TCP it fails only when the server picks a tuple of more than 7 elements (its group header says so).-j 4, shard 1 took 143 s (http) and 128 s (tcp). NoRETRY_FAILED: no known client bug makes random tests fail.clickhouse-clientalso fails these tests on the same server): no cluster / ZooKeeper / S3, upstream CI server configuration, features ofclickhouse-clientitself.AGENTS.mdlists them. 212 tests whose result depends on the server load (EXPLAIN PIPELINEwidths, thread and stream counts, memory under parallel load) are left out on purpose, as in the other harnesses.max_query_size = 18446744073709551615, every HTTP query fails withCode: 62 Empty query(native works).Client bugs found
These are not fixed in this PR, and no issues are filed (except where named). The maintainers decide when to file and fix them.
The reproductions use only the public API:
ClickHouseConnection+ClickHouseCommand.ExecuteReaderAsync+GetValue/GetDataTypeName(http), andClickHouseTcpClient.OpenSessionAsync+StreamAsync+IColumn.GetValue(tcp). "→" is the actual result, "want" is the server'sTabSeparatedoutput. The test counts are per protocol (http / tcp).Wrong values, no error:
SELECT toDateTime64('2023-12-23 20:37:33.035123456', 9, 'UTC')→DateTimewith 100 ns ticks:.0351234; want.035123456. The count is cut toward 1970, so before 1970 the value is later (1900.123456789→.1234568). TCP gives the exact count.SELECT toTime64('00:00:01.123456789', 9)→TimeSpan00:00:01.1234567; want.123456789.SELECT toTime64('00:45:30.123456', 6)→00:45:30.1234559(the value goes throughdouble); want.123456.SELECT reinterpret(toInt64(9223372036854775616), 'DateTime64(3)')→1969-12-31 23:59:59.808(unchecked multiply inMathUtils.ShiftDecimalPlaces); want9999-12-31 23:59:59.616(the server clamps).SELECT tuple() FROM numbers(3)→ 0 rows (RowBinary has no bytes for such a row, so the reader stops at the end of the bytes); want 3 rows(). TCP is right. Related: ClickHouseDataReader silently returns zero rows when every column is zero-width (Tuple()) #570 (closed, not planned).SELECT '{"a": 1}'::JSON(SHARED a UInt64)→{"a":0}and 7 rows for 1 (the reader is out of sync); twoSHAREDpaths →ArgumentException ... Key: SHARED; want{"a":1}, 1 row. TCP is right.SET session_timezone = 'Asia/Tokyo'; SELECT toDateTime('2020-01-01 00:00:00')→ zone UTC (the zone of the handshake; also for aSETTINGS session_timezoneclause; onlyClickHouseTcpQueryOptions.Settingscounts); want2020-01-01 00:00:00in Asia/Tokyo. The instant is right.SELECT toDateTime('1969-12-31 23:15:30', 'Africa/Monrovia')→ offset -00:44 (TimeZoneInfohas whole minutes):23:16:00; want23:15:30.SELECT toDateTime('1930-06-15 12:00:34', 'Europe/Amsterdam')→ offset +01:00 (the NodaTime TZDB has the Brussels rules); want +00:19:32 (server).string, soSELECT hex('<byte 0xFF>')→EFBFBD; wantFF. There is no API for a query as bytes.SELECT DISTINCT toUnixTimestamp64Nano(json.a) FROM (SELECT materialize('{"a":1698543000}'::JSON(a DateTime64(9, 'Europe/Berlin'))) AS json FROM remote('127.0.0.{1,2}', system.one))→ 2 rows; want 1 row. The client's defaultoutput_format_native_write_json_as_string = 1reaches the shards, andclickhouse-clientwith that setting gives the same 2 rows.Session and protocol (
tcp):CREATE TEMPORARY TABLE t (x UInt8); INSERT INTO t VALUES (1); SELECT throwIf(1); SELECT * FROM t→ after the server exception,session.IsOpenis false:tis gone (UNKNOWN_TABLE) and theSETs are lost. InClickHouseTcpConnection.QueryAsync, anExceptionpacket leavesreusable = false; want the session to stay, as inclickhouse-client.INSERT INTO t VALUES(no data),INSERT INTO t SELECT * FROM input('x UInt8') FORMAT TSV <inline data>,INSERT ... FROM INFILE→ no result untilReadTimeout, then the connection is lost; wantNO_DATA_TO_INSERT, or the inline data sent (asclickhouse-clientdoes).SELECT 1 AS a, 'x' AS b WHERE 0→StreamAsync/QueryAsyncgive no block, so no column names or types (aTSVWithNamesheader is lost); want the header block. HTTP is right.SET output_format_native_encode_types_in_binary_format = 1; SELECT 1→ReadTimeout, orColumn ... uses custom serialization, which this client does not support, and the connection closes. Over HTTP,SET output_format_binary_encode_types_in_binary_format = 1; SELECT 2 AS a, 'b' AS b→ArgumentException: Unknown type:(empty name). Want the values, or a clear "not supported" error.Types that a client cannot read:
SELECT toIntervalDay(1)→ArgumentException: Unknown type: IntervalDay; want1. TCP reads it.SELECT 1::Dynamic(max_types=2)→Unknown type: Dynamic(max_types=2); want1. Issue JSON: a path holding a Tuple (heterogeneous JSON array) throws "The element cannot be an object or array"; Dynamic(max_types=N) is an unknown type #626 (fix PR Fix JSON: a path holding a composite value, and Dynamic(max_types=N) #628, open).SET input_format_json_infer_array_of_dynamic_from_array_of_different_types = 0; SELECT materialize('{"a" : [1, {}]}')::JSON→InvalidOperationException: The element cannot be an object or array.; want{"a":[1,{}]}. Issue JSON: a path holding a Tuple (heterogeneous JSON array) throws "The element cannot be an object or array"; Dynamic(max_types=N) is an unknown type #626 (fix PR Fix JSON: a path holding a composite value, and Dynamic(max_types=N) #628, open).input_format_binary_read_json_as_string = 1with every request, soSELECT * FROM format(RowBinary, 'j JSON', unhex('0101610A0100000000000000'))→ serverCode: 117 Cannot parse JSON object here; want{"a":1}. Related: Every query fails with Code 164 (READONLY) for a readonly = 1 user: the driver always sends enable_http_compression and input_format_binary_read_json_as_string as settings #659.docs/http.mdx):SELECT '{"a" : 42, "a.b" : 43}'::JSON(a UInt32, `a.b` UInt32)→SerializationException: JSON paths 'a' and 'a.b' overlap; want{"a":42,"a":{"b":43}}. TCP is right.SELECT sumState(1)→ HTTPAggregateFunctionException: Unable to directly query column with type AggregateFunction(sum). Use sumMerge(), TCPClickHouseTcpProtocolException ... cannot read(the connection closes); want the binary state.docs/tcp.mdx):SELECT (1,2,3,4,5,6,7,8)→Tuple type ... has 8 elements; this client supports at most 7, and the connection closes; want(1,2,3,4,5,6,7,8). HTTP reads it. Related: TCP: read and write Tuple columns of 8 to 256 elements #726 (open).SELECT [1,...,16]::QBit(Float32, 16, 8)→QBit type ... is strided; this client does not support the strided QBit layout yet. HTTP reads the values.SELECT [(1, 2), (3, 4)]::MultiPoint→ HTTPUnknown type: MultiPoint, TCPClickHouse type 'MultiPoint' is not supported; want[(1,2),(3,4)]. AGeometryvalue that holds aMultiPoint→ HTTPIndexOutOfRangeException, TCPhas discriminator 6 ... declares only 6 alternative(s).SELECT toDate32('0000-01-01')→ HTTPArgumentOutOfRangeException ... un-representable DateTime, TCPDay number must be between 0 and DateOnly.MaxValue.DayNumber(the connection closes); want0000-01-01.SELECT toDateTime64OrNull(toInt64(-62167219200), 3, 'UTC')→InvalidOperationException: Instant out of range for DateTime; want0000-01-01 00:00:00.000. Also after 9999-12-31. TCP gives the count.Type names and parameters:
GetDataTypeNameofCAST((1, 'a'), 'Tuple(a UInt8, b String)')→Tuple(UInt8,String), oftoDecimal32(1, 2)→Decimal32(2), of a JSON column →Json; want the server's type name (Tuple(a UInt8, b String),Decimal(9, 2),JSON).SELECT {db:String} AS d, count() FROM {db:Identifier}.onewithdb=system→ArgumentException: Parameter 'db' has conflicting type hints: 'String' and 'Identifier'; want the rowsystem,1. HTTP checks every statement, also one without parameters.INSERT INTO m VALUES (1, {1 : 'a'}), (2, {1 : 'b'})→ArgumentException: Parameter '1' has conflicting type hints; want both rows inserted. TCP is right.Shim gaps (groups marked
shim)TabSeparatedfamily andNull.JsonObjectvalue has no types of the paths, so the shim cannot write the server's JSON text.Stringas .NET strings, so bytes that are not UTF-8 are lost; reading bytes would lose theDynamic/Varianttypes.Dynamicvalues ofDateTimetypes come without their type.interval_output_format = 'kusto'.clickhouse-clientrejects.Run locally
Details (Python
jinja2,tzdata-legacy, one test, one group of known failures) are intests/clickhouse-test-runner/README.md.Checklist
dotnet run scripts/changelog.cs -- --checkpasses)Checks:
dotnet build ClickHouse.Driver.sln -c Releasewith 0 errors; the shim tests (unit + live) 457 / 457; zizmor 1.29.0 (repository configuration, also--persona pedanticon the new workflow): no findings; actionlint and shellcheck: clean.🤖 Generated with Claude Code
Note
Low Risk
Test and CI infrastructure only; no production client API or runtime behavior changes, though the new workflow adds long-running Docker-based jobs to the pipeline.
Overview
Adds
tests/clickhouse-test-runner/, aclickhouse-client-compatible shim that runs ClickHouse’s core stateless SQL tests throughClickHouse.Driver(HTTP/ADO.NET) andClickHouse.Driver.Tcp(native), re-rendering results as TabSeparated so upstream.referencefiles validate client decoding rather than server formatting.The harness includes build/fetch/run scripts, a pinned server version (
clickhouse-version+ generatedErrorCodes.g.cs), an allowlist with grouped known failures, 457 NUnit unit/live tests for the shim, andAGENTS.mdtriage rules. RootAGENTS.mdnow points agents at the harness docs..github/workflows/upstream-sql-tests.ymlruns nightly, onmain/PR path filters, and viaworkflow_dispatch: one build job (shim artifact + error-code check), harness-tests against Docker ClickHouse, then upstream-sql-tests as http/tcp × 8 shards with failure artifacts.Reviewed by Cursor Bugbot for commit 9bbfd7b. Bugbot is set up for automated code reviews on this repo. Configure here.