From de18c82037794785d03cdd43da81aa8e37fe23c8 Mon Sep 17 00:00:00 2001 From: Polyglot AI <293096396+polyglotAI-bot@users.noreply.github.com> Date: Thu, 19 Nov 2026 11:41:57 +0000 Subject: [PATCH 1/3] tests: run the ClickHouse core SQL tests through the HTTP and TCP clients 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= and known= 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 --- .github/workflows/upstream-sql-tests.yml | 296 + AGENTS.md | 1 + tests/clickhouse-test-runner/.gitignore | 3 + tests/clickhouse-test-runner/AGENTS.md | 162 + tests/clickhouse-test-runner/CLAUDE.md | 1 + .../ClickHouse.Driver.TestRunner.Tests.csproj | 34 + .../LiveTests.cs | 425 + .../OptionsTests.cs | 150 + .../OutputSettingsTests.cs | 120 + .../RenderTests.cs | 394 + .../StatementsTests.cs | 149 + .../TestHintTests.cs | 54 + .../ClickHouse.Driver.TestRunner/ChType.cs | 242 + .../ClickHouse.Driver.TestRunner.csproj | 37 + .../ErrorCodes.cs | 17 + .../ErrorCodes.g.cs | 698 + .../HttpBackend.cs | 129 + .../ClickHouse.Driver.TestRunner/IBackend.cs | 28 + .../InvocationLog.cs | 80 + .../ClickHouse.Driver.TestRunner/Options.cs | 243 + .../OutputFormat.cs | 296 + .../OutputSettings.cs | 101 + .../ClickHouse.Driver.TestRunner/Program.cs | 176 + .../ResultWriter.cs | 107 + .../ClickHouse.Driver.TestRunner/Runner.cs | 402 + .../ServerError.cs | 45 + .../Statements.cs | 713 + .../TcpBackend.cs | 161 + .../ClickHouse.Driver.TestRunner/TestHint.cs | 192 + .../Utf8Buffer.cs | 134 + .../ValueRenderer.cs | 1188 ++ tests/clickhouse-test-runner/README.md | 315 + tests/clickhouse-test-runner/allowlist.txt | 11253 ++++++++++++++++ .../clickhouse-test-runner/clickhouse-version | 5 + tests/clickhouse-test-runner/scripts/build.sh | 34 + .../scripts/fetch-upstream.sh | 53 + .../scripts/gen-error-codes.sh | 39 + .../scripts/pinned-version.sh | 11 + .../scripts/run-upstream-tests.sh | 207 + .../scripts/run-with-real-client.sh | 68 + .../scripts/selectors.sh | 29 + 41 files changed, 18792 insertions(+) create mode 100644 .github/workflows/upstream-sql-tests.yml create mode 100644 tests/clickhouse-test-runner/.gitignore create mode 100644 tests/clickhouse-test-runner/AGENTS.md create mode 100644 tests/clickhouse-test-runner/CLAUDE.md create mode 100644 tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/ClickHouse.Driver.TestRunner.Tests.csproj create mode 100644 tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/LiveTests.cs create mode 100644 tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/OptionsTests.cs create mode 100644 tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/OutputSettingsTests.cs create mode 100644 tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/RenderTests.cs create mode 100644 tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/StatementsTests.cs create mode 100644 tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/TestHintTests.cs create mode 100644 tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ChType.cs create mode 100644 tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ClickHouse.Driver.TestRunner.csproj create mode 100644 tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ErrorCodes.cs create mode 100644 tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ErrorCodes.g.cs create mode 100644 tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/HttpBackend.cs create mode 100644 tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/IBackend.cs create mode 100644 tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/InvocationLog.cs create mode 100644 tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/Options.cs create mode 100644 tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/OutputFormat.cs create mode 100644 tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/OutputSettings.cs create mode 100644 tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/Program.cs create mode 100644 tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ResultWriter.cs create mode 100644 tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/Runner.cs create mode 100644 tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ServerError.cs create mode 100644 tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/Statements.cs create mode 100644 tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/TcpBackend.cs create mode 100644 tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/TestHint.cs create mode 100644 tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/Utf8Buffer.cs create mode 100644 tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ValueRenderer.cs create mode 100644 tests/clickhouse-test-runner/README.md create mode 100644 tests/clickhouse-test-runner/allowlist.txt create mode 100644 tests/clickhouse-test-runner/clickhouse-version create mode 100755 tests/clickhouse-test-runner/scripts/build.sh create mode 100755 tests/clickhouse-test-runner/scripts/fetch-upstream.sh create mode 100755 tests/clickhouse-test-runner/scripts/gen-error-codes.sh create mode 100755 tests/clickhouse-test-runner/scripts/pinned-version.sh create mode 100755 tests/clickhouse-test-runner/scripts/run-upstream-tests.sh create mode 100755 tests/clickhouse-test-runner/scripts/run-with-real-client.sh create mode 100755 tests/clickhouse-test-runner/scripts/selectors.sh diff --git a/.github/workflows/upstream-sql-tests.yml b/.github/workflows/upstream-sql-tests.yml new file mode 100644 index 000000000..129c10996 --- /dev/null +++ b/.github/workflows/upstream-sql-tests.yml @@ -0,0 +1,296 @@ +name: Upstream SQL tests + +# Runs a curated subset of the ClickHouse core SQL tests (tests/queries/0_stateless) through the HTTP client +# (ClickHouse.Driver) and the native TCP client (ClickHouse.Driver.Tcp). See +# tests/clickhouse-test-runner/README.md. + +permissions: + contents: read + +on: + workflow_dispatch: + inputs: + clickhouse_version: + description: "ClickHouse version to try, with a server image and a v-stable tag upstream, for example 26.11.1.10 (default: tests/clickhouse-test-runner/clickhouse-version)" + required: false + default: "" + type: string + schedule: + - cron: "0 3 * * *" + push: + branches: [main] + paths: + - "tests/clickhouse-test-runner/**" + - ".github/workflows/upstream-sql-tests.yml" + - "!tests/clickhouse-test-runner/**/*.md" + pull_request: + paths: + - "tests/clickhouse-test-runner/**" + - ".github/workflows/upstream-sql-tests.yml" + - "!tests/clickhouse-test-runner/**/*.md" + +# A new push to a pull request cancels the run of its old head. Nightly, manual and push runs each have a +# group of their own, so that they do not cancel each other. +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.number || github.run_id }} + cancel-in-progress: true + +jobs: + # Builds the shim once (scripts/build.sh), with the error code table of the selected version. The test jobs + # use the programs of this job. + build: + name: Build the shim + runs-on: ubuntu-24.04 + timeout-minutes: 20 + outputs: + version: ${{ steps.version.outputs.version }} + steps: + - name: Checkout + uses: actions/checkout@v7 + with: + persist-credentials: false + + - uses: actions/cache@v6 + name: Cache NuGet + with: + path: ~/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} + restore-keys: | + ${{ runner.os }}-nuget- + + - name: Setup .NET + uses: actions/setup-dotnet@v6 + with: + dotnet-version: | + 10.x + + # The server version and the upstream tests are pinned together in + # tests/clickhouse-test-runner/clickhouse-version: the `.reference` files of another release do not + # match the output of the server. A new server release changes nothing here until a pull request + # bumps the pin. The `clickhouse_version` input of a manual run tries another version without a + # commit. + - name: Select the ClickHouse version + id: version + env: + INPUT_VERSION: ${{ github.event.inputs.clickhouse_version }} + run: | + version="${INPUT_VERSION:-$(tests/clickhouse-test-runner/scripts/pinned-version.sh)}" + if ! [[ "${version}" =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "::error::clickhouse_version must be a full version such as 26.10.4.207 (got: '${version}')" + exit 1 + fi + echo "version=${version}" >> "${GITHUB_OUTPUT}" + if [[ -z "${INPUT_VERSION}" ]]; then + echo "pinned=true" >> "${GITHUB_OUTPUT}" + fi + + # Also generates ErrorCodes.g.cs from the same checkout, so that the shim knows the error names of the + # test hints of this version. + - name: Get the upstream tests of ClickHouse ${{ steps.version.outputs.version }} + env: + CLICKHOUSE_VERSION: ${{ steps.version.outputs.version }} + run: tests/clickhouse-test-runner/scripts/fetch-upstream.sh "${CLICKHOUSE_VERSION}" + + # For the pinned version, the generated table must be the committed one. + - name: Check the committed error code table + if: steps.version.outputs.pinned == 'true' + run: | + file=tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ErrorCodes.g.cs + if ! git diff --exit-code -- "${file}"; then + echo "::error::${file} does not match the pinned version. Run scripts/fetch-upstream.sh and commit the file." + exit 1 + fi + + - name: Build the shim + run: tests/clickhouse-test-runner/scripts/build.sh + + # A tar file keeps the file modes, which an artifact does not. + - name: Pack the shim + run: tar -C tests/clickhouse-test-runner -cf "${RUNNER_TEMP}/shim.tar" .bin + + - name: Upload the shim + uses: actions/upload-artifact@v7 + with: + name: upstream-sql-tests-shim + path: ${{ runner.temp }}/shim.tar + if-no-files-found: error + # A re-run of the failed test jobs does not build again. + retention-days: 7 + + # The unit tests of the shim, and its live tests, which compare the output of the shim with the server's + # own TabSeparated output over both protocols. A job of its own, so that a failed live test does not stop + # the upstream tests. + harness-tests: + name: Unit and live tests of the harness + runs-on: ubuntu-24.04 + timeout-minutes: 20 + steps: + - name: Checkout + uses: actions/checkout@v7 + with: + persist-credentials: false + + - uses: actions/cache@v6 + name: Cache NuGet + with: + path: ~/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} + restore-keys: | + ${{ runner.os }}-nuget- + + - name: Setup .NET + uses: actions/setup-dotnet@v6 + with: + dotnet-version: | + 10.x + + # The shim writes DateTime values with the tz database of the system. tzdata-legacy has the old zone + # names that some tests use (US/Samoa, Asia/Calcutta). + - name: Install the time zone data + run: | + sudo apt-get update + sudo apt-get install -y tzdata tzdata-legacy + + - name: Select the ClickHouse version + id: version + env: + INPUT_VERSION: ${{ github.event.inputs.clickhouse_version }} + run: | + version="${INPUT_VERSION:-$(tests/clickhouse-test-runner/scripts/pinned-version.sh)}" + if ! [[ "${version}" =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "::error::clickhouse_version must be a full version such as 26.10.4.207 (got: '${version}')" + exit 1 + fi + echo "version=${version}" >> "${GITHUB_OUTPUT}" + + # See the upstream-sql-tests job. + - name: Start ClickHouse ${{ steps.version.outputs.version }} + env: + CLICKHOUSE_VERSION: ${{ steps.version.outputs.version }} + run: | + docker run -d --name clickhouse -p 8123:8123 -p 9000:9000 \ + --hostname "$(hostname)" \ + --ulimit nofile=262144:262144 -e CLICKHOUSE_SKIP_USER_SETUP=1 \ + "clickhouse/clickhouse-server:${CLICKHOUSE_VERSION}" + for _ in $(seq 1 60); do + if curl -fsS --data-binary 'SELECT 1' "localhost:8123/" > /dev/null 2>&1; then + exit 0 + fi + sleep 2 + done + docker logs clickhouse + echo "::error::ClickHouse did not start" + exit 1 + + # The project builds with the analyzers of the repository and warnings as errors. + - name: Unit and live tests + env: + CLICKHOUSE_TEST_RUNNER_LIVE: "1" + run: >- + dotnet test tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/ClickHouse.Driver.TestRunner.Tests.csproj + --configuration Release + + upstream-sql-tests: + name: Upstream SQL tests (${{ matrix.protocol }}, shard ${{ matrix.shard }}) + needs: build + runs-on: ubuntu-24.04 + timeout-minutes: 30 + strategy: + fail-fast: false + matrix: + # http: ClickHouse.Driver (ADO.NET, RowBinary over HTTP). tcp: ClickHouse.Driver.Tcp (Native). + protocol: [http, tcp] + # Round-robin shards of the allowlist, about 1,260 (http) and 1,300 (tcp) tests each. With the + # server and the shim on 4 CPUs at -j 4, one shard took 143 s (http) and 128 s (tcp), so a shard + # takes a few minutes on a 4-vCPU runner. Change SHARD_TOTAL below together with this list. + shard: [1, 2, 3, 4, 5, 6, 7, 8] + env: + CLICKHOUSE_VERSION: ${{ needs.build.outputs.version }} + steps: + - name: Checkout + uses: actions/checkout@v7 + with: + persist-credentials: false + + # The shim is a framework-dependent .NET program. + - name: Setup .NET + uses: actions/setup-dotnet@v6 + with: + dotnet-version: | + 10.x + + # tests/clickhouse-test needs Python 3 and jinja2. For the tz database, see the harness-tests job. + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y python3-jinja2 tzdata tzdata-legacy + + # The stock server configuration. CLICKHOUSE_SKIP_USER_SETUP keeps the `default` user of the image's + # users.xml: network access, access management and named-collection control (tests create users, + # roles and named collections). Without it, the image allows the user without a password only from + # localhost in the container. + # + # The server gets the host name of the runner: tests/clickhouse-test replaces its own host name with + # `localhost` in the output of each test, and some `.reference` files have `localhost` for hostName(). + - name: Start ClickHouse ${{ needs.build.outputs.version }} + run: | + docker run -d --name clickhouse -p 8123:8123 -p 9000:9000 \ + --hostname "$(hostname)" \ + --ulimit nofile=262144:262144 -e CLICKHOUSE_SKIP_USER_SETUP=1 \ + "clickhouse/clickhouse-server:${CLICKHOUSE_VERSION}" + for _ in $(seq 1 60); do + if curl -fsS --data-binary 'SELECT 1' "localhost:8123/" > /dev/null 2>&1; then + exit 0 + fi + sleep 2 + done + docker logs clickhouse + echo "::error::ClickHouse did not start" + exit 1 + + - name: Get the upstream tests of ClickHouse ${{ needs.build.outputs.version }} + id: upstream + run: tests/clickhouse-test-runner/scripts/fetch-upstream.sh "${CLICKHOUSE_VERSION}" + + - name: Download the shim + uses: actions/download-artifact@v8 + with: + name: upstream-sql-tests-shim + path: ${{ runner.temp }} + + - name: Unpack the shim + run: tar -C tests/clickhouse-test-runner -xf "${RUNNER_TEMP}/shim.tar" + + # No RETRY_FAILED: no known client bug makes random tests fail, so a failed test fails the job. The + # runner writes the diff of a failed test to its output (upstream-tests.log), and the output of the + # test next to the test (..stdout and .stderr). `shell: bash` sets pipefail, so the exit + # code of the runner is the result of the step. The step timeout is shorter than the job timeout, so + # that the upload steps below also run after a hang. + - name: Run upstream SQL tests + shell: bash + timeout-minutes: 20 + env: + CLICKHOUSE_TEST_RUNNER_PROTOCOL: ${{ matrix.protocol }} + CLICKHOUSE_CLIENT_CLI_LOG: ${{ github.workspace }}/upstream-run.log + SKIP_BUILD: "1" + SHARD_INDEX: ${{ matrix.shard }} + SHARD_TOTAL: 8 + run: tests/clickhouse-test-runner/scripts/run-upstream-tests.sh -j 4 2>&1 | tee upstream-tests.log + + - name: Get the error log of the server + if: failure() + run: docker cp clickhouse:/var/log/clickhouse-server/clickhouse-server.err.log . || true + + - name: Upload test artifacts + if: failure() + uses: actions/upload-artifact@v7 + with: + name: upstream-sql-tests-${{ steps.upstream.outputs.ref }}-${{ matrix.protocol }}-shard-${{ matrix.shard }} + retention-days: 14 + if-no-files-found: ignore + path: | + upstream-tests.log + upstream-run.log + clickhouse-server.err.log + tests/clickhouse-test-runner/.upstream/ClickHouse/tests/queries/**/*.stdout + tests/clickhouse-test-runner/.upstream/ClickHouse/tests/queries/**/*.stderr diff --git a/AGENTS.md b/AGENTS.md index 46f662905..32dc6890b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -15,6 +15,7 @@ in it.** | The shared code in `ClickHouse.Driver.Common/` | Both client files. Both clients use this code, so run both test suites. | | The examples: `examples/` | [`examples/AGENTS.md`](examples/AGENTS.md) | | The benchmarks: `ClickHouse.Driver.Benchmark/` | This file only (see Benchmarks below). | +| The upstream SQL test harness: `tests/clickhouse-test-runner/` | [`tests/clickhouse-test-runner/AGENTS.md`](tests/clickhouse-test-runner/AGENTS.md) | ## Repository Overview diff --git a/tests/clickhouse-test-runner/.gitignore b/tests/clickhouse-test-runner/.gitignore new file mode 100644 index 000000000..1b25e5887 --- /dev/null +++ b/tests/clickhouse-test-runner/.gitignore @@ -0,0 +1,3 @@ +.bin/ +.bin-real-client/ +.upstream/ diff --git a/tests/clickhouse-test-runner/AGENTS.md b/tests/clickhouse-test-runner/AGENTS.md new file mode 100644 index 000000000..64bde9e58 --- /dev/null +++ b/tests/clickhouse-test-runner/AGENTS.md @@ -0,0 +1,162 @@ +# Instructions for agents: upstream SQL test harness + +This harness runs the ClickHouse core SQL tests through the two clients of this repository: `http` +(`ClickHouse.Driver`) and `tcp` (`ClickHouse.Driver.Tcp`). See [`README.md`](README.md) for how it works and +how to run it. The root [`AGENTS.md`](../../AGENTS.md) also applies. + +## The goal + +The goal is to find bugs in the clients. To pass more tests is not the goal. A failed test is information. +Do not hide it. + +## Rules + +1. **Find the cause of a failure before you do anything with the test.** A test fails for one of three + causes: + - **The client** (`ClickHouse.Driver` or `ClickHouse.Driver.Tcp`). This is what the harness is for. + - **The shim** (the program in this directory). It does not do what `clickhouse-client` does. + - **The environment.** The test cannot pass through any client on this server (see + [Environment causes](#environment-causes)). +2. **The default for a client bug is a fix in the client:** a pull request that fixes the client, with a + test in its test project (read the `AGENTS.md` of the client first, as the root `AGENTS.md` says). Do not + fix a client bug in a pull request that changes the harness: one change per pull request. Some logic + exists in both clients (see the root `AGENTS.md`), so check the other client too. When someone files an + issue for a group, put it on the `Issue:` line of the group. +3. **The default for a shim bug is a fix in the shim.** Make the shim copy `clickhouse-client` more exactly. + Do not change the shim to hide a client bug, for example by another read method, a type-name workaround + or a correction of a wrong value. The shim must use each client as a user does: `http` reads each value + with `ClickHouseDataReader.GetValue(i)`, and `tcp` with `IColumn.GetValue(row)`. +4. **Remove a test from the allowlist only when it cannot pass for an environment cause** (see rules 6 and + 7). Write the reason in the commit message. +5. **A test that fails because of a client bug or a shim gap stays visible.** Do not delete it. Put it in + [`allowlist.txt`](allowlist.txt) as a known failure in the group of its cause: `# # []` when + it fails over both protocols, ` # known=: []` when it fails over one protocol only + and passes over the other. Each group has a header that describes the cause, names the protocols and + gives the number of tests per protocol. The header of a client group also gives a small reproduction + (public API only) and has an `Issue:` line. Make a new group when no group fits; mark a shim group + `shim:` in its header. See the README for the format and for how to + run one group (`KNOWN_FAILURES=`). +6. **A test that cannot pass over one protocol** for an environment cause (for example `WITH TOTALS` over + `http`) gets `# only=: `. Do not use this for a client bug: use a known failure. +7. **Do not list a test that cannot pass for an environment cause** over both protocols. + +## How to find the cause + +Do these steps in this order. Build the shim once (`scripts/build.sh`); the commands below use +`SKIP_BUILD=1`. + +1. **Run the test over both protocols:** + + ```bash + UPSTREAM_TEST_LIST=<(echo ) SKIP_BUILD=1 tests/clickhouse-test-runner/scripts/run-upstream-tests.sh + UPSTREAM_TEST_LIST=<(echo ) SKIP_BUILD=1 CLICKHOUSE_TEST_RUNNER_PROTOCOL=tcp tests/clickhouse-test-runner/scripts/run-upstream-tests.sh + ``` + + The two protocols are two clients with their own type parsers and readers. A test that passes over one + protocol and fails over the other points to the client of the failing protocol, unless the cause is in + the list below. +2. **Run the test through the real `clickhouse-client`** in the server container, on the same server: + + ```bash + UPSTREAM_TEST_LIST=<(echo ) tests/clickhouse-test-runner/scripts/run-with-real-client.sh + ``` + + If it also fails here, the cause is the environment. If it passes here, the cause is the client or the + shim. +3. **Find the statement that fails.** Set `CLICKHOUSE_CLIENT_CLI_LOG` to a file; the log shows each statement + and the error. Read the diff in the output of the runner, and the `.stdout` and `.stderr` files next to the + test. +4. **Compare the shim with the server on that one statement.** Run it through the shim + (`tests/clickhouse-test-runner/.bin/clickhouse-client --query ""`, with + `CLICKHOUSE_TEST_RUNNER_PROTOCOL` for each protocol) and through `curl` with `FORMAT TSV`. Then make the + statement smaller until it is as small as possible. +5. **Decide between the client and the shim with a small program** that uses only the public API of the + client: a console project that references the client projects, as `examples/` does. Read the value as + the shim does (rule 3) and print it. If the program also gives a wrong value or an error, the bug is in + the client. If the program gives the correct value, the bug is in the shim. Try the client of each + protocol that fails. + +### Environment causes + +A test cannot pass through any client on the CI server when it needs one of these: + +- A cluster, shards or replicas (`CLUSTER_DOESNT_EXIST`, `test_shard_localhost`). +- ZooKeeper or Keeper (`NO_ZOOKEEPER`, `Replicated*` engines). +- External services: S3, Azure, HDFS, Kafka, MySQL, PostgreSQL, MongoDB, URL sources. +- Server configuration of the upstream CI: named collections, dictionaries, storage policies, disks, users + and grants, macros (`NAMED_COLLECTION_DOESNT_EXIST`, `NO_ELEMENTS_IN_CONFIG`, `UNKNOWN_POLICY`, + `UNKNOWN_DISK`, `ACCESS_DENIED`). +- Features that the server build or platform does not have (`SUPPORT_IS_DISABLED`). +- Stateful datasets (`--no-stateful`) or long tests (`--no-long`). +- Behavior of the HTTP interface itself (`only=tcp`). The server sends no `WITH TOTALS` and no `extremes` + rows in the HTTP `RowBinary` output, and an HTTP request fails when the current database of the session + was dropped. +- Behavior of the native protocol itself (`only=http`), when the real `clickhouse-client` gives the same + result as the `tcp` protocol. +- Features of `clickhouse-client` itself that are not part of a client library: `INTO OUTFILE`, + `FROM INFILE`, client-side parsing of `INSERT` data, and client-only settings. +- Results that depend on the threads that the server gives under parallel load: `EXPLAIN PIPELINE` and + `EXPLAIN ANALYZE` in a test without the `no-parallel` tag, and tests that set + `max_streams_to_max_threads_ratio`, `max_streams_multiplier_for_merge_tables` or + `max_streams_for_merge_tree_reading`. Such a test passes alone and fails now and then in a full run. +- Tests that conflict with other tests of the set: a fixed table UUID, or server state that a test leaves + behind (failpoints that a failed test did not disable, row policies). Such a test passes alone on a fresh + server and fails in a full run. A failure message with "Injected failure" comes from a failpoint of another + test. +- Memory limits of the server, when the test also fails through the real `clickhouse-client`. + +These are **not** environment causes. Find the bug: + +- A value that is different from the server's value. This includes a time zone offset: the HTTP client uses + its own tz database (NodaTime TZDB), and its rules for some zones before 1940 are not the rules of the + server (`[http-tz-database-differs]`). +- A type that the client does not parse, or a read error. +- A failure over one protocol only, when the cause is not in the list above. +- A test that hangs over one protocol only. + +## Conditions for the allowlist + +- Add a test only when it passes over **both** protocols, or over one protocol with an `only=` reason + (rule 6) or a `known=` line (rule 5). +- Run new tests three times, also with a higher `-j` than CI (CI uses `-j 4`), on a **fresh** server (remove + the server container and start a new one). Tests change the state of the server (row policies, settings + profiles, users). A test that passes only after other tests ran must not go in. +- The TCP client and the shim read the tz database of the system (`TimeZoneInfo`). Some tests use legacy + zone names (`US/Samoa`, `Asia/Calcutta`), which current Ubuntu versions have only in `tzdata-legacy`. CI + installs it; install it locally too, or such tests fail for a cause that is not in the client. +- Do not run two sweeps at the same time on one server. The memory pressure causes `MEMORY_LIMIT_EXCEEDED` + failures that are not real. +- CI does not run failed tests again. When a test in the allowlist starts to fail intermittently, find the + cause first (rule 1). Remove it only when the cause is in the environment or in the test itself, and write + the reason. A client bug can make random tests fail. Put the tests that it makes fail in its group. When + the set changes from run to run, set `RETRY_FAILED` in the workflow instead, and document the group in the + README. + +## Bump the server version + +The server version and the upstream tests are pinned together in [`clickhouse-version`](clickhouse-version). +A new ClickHouse release changes nothing in CI until a pull request bumps the pin, so other pull requests do +not fail because of a release. Bump the pin in a pull request of its own, and make that pull request pass +before it merges: + +1. Select the version: a full version with a server image tag and a `v-stable` tag upstream, + normally the version of the `latest` image. +2. Try it: start a manual run with the `clickhouse_version` input, or run the allowlist locally on that + version (`fetch-upstream.sh `, and a fresh server of that version). +3. For each allowlisted test that now fails, find the cause (rule 1). A release changes the tests and the + server output, so many tests can fail at the same time with no change in the clients. To see whether a + client is the cause, run the same test through the real client (`run-with-real-client.sh`) on the same + server. +4. Run the known failures (`KNOWN_FAILURES=all`, over each protocol). Enable the tests that pass now. +5. Fix the names of allowlisted tests that the run reports as not in the checkout (upstream renamed or + removed them). +6. Optionally, try the new tests of the release (see "Grow the allowlist" in the README). +7. Change `clickhouse-version`, run `fetch-upstream.sh`, and commit `ClickHouse.Driver.TestRunner/ErrorCodes.g.cs` + with it. CI fails when the committed table does not match the pinned version. + +## Keep the documents in sync + +When you change the behavior of the shim (flags, statement handling, output formats, settings), update +[`README.md`](README.md), this file and the workflow in the same change. The shim is not in +`ClickHouse.Driver.sln`, so the other workflows do not build it: build it and run its tests +(`ClickHouse.Driver.TestRunner.Tests`) also when you change a public API of a client that it uses. diff --git a/tests/clickhouse-test-runner/CLAUDE.md b/tests/clickhouse-test-runner/CLAUDE.md new file mode 100644 index 000000000..43c994c2d --- /dev/null +++ b/tests/clickhouse-test-runner/CLAUDE.md @@ -0,0 +1 @@ +@AGENTS.md diff --git a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/ClickHouse.Driver.TestRunner.Tests.csproj b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/ClickHouse.Driver.TestRunner.Tests.csproj new file mode 100644 index 000000000..b079f049a --- /dev/null +++ b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/ClickHouse.Driver.TestRunner.Tests.csproj @@ -0,0 +1,34 @@ + + + + + net10.0 + false + true + enable + enable + latest + true + true + $(NoWarn);CHTCP0001 + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + diff --git a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/LiveTests.cs b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/LiveTests.cs new file mode 100644 index 000000000..2c80d7287 --- /dev/null +++ b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/LiveTests.cs @@ -0,0 +1,425 @@ +using System.Text; +using NUnit.Framework; + +namespace ClickHouse.Driver.TestRunner.Tests; + +/// +/// Tests that need a ClickHouse server: set CLICKHOUSE_TEST_RUNNER_LIVE=1. The server is +/// CLICKHOUSE_HOST (default localhost), on CLICKHOUSE_PORT_TCP (9000) and +/// CLICKHOUSE_PORT_HTTP (8123). +/// +[Category("Live")] +[NonParallelizable] +public class LiveTests +{ + // Expressions whose text the shim must write exactly as the server does, over both protocols. A client + // bug of one protocol is not here; see the known failures in allowlist.txt. + private static readonly string[] Expressions = + [ + "toInt8(-1), toUInt8(255), toInt64(-9223372036854775808), toUInt64(18446744073709551615)", + "toInt128('-170141183460469231731687303715884105728'), toUInt256('115792089237316195423570985008687907853269984665640564039457584007913129639935')", + "toInt256('-57896044618658097711785492504343953926634992332820282019728792003956564819968'), toUInt128('340282366920938463463374607431768211455')", + "arrayJoin([1e15, 1e21, 1.5e-7, 0.1 + 0.2, nan, inf, -inf, -0., 5e-324, 1.7976931348623157e308])", + "toFloat32(0.1), toFloat32(3.4028235e38), toFloat32(-1.5e-7), toFloat32(nan)", + "toBFloat16(1.5), toBFloat16(0.1), toBFloat16(-3.140625)", + "toDecimal32(1.50, 2), toDecimal64(-0.001, 5), toDecimal128(100, 3), toDecimal256('1.5', 10), toDecimal32(0, 3)", + "toDecimal128('12345678901234567890.123456789', 9), toDecimal256('-0.0000000000000000000000000000000000001', 40)", + "'a\\tb\\\\c\\nd''e\\0\\b\\f\\v\\x01', toFixedString('ab', 4), 'ünïcødé ☃'", + "true, false, NULL, CAST(NULL AS Nullable(String)), CAST(1 AS Nullable(UInt8))", + "toDate('2020-01-02'), toDate32('1900-01-01'), toDate32('2299-12-31'), toDateTime('2020-01-01 10:00:00', 'UTC')", + "toDateTime('2020-01-01 10:00:00', 'Asia/Tokyo'), toDateTime64('2020-01-01 00:00:00.120', 3), toDateTime64('2020-01-01 00:00:00.1234567', 7, 'Asia/Tokyo')", + "toDateTime64('1900-01-01 00:00:00.5', 1, 'UTC'), toDateTime64('2299-12-31 23:59:59.99', 2, 'UTC'), toDateTime64('1969-12-31 23:59:59.999', 3, 'UTC')", + "toDateTime('2020-07-01 12:00:00', 'Europe/Amsterdam'), toDateTime('2020-01-01 12:00:00', 'America/New_York')", + "toUUID('61f0c404-5cb3-11e7-907b-a6006ad3dba0'), toIPv4('1.2.3.4'), toIPv6('::ffff:1.2.3.4'), toIPv6('::1.2.3.4'), toIPv6('2001:db8::1'), toIPv6('::')", + "[1, 2], ['a''b', NULL], [[1], []], [toDate('2020-01-01')], [toDateTime64('2020-01-01 00:00:00.5', 2)], []", + "(1, 'x', NULL), CAST((1, 'x') AS Tuple(a Int32, b String)), [(1, 'a')], ((1, 'a'), 2), (toInt128(1), 'a')", + "tuple(), toNullable(tuple(1::UInt8)), CAST(tuple(NULL) AS Tuple(x LowCardinality(Nullable(String))))", + "map('k', 1, 'a', 2), map(1, [2]), map('x', map('y', 1, 'z', 2)), map(), mapFromArrays(['a', 'a'], [1, 2])", + "CAST('a' AS Enum8('a' = 1, 'b' = 2)), [CAST('b' AS Enum16('a' = 1, 'b' = 2))], CAST(NULL AS Nullable(Enum8('x' = -1))), CAST('it''s' AS Enum8('it''s' = 1))", + "toLowCardinality('x'), toLowCardinality(toNullable('y')), [toLowCardinality('z')], toLowCardinality(toNullable(toDateTime('2020-01-01 00:00:00', 'UTC')))", + "toTime('12:34:56'), toTime('-1:02:03'), toTime64('12:00:00.5', 3), toTime64('-100:00:00.1234567', 7)", + "(1.5, 2.5)::Point, [(1, 2), (3, 4)]::Ring, [[(1, 2), (3, 4)]]::Polygon", + "number, toString(number) FROM numbers(3)", + "if(number % 5, NULL, toInt8OrZero(toString(number))) FROM numbers(6)", + "CAST(1 AS SimpleAggregateFunction(sum, UInt64))", + // Variant, Geometry and Dynamic: TCP takes the type of each value from the column, also inside Array, Tuple + // and Map; HTTP from the .NET value (alternatives with one text for it, or a .NET type with one text). + "CAST('a\\tb' AS Variant(String, UInt64)), CAST(7::UInt64 AS Variant(String, UInt64)), CAST(NULL AS Variant(String, UInt64))", + "[CAST('a' AS Variant(String, UInt8)), CAST(1 AS Variant(String, UInt8)), NULL], (CAST(1 AS Variant(UInt8, String)), 'x'), map('k', CAST('v' AS Variant(String, UInt8)), 'l', CAST(2 AS Variant(String, UInt8)))", + "CAST([1, 2]::Array(UInt64) AS Variant(Array(UInt64), String)), CAST((1, 'x')::Tuple(UInt8, String) AS Variant(Tuple(UInt8, String), UInt8)), CAST(map('a', 1::UInt8) AS Variant(Map(String, UInt8), UInt8)), CAST('b'::Enum8('b' = 1) AS Variant(Enum8('b' = 1), Array(UInt8)))", + "[CAST(toDate('2020-01-01') AS Variant(Date, String)), CAST('x' AS Variant(Date, String))], (CAST(toDateTime64('2020-01-01 00:00:00.5', 1, 'UTC') AS Variant(DateTime64(1, 'UTC'), String)), 1)", + "(1.5, 2.5)::Point::Geometry, [(1, 2), (3, 4)]::Ring::Geometry, [(1, 2), (3, 4)]::LineString::Geometry, [[(1, 2), (3, 4)]]::Polygon::Geometry, [[[(1, 2)]]]::MultiPolygon::Geometry", + "[(1, 2)::Point::Geometry, [[(0, 0)]]::Polygon::Geometry], ((1, 2)::Point::Geometry, 1), map('g', [(1, 2)]::Ring::Geometry)", + "1::Dynamic, 'a''b'::Dynamic, NULL::Dynamic, [1, 2]::Dynamic, (1, 'x')::Dynamic, map('a', 1, 'b', 2)::Dynamic", + "1.5::Dynamic, toFloat32(0.1)::Dynamic, true::Dynamic, toUUID('61f0c404-5cb3-11e7-907b-a6006ad3dba0')::Dynamic, toDecimal64(1.50, 2)::Dynamic, toIPv4('1.2.3.4')::Dynamic, toInt128(-1)::Dynamic", + "[1::Dynamic, 'a'::Dynamic, NULL::Dynamic], map('k', [1]::Dynamic), (2::Dynamic, 3), [[1::Dynamic], ['b'::Dynamic]]", + "x::Dynamic FROM (SELECT arrayJoin([1, 2, 3]) AS x)", + // A column or alias named `format` is not the FORMAT clause. + "1 AS format ORDER BY format DESC", + "1 AS format ORDER BY format ASC", + "format FROM (SELECT 1 AS format)", + "1 AS format FROM numbers(1)", + ]; + + private static readonly string Host = Environment.GetEnvironmentVariable("CLICKHOUSE_HOST") is { Length: > 0 } h ? h : "localhost"; + + [SetUp] + public void RequireServer() + { + if (Environment.GetEnvironmentVariable("CLICKHOUSE_TEST_RUNNER_LIVE") != "1") + { + Assert.Ignore("Set CLICKHOUSE_TEST_RUNNER_LIVE=1 to run the tests against a ClickHouse server."); + } + } + + public static IEnumerable RenderCases() => + from protocol in new[] { Protocol.Http, Protocol.Tcp } + from expr in Expressions + select new TestCaseData(protocol, expr).SetName($"Render_{protocol}({expr[..Math.Min(60, expr.Length)]})"); + + [TestCaseSource(nameof(RenderCases))] + public async Task Render_Expression_MatchesTheServerTsv(Protocol protocol, string expr) + { + var query = "SELECT " + expr; + var expected = await ServerTsvAsync(query); + var (stdout, stderr, code) = await RunShimAsync(protocol, query); + Assert.That(code, Is.Zero, stderr); + Assert.That(stdout, Is.EqualTo(expected)); + } + + [TestCase(Protocol.Http)] + [TestCase(Protocol.Tcp)] + public async Task Run_SessionState_LastsForTheInvocation(Protocol protocol) + { + var script = string.Join('\n', + "SET max_threads = 3;", + "SELECT getSetting('max_threads');", + "CREATE TEMPORARY TABLE t (x UInt8);", + "INSERT INTO t VALUES (1), (2);", + "INSERT INTO t FORMAT TSV", + "3", + string.Empty, + "SELECT sum(x) FROM t;"); + var (stdout, stderr, code) = await RunShimAsync(protocol, script); + Assert.That(code, Is.Zero, stderr); + Assert.That(stdout, Is.EqualTo("3\n6\n")); + } + + [TestCase(Protocol.Http)] + [TestCase(Protocol.Tcp)] + public async Task Run_LexerDetails_AreAsInClickHouseClient(Protocol protocol) + { + // The text that clickhouse-client 26.10 writes for this script (checked with the real client). (1) A + // SYNTAX_ERROR that the server finds at run time (hint serverError) is echoed; a statement that the client + // cannot parse (hint clientError) is not. (2) Unicode whitespace before the keyword. (3) A `//` comment + // after the `;` belongs to the statement. + var script = string.Join('\n', + "-- { echo }", + "SELECT formatQuery('SELECT'); -- { serverError SYNTAX_ERROR }", + "SELECT 1 FROM; -- { clientError SYNTAX_ERROR }", + "\u00A0\u2003\uFEFFSELECT 2; // c", + "SELECT 3;"); + var (stdout, stderr, code) = await RunShimAsync(protocol, script); + Assert.That(code, Is.Zero, stderr); + Assert.That(stdout, Is.EqualTo( + "-- { echo }\nSELECT formatQuery('SELECT'); -- { serverError SYNTAX_ERROR }\n" + + "\u00A0\u2003\uFEFFSELECT 2; // c\n2\n" + + "SELECT 3;\n3\n")); + } + + // The trailing FORMAT of EXPLAIN AST and of an explained INSERT with its own data belongs to the explained + // query. Contrasts: the FORMAT after a parenthesized INSERT, after the SETTINGS of an INSERT SELECT, and of + // EXPLAIN SYNTAX SELECT is the output format of the EXPLAIN (TSVWithNames shows which one it is). + [TestCase(Protocol.Http, "EXPLAIN AST SHOW ROW POLICIES FORMAT TabSeparated")] + [TestCase(Protocol.Tcp, "EXPLAIN AST SHOW ROW POLICIES FORMAT TabSeparated")] + [TestCase(Protocol.Http, "EXPLAIN SYNTAX INSERT INTO t SELECT x FROM input('x UInt32') FORMAT TSV")] + [TestCase(Protocol.Tcp, "EXPLAIN SYNTAX INSERT INTO t SELECT x FROM input('x UInt32') FORMAT TSV")] + [TestCase(Protocol.Http, "EXPLAIN AST (SELECT 1) FORMAT TabSeparated")] + [TestCase(Protocol.Tcp, "EXPLAIN AST (SELECT 1) FORMAT TabSeparated")] + [TestCase(Protocol.Http, "EXPLAIN AST ((SELECT 1) SETTINGS max_threads = 1) FORMAT TSVWithNames")] + [TestCase(Protocol.Tcp, "EXPLAIN AST ((SELECT 1) SETTINGS max_threads = 1) FORMAT TSVWithNames")] + [TestCase(Protocol.Http, "EXPLAIN AST INSERT INTO t (SELECT 1) SETTINGS max_threads = 1 FORMAT TSV")] + [TestCase(Protocol.Tcp, "EXPLAIN AST INSERT INTO t (SELECT 1) SETTINGS max_threads = 1 FORMAT TSV")] + [TestCase(Protocol.Http, "EXPLAIN AST (INSERT INTO t SELECT 1) FORMAT TSVWithNames")] + [TestCase(Protocol.Tcp, "EXPLAIN AST (INSERT INTO t SELECT 1) FORMAT TSVWithNames")] + [TestCase(Protocol.Http, "EXPLAIN SYNTAX SELECT 1 FORMAT TSVWithNames")] + [TestCase(Protocol.Tcp, "EXPLAIN SYNTAX SELECT 1 FORMAT TSVWithNames")] + public async Task Run_ExplainFormat_IsAsOnTheServer(Protocol protocol, string query) + { + var (stdout, stderr, code) = await RunShimAsync(protocol, query); + Assert.That(code, Is.Zero, stderr); + Assert.That(stdout, Is.EqualTo(await ServerTsvAsync(query))); + } + + [TestCase(Protocol.Http)] + [TestCase(Protocol.Tcp)] + public async Task Run_KillMutation_WritesTheStoppedMutation(Protocol protocol) + { + // A mutation that cannot finish ('x' is not a UInt64) fails the ALTER and waits until KILL MUTATION stops it; + // KILL returns a row for it, as in clickhouse-client. + var table = "shim_kill_" + protocol.ToString().ToLowerInvariant(); + var script = string.Join('\n', + $"DROP TABLE IF EXISTS {table};", + $"CREATE TABLE {table} (v String) ENGINE = MergeTree ORDER BY tuple();", + $"INSERT INTO {table} VALUES ('x');", + $"ALTER TABLE {table} MODIFY COLUMN v UInt64 SETTINGS mutations_sync = 2; -- {{ serverError UNFINISHED }}", + $"KILL MUTATION WHERE database = currentDatabase() AND table = '{table}' FORMAT TSVWithNames;", + $"DROP TABLE {table};"); + var (stdout, stderr, code) = await RunShimAsync(protocol, script); + Assert.That(code, Is.Zero, stderr); + Assert.That(stdout, Does.Match( + $"^kill_status\tdatabase\ttable\tmutation_id\tcommand\nwaiting\tdefault\t{table}\tmutation_\\d+\\.txt\t\\(MODIFY COLUMN `v` UInt64\\)\n$")); + } + + [TestCase(Protocol.Http)] + [TestCase(Protocol.Tcp)] + public async Task Run_FeatureTagOverrides_TurnTheFeatureOff(Protocol protocol) + { + // `async_insert` is on by default in current servers; a test with the tag no-async-insert needs it off. A + // SET in the test replaces the command-line value. A randomized setting of the runner is not sent. + var script = string.Join('\n', + "SELECT getSetting('async_insert'), getSetting('enable_parallel_replicas'), getSetting('max_block_size');", + "SET async_insert = 1;", + "SELECT getSetting('async_insert');"); + var (stdout, stderr, code) = await RunShimAsync(protocol, script, + "--async_insert", "0", "--enable_parallel_replicas", "0", "--max_block_size", "7"); + Assert.That(code, Is.Zero, stderr); + var expected = await ServerTsvAsync( + "SELECT getSetting('async_insert'), getSetting('enable_parallel_replicas'), getSetting('max_block_size') " + + "SETTINGS async_insert = 0, enable_parallel_replicas = 0") + + await ServerTsvAsync("SELECT getSetting('async_insert') SETTINGS async_insert = 1"); + Assert.That(expected, Does.StartWith("false\t0\t")); + Assert.That(stdout, Is.EqualTo(expected)); + } + + [TestCase(Protocol.Http)] + [TestCase(Protocol.Tcp)] + public async Task Run_SetAfterExpectedError_IsKept(Protocol protocol) + { + // The TCP client closes the session after a server error; the shim opens a new session and runs the + // SET and USE statements again. + var script = string.Join('\n', + "SET max_threads = 3;", + "SELECT throwIf(1); -- { serverError FUNCTION_THROW_IF_VALUE_IS_NON_ZERO }", + "SELECT getSetting('max_threads');"); + var (stdout, stderr, code) = await RunShimAsync(protocol, script); + Assert.That(code, Is.Zero, stderr); + Assert.That(stdout, Is.EqualTo("3\n")); + } + + [TestCase(Protocol.Http)] + [TestCase(Protocol.Tcp)] + public async Task Run_ParameterOutsideCode_IsNotSent(Protocol protocol) + { + // The server substitutes a placeholder only in code, not in a string literal or a comment. The TCP client + // rejects a parameter without a placeholder in code, so the shim sends only the parameters in code. + var (stdout, stderr, code) = await RunShimAsync(protocol, "SELECT '{p:String}' /* {p:String} */, {q:UInt8};", "--param_p=x", "--param_q=7"); + Assert.That(code, Is.Zero, stderr); + Assert.That(stdout, Is.EqualTo(await ServerTsvAsync("SELECT '{p:String}', 7"))); + } + + [TestCase(Protocol.Http)] + [TestCase(Protocol.Tcp)] + public async Task Run_OutputFormats_WriteTheTabSeparatedFamily(Protocol protocol) + { + var (stdout, stderr, code) = await RunShimAsync(protocol, string.Join('\n', + "SELECT 'a\\tb' AS s, 1 AS n FORMAT TSVWithNamesAndTypes;", + "SELECT 'a\\tb' FORMAT TSVRaw;", + "SELECT 1 FORMAT Null;", + "SELECT 2; -- { echo }")); + Assert.That(code, Is.Zero, stderr); + Assert.That(stdout, Is.EqualTo("s\tn\nString\tUInt8\na\\tb\t1\na\tb\nSELECT 2; -- { echo }\n2\n")); + } + + // The HTTP client does not know the Interval types (a client bug; see allowlist.txt). + [TestCase("toIntervalSecond(-5), INTERVAL 3 DAY, [toIntervalYear(1)]")] + // DateTime64 counts outside the range of the .NET date types: the HTTP client cannot read them (see + // allowlist.txt); the TCP client gives the count, and the shim writes the server's clamped text. + [TestCase("reinterpret(toInt64(-62161776000000000), 'DateTime64(6, ''UTC'')'), reinterpret(toInt64(-9223372036854775808), 'DateTime64(3, ''UTC'')'), reinterpret(toInt64(-62167219200001), 'DateTime64(3, ''UTC'')')")] + [TestCase("reinterpret(toInt64(9223372036854775616), 'DateTime64(3, ''UTC'')'), reinterpret(toInt64(9223372036854775806), 'DateTime64(7, ''Asia/Istanbul'')'), reinterpret(toInt64(9223372036854775806), 'DateTime64(8, ''Asia/Istanbul'')')")] + [TestCase("[reinterpret(toInt64(253402387199000), 'DateTime64(3, ''America/New_York'')')], toNullable(reinterpret(toInt64(-62167215600000), 'DateTime64(3, ''America/New_York'')'))")] + // The HTTP client gives a Dynamic or Variant value without its type, and a DateTime (or a JSON value) has no + // single text without it (shim-render-dynamic, shim-render-variant, shim-render-json in allowlist.txt). + [TestCase("[toDateTime64('2020-01-01 00:00:00.5', 2, 'UTC')::Dynamic, toDate('2020-01-01')::Dynamic, toDateTime('2020-01-01 10:00:00', 'Asia/Tokyo')::Dynamic], map('t', toTime64('01:02:03.4', 1)::Dynamic)")] + [TestCase("CAST('{\"a\":1}' AS SimpleAggregateFunction(anyLast, JSON)), [CAST('{\"b\":\"x\"}'::JSON AS Variant(JSON, String))]")] + public async Task Render_TcpOnlyExpression_MatchesTheServerTsv(string expr) + { + var query = "SELECT " + expr; + var (stdout, stderr, code) = await RunShimAsync(Protocol.Tcp, query); + Assert.That(code, Is.Zero, stderr); + Assert.That(stdout, Is.EqualTo(await ServerTsvAsync(query))); + } + + // TCP: a String that is not UTF-8 is written from its bytes (IStringColumn.GetBytes), as the server writes + // it, at the top level and nested. The many-rows case checks the row of each value in its column + // (LowCardinality keys, Array and Map offsets, Variant and Dynamic local rows). + private static readonly string[] StringBytesExpressions = + [ + "unhex('FF41'), unhex('C328'), 'a\\tb', unhex('00FF0A5C27'), ''", + "[unhex('FF'), 'x', unhex('E282')], [[unhex('FE')], []], []::Array(String)", + "map(unhex('FE'), unhex('FF'), 'k', 'v'), map('a', [unhex('80')]), map(toLowCardinality(unhex('FD')), 1)", + "(unhex('FF'), 1), CAST((unhex('FF'), 'b') AS Tuple(x String, y Nullable(String))), [(unhex('FE'), unhex('FD'))]", + "toNullable(unhex('FF')), CAST(NULL AS Nullable(String)), [toNullable(unhex('FE')), NULL]", + "toLowCardinality(unhex('FF')), toLowCardinality(toNullable(unhex('FE'))), [toLowCardinality(unhex('80'))], CAST(NULL AS LowCardinality(Nullable(String)))", + "toFixedString(unhex('FF41'), 3), [toFixedString(unhex('FE'), 2)], toNullable(toFixedString(unhex('FD'), 1))", + "CAST(unhex('FF') AS Variant(String, UInt64)), [CAST(unhex('FE') AS Variant(String, UInt64)), CAST(1::UInt64 AS Variant(String, UInt64))]", + // Rows with different bytes that decode to the same text (FF, FE, FD: U+FFFD), so a wrong row is a wrong text. + "unhex(x), toLowCardinality(unhex(x)), toLowCardinality(toNullable(if(x = '41', NULL, unhex(x)))), [unhex(x), x], map(unhex(x), x), (x, unhex(x)), " + + "[toLowCardinality(unhex(x))], map(toLowCardinality(unhex(x)), 1), " + + "if(x = '41', 7::UInt64::Variant(String, UInt64), unhex(x)::Variant(String, UInt64)), if(x = '', 1::Dynamic, unhex(x)::Dynamic) " + + "FROM values('x String', 'FF', 'FE', '41', 'C328', '', 'FF41FE', 'FD')", + "CAST(arrayMap(i -> (unhex(concat(x, repeat(toString(i), 2))), i), range(n)) AS Nested(a String, b UInt8)) " + + "FROM values('x String, n UInt8', ('FF', 2), ('FE', 0), ('FD', 1))", + "CAST(concat('{\"a\":\"', unhex('FF'), '\"}') AS JSON), CAST(concat('x', unhex('FE')) AS SimpleAggregateFunction(any, String))", + ]; + + [TestCaseSource(nameof(StringBytesExpressions))] + public async Task Render_TcpStringNotUtf8_IsTheServerBytes(string expr) + { + var query = "SELECT " + expr; + var (stdout, stderr, code) = await RunShimBytesAsync(Protocol.Tcp, query); + Assert.That(code, Is.Zero, stderr); + Assert.That(Convert.ToHexString(stdout), Is.EqualTo(Convert.ToHexString(await ServerBytesAsync(query)))); + } + + [TestCase("SELECT unhex('FF09'), toLowCardinality(toNullable(unhex('FE5C'))), toFixedString(unhex('FD0A'), 2), CAST(NULL AS Nullable(String)), toNullable(unhex('FD5C')), toLowCardinality(unhex('FC09')), CAST(unhex('FB09') AS SimpleAggregateFunction(any, String)) FORMAT TSVRaw")] + [TestCase("SELECT toLowCardinality(unhex(x)), toNullable(unhex(x)), toLowCardinality(toNullable(if(x = '41', NULL, unhex(x)))) FROM values('x String', 'FF09', 'FE5C', '41', 'FD09') FORMAT TSVRaw")] + [TestCase("SELECT unhex(x) AS s, count() FROM values('x String', 'FF', 'FE', 'FE') GROUP BY s WITH TOTALS ORDER BY s SETTINGS extremes = 1")] + [TestCase("SELECT unhex('FF')::Dynamic, [unhex('FE')::Dynamic, 1::Dynamic], map('k', unhex('FD')::Dynamic), CAST(unhex('FC') AS Variant(String, Array(UInt8)))")] + public async Task Run_TcpStringNotUtf8_IsTheServerBytes(string query) + { + var (stdout, stderr, code) = await RunShimBytesAsync(Protocol.Tcp, query); + Assert.That(code, Is.Zero, stderr); + Assert.That(Convert.ToHexString(stdout), Is.EqualTo(Convert.ToHexString(await ServerBytesAsync(query)))); + } + + // TSVRaw writes a string, an enum label and the value of SimpleAggregateFunction(f, String) without escapes. + [TestCase(Protocol.Http)] + [TestCase(Protocol.Tcp)] + public async Task Run_TsvRawStringTypes_AreNotEscaped(Protocol protocol) + { + const string query = "SELECT CAST('a\\tb' AS SimpleAggregateFunction(any, String)), CAST('x\\ty' AS Enum8('x\\ty' = 1)), toLowCardinality(toNullable('c\\\\d')), [CAST('e' AS Enum8('e' = 2))] FORMAT TSVRaw"; + var (stdout, stderr, code) = await RunShimBytesAsync(protocol, query); + Assert.That(code, Is.Zero, stderr); + Assert.That(Convert.ToHexString(stdout), Is.EqualTo(Convert.ToHexString(await ServerBytesAsync(query)))); + } + + [Test] + public async Task Render_HttpStringNotUtf8_IsTheUtf8DecodingOfTheClient() + { + // HTTP: the shim reads String with the default mapping of the client (string), which has U+FFFD for a byte + // that is not UTF-8 (shim-http-string-bytes in allowlist.txt). A FixedString is the same. + var (stdout, stderr, code) = await RunShimBytesAsync(Protocol.Http, "SELECT unhex('FF41'), [unhex('FE')], toFixedString(unhex('FD'), 1)"); + Assert.That(code, Is.Zero, stderr); + Assert.That(Convert.ToHexString(stdout), Is.EqualTo("EFBFBD41" + "09" + "5B27EFBFBD275D" + "09" + "EFBFBD" + "0A")); + } + + // The output settings of the session (SET) and of the query (SETTINGS) change the text of the shim as they + // change the server's text. + private const string OutputExpressions = + "toDateTime('2020-10-15 00:00:00', 'Europe/Moscow'), toDateTime64('2020-10-15 00:00:00.12', 2, 'Europe/Moscow'), " + + "[toDateTime('2020-10-15 00:00:00', 'UTC')], toDateTime64('1960-01-01 00:00:00.5', 1, 'UTC'), toDate('2020-01-01'), " + + "CAST(NULL, 'Nullable(DateTime)'), [NULL], (1, NULL), toDecimal32(1.5, 4), [toDecimal64(2, 3)], toDecimal128(0, 2), " + + "toDateTime64('2024-01-01 00:00:00.1', 1, 'UTC'), toDateTime64('2024-01-01 00:00:00.12', 6, 'UTC'), toDateTime64('2024-01-01 00:00:00', 4, 'UTC')"; + + [TestCase(Protocol.Http, "date_time_output_format = 'iso'")] + [TestCase(Protocol.Tcp, "date_time_output_format = 'iso'")] + [TestCase(Protocol.Http, "date_time_output_format = 'unix_timestamp'")] + [TestCase(Protocol.Tcp, "date_time_output_format = 'unix_timestamp'")] + [TestCase(Protocol.Http, "format_tsv_null_representation = 'a\\tb'")] + [TestCase(Protocol.Tcp, "format_tsv_null_representation = 'XYZ'")] + [TestCase(Protocol.Http, "output_format_decimal_trailing_zeros = 1")] + [TestCase(Protocol.Tcp, "output_format_decimal_trailing_zeros = 1")] + [TestCase(Protocol.Http, "date_time_64_output_format_cut_trailing_zeros_align_to_groups_of_thousands = 1")] + [TestCase(Protocol.Tcp, "date_time_64_output_format_cut_trailing_zeros_align_to_groups_of_thousands = 1")] + public async Task Run_OutputSettings_ChangeTheTextAsOnTheServer(Protocol protocol, string setting) + { + var expected = await ServerTsvAsync($"SELECT {OutputExpressions} SETTINGS {setting}"); + var (stdout, stderr, code) = await RunShimAsync(protocol, $"SET {setting};\nSELECT {OutputExpressions};\nSET date_time_output_format = 'simple';\nSELECT {OutputExpressions} SETTINGS {setting};"); + Assert.That(code, Is.Zero, stderr); + Assert.That(stdout, Is.EqualTo(expected + expected)); + } + + [Test] + public async Task Run_HttpSessionTimezone_IsTheZoneOfDateTimeWithoutZone() + { + // The HTTP client gives the UTC wall clock and the session time zone (ClickHouseCommand.ServerTimezone). + const string exprs = "toDateTime('2020-01-01 00:00:00') AS a, toDateTime64('2020-01-01 00:00:00.5', 1), [a], toDateTime64('1789-07-14 00:00:00', 0), toDateTime('2020-01-01 00:00:00', 'UTC'), toString(a)"; + var expected = await ServerTsvAsync($"SELECT {exprs} SETTINGS session_timezone = 'America/New_York'"); + var (stdout, stderr, code) = await RunShimAsync(Protocol.Http, $"SET session_timezone = 'America/New_York';\nSELECT {exprs};\nSET session_timezone = '';\nSELECT {exprs} SETTINGS session_timezone = 'America/New_York';"); + Assert.That(code, Is.Zero, stderr); + Assert.That(stdout, Is.EqualTo(expected + expected)); + } + + [Test] + public async Task Run_TotalsAndExtremesOverTcp_FollowTheData() + { + var query = "SELECT number % 2 AS k, count() FROM numbers(4) GROUP BY k WITH TOTALS ORDER BY k SETTINGS extremes = 1"; + var (stdout, stderr, code) = await RunShimAsync(Protocol.Tcp, query); + Assert.That(code, Is.Zero, stderr); + Assert.That(stdout, Is.EqualTo(await ServerTsvAsync(query))); + } + + [TestCase(Protocol.Http)] + [TestCase(Protocol.Tcp)] + public async Task Run_Errors_StopTheScriptWithTheErrorCode(Protocol protocol) + { + // An unexpected error stops the script, writes the error name to stderr, and sets the exit code to + // the error code. + var (stdout, stderr, code) = await RunShimAsync(protocol, "SELECT 1; SELECT * FROM no_such_table_xyz; SELECT 2;"); + Assert.That(stdout, Is.EqualTo("1\n")); + Assert.That(code, Is.EqualTo(60)); + Assert.That(stderr, Does.Contain("UNKNOWN_TABLE")); + + // A query that succeeds although the hint expects an error. + (_, stderr, code) = await RunShimAsync(protocol, "SELECT 1; -- { serverError UNKNOWN_TABLE }"); + Assert.That(code, Is.Not.Zero); + Assert.That(stderr, Does.Contain("expected serverError UNKNOWN_TABLE")); + + // A different error than the hint expects. + (_, stderr, code) = await RunShimAsync(protocol, "SELECT * FROM no_such_table_xyz; -- { serverError SYNTAX_ERROR }"); + Assert.That(code, Is.EqualTo(60), stderr); + } + + // The server's own TabSeparated bytes of a query. + private static async Task ServerBytesAsync(string query) + { + using var http = new HttpClient(); + var port = Environment.GetEnvironmentVariable("CLICKHOUSE_PORT_HTTP") is { Length: > 0 } p ? p : "8123"; + var uri = new UriBuilder("http", Host, int.Parse(port, System.Globalization.CultureInfo.InvariantCulture)) { Query = "default_format=TabSeparated" }.Uri; + using var response = await http.PostAsync(uri, new StringContent(query)); + var body = await response.Content.ReadAsByteArrayAsync(); + Assert.That(response.IsSuccessStatusCode, Is.True, Encoding.UTF8.GetString(body)); + return body; + } + + private static async Task<(byte[] Stdout, string Stderr, int Code)> RunShimBytesAsync(Protocol protocol, string query) + { + using var stdout = new MemoryStream(); + using var stderr = new StringWriter(); + var port = Environment.GetEnvironmentVariable("CLICKHOUSE_PORT_TCP") is { Length: > 0 } p ? p : "9000"; + var code = await Program.RunAsync(["--host", Host, "--port", port, "--query", query], Stream.Null, stdout, stderr, protocol); + return (stdout.ToArray(), stderr.ToString(), code); + } + + // The server's own TabSeparated text of a query. + private static async Task ServerTsvAsync(string query) + { + using var http = new HttpClient(); + var port = Environment.GetEnvironmentVariable("CLICKHOUSE_PORT_HTTP") is { Length: > 0 } p ? p : "8123"; + var uri = new UriBuilder("http", Host, int.Parse(port, System.Globalization.CultureInfo.InvariantCulture)) { Query = "default_format=TabSeparated" }.Uri; + using var response = await http.PostAsync(uri, new StringContent(query)); + var body = await response.Content.ReadAsStringAsync(); + Assert.That(response.IsSuccessStatusCode, Is.True, body); + return body; + } + + private static async Task<(string Stdout, string Stderr, int Code)> RunShimAsync(Protocol protocol, string query, params string[] extraArgs) + { + using var stdout = new MemoryStream(); + using var stderr = new StringWriter(); + var port = Environment.GetEnvironmentVariable("CLICKHOUSE_PORT_TCP") is { Length: > 0 } p ? p : "9000"; + var code = await Program.RunAsync(["--host", Host, "--port", port, "--query", query, .. extraArgs], Stream.Null, stdout, stderr, protocol); + return (Encoding.UTF8.GetString(stdout.ToArray()), stderr.ToString(), code); + } +} diff --git a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/OptionsTests.cs b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/OptionsTests.cs new file mode 100644 index 000000000..a4d0fb32f --- /dev/null +++ b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/OptionsTests.cs @@ -0,0 +1,150 @@ +using NUnit.Framework; + +namespace ClickHouse.Driver.TestRunner.Tests; + +// Ported from args_test.go of the clickhouse-go harness. +public class OptionsTests +{ + [Test] + public void Parse_SqlTestCommandLine_KeepsTheServerSettingsOnly() + { + // The command line that tests/clickhouse-test uses for a .sql test. + var opts = Options.Parse( + [ + "client", "--host=127.0.0.1", "--port=9000", "--no-secure", "--database=test_abc", + "--send_logs_level=warning", "--multiquery", "--log_comment", "00001_select_1.sql-test_abc", + "--max_block_size=1", "--allow_repeated_settings", "--client_logs_file=/tmp/x-fatal", + "--param_CLICKHOUSE_DATABASE=test_abc", + ]); + Assert.That(opts.Host, Is.EqualTo("127.0.0.1")); + Assert.That(opts.Port, Is.EqualTo(9000)); + Assert.That(opts.Database, Is.EqualTo("test_abc")); + Assert.That(opts.Secure, Is.False); + Assert.That(opts.Query, Is.Null); + Assert.That(opts.Settings, Is.EqualTo(new[] + { + new KeyValuePair("send_logs_level", "warning"), + new KeyValuePair("log_comment", "00001_select_1.sql-test_abc"), + })); + Assert.That(opts.Params, Is.EqualTo(new Dictionary { ["CLICKHOUSE_DATABASE"] = "test_abc" })); + } + + [Test] + public void Parse_FeatureTagOverrides_GoToTheServer() + { + // tests/clickhouse-test adds these for the tags no-async-insert and no-parallel-replicas. + var opts = Options.Parse( + [ + "--log_comment", "x.sql-test_abc", "--async_insert", "0", "--enable_parallel_replicas", "0", + "--async_insert_busy_timeout_ms=5", "--parallel_replicas_for_non_replicated_merge_tree=1", + ]); + Assert.That(opts.Settings, Is.EqualTo(new[] + { + new KeyValuePair("log_comment", "x.sql-test_abc"), + new KeyValuePair("async_insert", "0"), + new KeyValuePair("enable_parallel_replicas", "0"), + })); + // The randomized parallel-replica mode turns the feature on with other settings that the shim drops. + var random = Options.Parse(["--enable_parallel_replicas=1", "--automatic_parallel_replicas_mode=2", "--async_insert", "1"]); + Assert.That(random.Settings, Is.Empty); + } + + [Test] + public void Parse_ShortOptions_SetTheirValues() + { + var opts = Options.Parse(["-h", "db", "-u", "me", "-d", "x", "-q", "SELECT 1", "-n", "-s"]); + Assert.That(opts.Host, Is.EqualTo("db")); + Assert.That(opts.User, Is.EqualTo("me")); + Assert.That(opts.Database, Is.EqualTo("x")); + Assert.That(opts.Query, Is.EqualTo("SELECT 1")); + Assert.That(opts.Secure, Is.True); + } + + [Test] + public void Parse_SettingWithNegativeValue_TakesTheValue() + { + var opts = Options.Parse(["--max_threads", "-1", "--max-insert-threads", "2", "--query=SELECT 1"]); + Assert.That(opts.Settings, Is.EqualTo(new[] + { + new KeyValuePair("max_threads", "-1"), + new KeyValuePair("max_insert_threads", "2"), + })); + } + + [Test] + public void Parse_BadValues_Throw() + { + Assert.Throws(() => Options.Parse(["--port=abc"])); + Assert.Throws(() => Options.Parse(["--query"])); + } + + [Test] + [NonParallelizable] + public void HttpPort_NativePort_MapsToTheHttpPort() + { + var tcp = Environment.GetEnvironmentVariable("CLICKHOUSE_PORT_TCP"); + var http = Environment.GetEnvironmentVariable("CLICKHOUSE_PORT_HTTP"); + try + { + Environment.SetEnvironmentVariable("CLICKHOUSE_PORT_TCP", null); + Environment.SetEnvironmentVariable("CLICKHOUSE_PORT_HTTP", null); + Assert.That(HttpBackend.HttpPort(0, false), Is.EqualTo(8123)); + Assert.That(HttpBackend.HttpPort(9000, false), Is.EqualTo(8123)); + Assert.That(HttpBackend.HttpPort(18123, false), Is.EqualTo(18123)); + Assert.That(HttpBackend.HttpPort(9440, true), Is.EqualTo(8443)); + Environment.SetEnvironmentVariable("CLICKHOUSE_PORT_TCP", "19000"); + Environment.SetEnvironmentVariable("CLICKHOUSE_PORT_HTTP", "18124"); + Assert.That(HttpBackend.HttpPort(19000, false), Is.EqualTo(18124)); + Assert.That(HttpBackend.HttpPort(9000, false), Is.EqualTo(9000)); + } + finally + { + Environment.SetEnvironmentVariable("CLICKHOUSE_PORT_TCP", tcp); + Environment.SetEnvironmentVariable("CLICKHOUSE_PORT_HTTP", http); + } + } + + [Test] + public async Task RunAsync_ExtractFromConfig_AnswersListenHostOnly() + { + using var output = new MemoryStream(); + Assert.That(await Program.RunAsync(["extract-from-config", "--try", "--config", "x.xml", "--key", "listen_host"], Stream.Null, output, TextWriter.Null), Is.Zero); + Assert.That(System.Text.Encoding.UTF8.GetString(output.ToArray()), Is.EqualTo("127.0.0.1\n")); + output.SetLength(0); + Assert.That(await Program.RunAsync(["extract-from-config", "--key=tcp_port"], Stream.Null, output, TextWriter.Null), Is.Zero); + Assert.That(output.Length, Is.Zero); + } + + [TestCase("USE db1;", "db1")] + [TestCase("use `my db`", "my db")] + [TestCase("-- c\nUSE DATABASE db2", "db2")] + [TestCase("USE {CLICKHOUSE_DATABASE:Identifier};", "test_x")] + [TestCase("USE \"db3\"", "db3")] + [TestCase("USE db1, db2", null)] + public void ParseUseDatabase_Statement_GivesTheDatabase(string sql, string? expected) => + Assert.That(Runner.ParseUseDatabase(sql, new Dictionary { ["CLICKHOUSE_DATABASE"] = "test_x" }), Is.EqualTo(expected)); + + [TestCase("SET max_threads = 1", true)] + [TestCase("SET default_format = 'TSV'", true)] + [TestCase("SET ROLE r1", true)] + [TestCase("SET ROLE DEFAULT", true)] + [TestCase("SET DEFAULT ROLE r1 TO u1;", false)] + [TestCase("-- c\nset default role NONE to u1", false)] + public void IsSessionSet_Statement_TellsIfTheSessionHoldsIt(string sql, bool expected) => + Assert.That(Runner.IsSessionSet(sql), Is.EqualTo(expected)); + + [Test] + public void ParseSetAssignments_Statement_GivesTheSettings() => + Assert.That(Runner.ParseSetAssignments("SET dialect = 'kusto', max_threads=1, x = (1, 2);"), Is.EqualTo(new Dictionary + { + ["dialect"] = "kusto", + ["max_threads"] = "1", + ["x"] = "(1, 2)", + })); + + [Test] + public void RedactPassword_Argv_HidesThePasswordOnly() => + Assert.That( + InvocationLog.RedactPassword(["--user", "u", "--password", "secret", "--password=secret2", "--query", "SELECT 1", "--password"]), + Is.EqualTo(new[] { "--user", "u", "--password", "***", "--password=***", "--query", "SELECT 1", "--password" })); +} diff --git a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/OutputSettingsTests.cs b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/OutputSettingsTests.cs new file mode 100644 index 000000000..f285524c2 --- /dev/null +++ b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/OutputSettingsTests.cs @@ -0,0 +1,120 @@ +using NUnit.Framework; + +namespace ClickHouse.Driver.TestRunner.Tests; + +// The settings that change the server's text output, and the HTTP session time zone. The expected text is what +// ClickHouse 26.10 writes for FORMAT TSV with the same settings. +public class OutputSettingsTests +{ + private static readonly TimeZoneInfo Utc = TimeZoneInfo.Utc; + + [TestCase("SELECT 1 SETTINGS a = 1", "a = 1")] + [TestCase("SELECT 1 SETTINGS a = 1, b = 'x' FORMAT TSV;", "a = 1, b = 'x'")] + [TestCase("SELECT 1 FORMAT TSV SETTINGS a = 1;", "a = 1")] + [TestCase("SELECT * FROM (SELECT 1 SETTINGS a = 1)", null)] + [TestCase("SELECT 'SETTINGS a = 1' -- SETTINGS b = 1", null)] + [TestCase("SELECT t.settings FROM t", null)] + [TestCase("SELECT 1", null)] + public void TrailingSettingsClause_Query_FindsTheClauseOfTheQuery(string sql, string? expected) => + Assert.That(Statements.TrailingSettingsClause(sql), Is.EqualTo(expected)); + + [Test] + public void From_Values_ReadsEachSetting() + { + var s = OutputSettings.From(new Dictionary + { + ["date_time_output_format"] = "unix_timestamp", + ["format_tsv_null_representation"] = "a\\tb", + ["output_format_decimal_trailing_zeros"] = "1", + ["date_time_64_output_format_cut_trailing_zeros_align_to_groups_of_thousands"] = "true", + }); + Assert.That(s, Is.EqualTo(new OutputSettings(DateTimeOutputFormat.UnixTimestamp, "a\tb", true, true))); + Assert.That(OutputSettings.From(new Dictionary { ["date_time_output_format"] = "ISO" }).DateTimeFormat, Is.EqualTo(DateTimeOutputFormat.Iso)); + Assert.That(OutputSettings.From(new Dictionary()), Is.EqualTo(OutputSettings.Default)); + Assert.Throws(() => OutputSettings.From(new Dictionary { ["date_time_output_format"] = "x" })); + } + + private static readonly object[] DateTimeCases = + [ + // TCP raw counts. + new object[] { "DateTime('Europe/Moscow')", 1602709200u, "iso", "2020-10-14T21:00:00Z" }, + new object[] { "DateTime('Europe/Moscow')", 1602709200u, "unix_timestamp", "1602709200" }, + new object[] { "DateTime64(2, 'Europe/Moscow')", 160270920012L, "iso", "2020-10-14T21:00:00.12Z" }, + new object[] { "DateTime64(2, 'Europe/Moscow')", 160270920012L, "unix_timestamp", "1602709200.12" }, + new object[] { "DateTime64(1, 'UTC')", -3156191995L, "unix_timestamp", "-315619199.5" }, + new object[] { "DateTime64(1, 'UTC')", -3156191995L, "iso", "1960-01-01T00:00:00.5Z" }, + // HTTP calendar values. + new object[] { "DateTime('Europe/Moscow')", new DateTime(2020, 10, 15, 0, 0, 0, DateTimeKind.Unspecified), "iso", "2020-10-14T21:00:00Z" }, + new object[] { "DateTime64(2, 'Europe/Moscow')", new DateTime(2020, 10, 15, 0, 0, 0, DateTimeKind.Unspecified).AddMilliseconds(120), "unix_timestamp", "1602709200.12" }, + new object[] { "DateTime('UTC')", new DateTime(2020, 10, 15, 0, 0, 0, DateTimeKind.Utc), "iso", "2020-10-15T00:00:00Z" }, + new object[] { "DateTime64(1)", new DateTime(1960, 1, 1, 0, 0, 0, DateTimeKind.Unspecified).AddMilliseconds(500), "unix_timestamp", "-315619199.5" }, + ]; + + [TestCaseSource(nameof(DateTimeCases))] + public void Render_DateTimeOutputFormat_WritesTheServerText(string type, object value, string format, string expected) + { + var renderer = value is DateTime ? new ValueRenderer() : new ValueRenderer(() => Utc); + renderer.Output = OutputSettings.From(new Dictionary { ["date_time_output_format"] = format }); + Assert.That(Render(renderer, type, value, false), Is.EqualTo(expected)); + Assert.That(Render(renderer, "Date", new DateOnly(2020, 1, 1), false), Is.EqualTo("2020-01-01")); + } + + [TestCase(1704067200100000L, 6, "2024-01-01 00:00:00.100")] + [TestCase(1704067200123400L, 6, "2024-01-01 00:00:00.123400")] + [TestCase(1704067200000000L, 6, "2024-01-01 00:00:00")] + [TestCase(17040672001L, 1, "2024-01-01 00:00:00.100")] + [TestCase(170406720012340L, 5, "2024-01-01 00:00:00.123400")] + [TestCase(1704067200123456700L, 9, "2024-01-01 00:00:00.123456700")] + public void Render_CutDateTime64TrailingZeros_AlignsToGroupsOfThree(long count, int precision, string expected) + { + var renderer = new ValueRenderer(() => Utc) { Output = OutputSettings.Default with { CutDateTime64TrailingZeros = true } }; + Assert.That(Render(renderer, $"DateTime64({precision}, 'UTC')", count, false), Is.EqualTo(expected)); + Assert.That(Render(renderer, "DateTime('UTC')", 1704067200u, false), Is.EqualTo("2024-01-01 00:00:00")); + } + + [Test] + public void Render_NullRepresentation_IsTheTopLevelNullOnly() + { + var renderer = new ValueRenderer { Output = OutputSettings.Default with { NullText = "XYZ" } }; + Assert.That(Render(renderer, "Nullable(String)", null, false), Is.EqualTo("XYZ")); + Assert.That(Render(renderer, "Array(Nullable(String))", new string?[] { null }, false), Is.EqualTo("[NULL]")); + Assert.That(Render(new ValueRenderer(), "Nullable(String)", null, false), Is.EqualTo("\\N")); + } + + [TestCase("Decimal(9, 4)", "1.5", "1.5000")] + [TestCase("Decimal32(2)", "0", "0.00")] + [TestCase("Decimal(9, 2)", "-1.1", "-1.10")] + [TestCase("Decimal(18, 3)", "100", "100.000")] + [TestCase("Decimal(9, 0)", "7", "7")] + public void Render_DecimalTrailingZeros_WritesTheScale(string type, string value, string expected) + { + var renderer = new ValueRenderer { Output = OutputSettings.Default with { DecimalTrailingZeros = true } }; + var d = decimal.Parse(value, System.Globalization.CultureInfo.InvariantCulture); + Assert.That(Render(renderer, type, d, false), Is.EqualTo(expected)); + Assert.That(Render(new ValueRenderer(), type, d, false), Is.EqualTo(value)); + } + + [Test] + public void Render_HttpDateTimeWithoutZone_TakesTheServerTimezone() + { + // The HTTP client gives the UTC wall clock of a DateTime without a zone in its type. + var renderer = new ValueRenderer { HttpServerTimezone = "Asia/Tokyo" }; + var utcWallClock = new DateTime(2019, 12, 31, 15, 0, 0, DateTimeKind.Unspecified); + Assert.That(Render(renderer, "DateTime", utcWallClock, false), Is.EqualTo("2020-01-01 00:00:00")); + Assert.That(Render(renderer, "DateTime64(1)", utcWallClock.AddMilliseconds(500), false), Is.EqualTo("2020-01-01 00:00:00.5")); + // America/New_York before 1883: local mean time, -4:56:02. + renderer.HttpServerTimezone = "America/New_York"; + Assert.That(Render(renderer, "DateTime64(0)", new DateTime(1789, 7, 14, 4, 56, 2, DateTimeKind.Unspecified), false), Is.EqualTo("1789-07-14 00:00:00")); + // A zone in the type: the client already gives its wall clock. + Assert.That(Render(renderer, "DateTime('Asia/Tokyo')", new DateTime(2020, 1, 1, 0, 0, 0, DateTimeKind.Unspecified), false), Is.EqualTo("2020-01-01 00:00:00")); + renderer.HttpServerTimezone = "UTC"; + Assert.That(Render(renderer, "DateTime", utcWallClock, false), Is.EqualTo("2019-12-31 15:00:00")); + } + + private static string Render(ValueRenderer renderer, string type, object? value, bool nested) + { + var b = new Utf8Buffer(); + renderer.Render(b, ChType.Parse(type), value, nested); + return b.ToString(); + } +} diff --git a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/RenderTests.cs b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/RenderTests.cs new file mode 100644 index 000000000..ea4c22f05 --- /dev/null +++ b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/RenderTests.cs @@ -0,0 +1,394 @@ +using System.Net; +using System.Numerics; +using NUnit.Framework; + +namespace ClickHouse.Driver.TestRunner.Tests; + +// Ported from render_test.go of the clickhouse-go harness, with the .NET values of both clients. +public class RenderTests +{ + // The expected text is what ClickHouse 26.10 writes for FORMAT TSV. + private static readonly object[] DoubleCases = + [ + new object[] { 1e15, "1000000000000000" }, + new object[] { 1e20, "100000000000000000000" }, + new object[] { 1e21, "1e21" }, + new object[] { 1.2345e21, "1.2345e21" }, + new object[] { 1.2345e20, "123450000000000000000" }, + new object[] { 0.0001, "0.0001" }, + new object[] { 1e-6, "0.000001" }, + new object[] { 1.5e-6, "0.0000015" }, + new object[] { 1e-7, "1e-7" }, + new object[] { 1.5e-7, "1.5e-7" }, + new object[] { 1.5e300, "1.5e300" }, + new object[] { 0.30000000000000004, "0.30000000000000004" }, + new object[] { 5e-324, "5e-324" }, + new object[] { -12345678.9, "-12345678.9" }, + new object[] { 100.0, "100" }, + new object[] { double.NaN, "nan" }, + new object[] { double.PositiveInfinity, "inf" }, + new object[] { double.NegativeInfinity, "-inf" }, + new object[] { -0.0, "-0" }, + new object[] { 0.0, "0" }, + ]; + + [TestCaseSource(nameof(DoubleCases))] + public void FormatFloat_Double_WritesTheServerText(double value, string expected) => + Assert.That(ValueRenderer.FormatFloat(value), Is.EqualTo(expected)); + + [TestCase(0.1f, "0.1")] + [TestCase(3.4028235e38f, "3.4028235e38")] + [TestCase(16777216f, "16777216")] + public void FormatFloat_Single_WritesTheShortestFloat32Text(float value, string expected) => + Assert.That(ValueRenderer.FormatFloat(value), Is.EqualTo(expected)); + + [TestCase("::ffff:1.2.3.4", "::ffff:1.2.3.4")] + [TestCase("::1.2.3.4", "::1.2.3.4")] + [TestCase("::", "::")] + [TestCase("::1", "::1")] + [TestCase("2001:db8::1", "2001:db8::1")] + [TestCase("1::", "1::")] + [TestCase("2001:db8:0:1::1", "2001:db8:0:1::1")] + [TestCase("1:0:0:2:0:0:0:3", "1:0:0:2::3")] + [TestCase("1:2:3:4:5:6:7:8", "1:2:3:4:5:6:7:8")] + public void FormatIPv6_Address_FollowsFormatIPv6OfTheServer(string input, string expected) => + Assert.That(ValueRenderer.FormatIPv6(IPAddress.Parse(input).GetAddressBytes()), Is.EqualTo(expected)); + + [TestCase("UInt8")] + [TestCase("Nullable(String)")] + [TestCase("Array(Nullable(DateTime64(3, 'UTC')))")] + [TestCase("Map(String, Array(Tuple(UInt8, String)))")] + [TestCase("Tuple(a Int32, b String)")] + [TestCase("Enum8('a' = 1, 'b,c' = 2)")] + [TestCase("Decimal(9, 2)")] + [TestCase("LowCardinality(Nullable(String))")] + [TestCase("SimpleAggregateFunction(sum, UInt64)")] + [TestCase("AggregateFunction(quantiles(0.5, 0.9), UInt64)")] + public void ParseChType_TypeName_RoundTrips(string input) => + Assert.That(ChType.Parse(input).ToString(), Is.EqualTo(input)); + + [Test] + public void ParseChType_QuotedElementName_IsTheName() + { + var t = ChType.Parse("Tuple(`a b` Int32, c Array(String))"); + Assert.That(t.Args, Has.Count.EqualTo(2)); + Assert.That(t.Args[0].Name, Is.EqualTo("a b")); + Assert.That(t.Args[1].Name, Is.EqualTo("c")); + Assert.That(t.Args[1].Type!.Base, Is.EqualTo("Array")); + Assert.Throws(() => ChType.Parse("Array(String")); + } + + private static readonly object?[] ValueCases = + [ + new object?[] { "String", "a\tb\\c\nd'e\0\b\f\x01", "a\\tb\\\\c\\nd\\'e\\0\\b\\f\x01" }, + new object?[] { "Nullable(String)", null, "\\N" }, + new object?[] { "Nullable(String)", DBNull.Value, "\\N" }, + new object?[] { "Nullable(String)", "x", "x" }, + new object?[] { "FixedString(3)", new byte[] { 0x61, 0, 0xff }, "a\\0\xff" }, + new object?[] { "Array(Nullable(String))", new[] { "a'b", null }, "['a\\'b',NULL]" }, + new object?[] { "Tuple(UInt8, String, Nullable(UInt8))", Tuple.Create(1, "x", null), "(1,'x',NULL)" }, + new object?[] { "Tuple(a UInt8, b String)", ((byte)1, "x"), "(1,'x')" }, + new object?[] { "Tuple()", ValueTuple.Create(), "()" }, + new object?[] { "Map(String, UInt8)", new List> { new("k", 1), new("a", 2) }, "{'k':1,'a':2}" }, + new object?[] { "Map(String, UInt8)", new[] { new KeyValuePair("k", 1) }, "{'k':1}" }, + new object?[] { "Int128", new BigInteger(-5), "-5" }, + new object?[] { "Int128", (Int128)(-5), "-5" }, + new object?[] { "Decimal(9, 2)", 1.50m, "1.5" }, + new object?[] { "Decimal(9, 2)", 0.00m, "0" }, + new object?[] { "Decimal(18, 5)", -0.00100m, "-0.001" }, + new object?[] { "Decimal(9, 0)", 100m, "100" }, + new object?[] { "DateTime64(3)", new DateTime(2020, 1, 1, 0, 0, 0, 120), "2020-01-01 00:00:00.120" }, + new object?[] { "DateTime64(3, 'UTC')", 1577836800120L, "2020-01-01 00:00:00.120" }, + new object?[] { "DateTime64(1, 'UTC')", -1L, "1969-12-31 23:59:59.9" }, + // TCP counts outside the .NET date range: the server's text (year 0000; a year outside [0000, 9999] + // clamps to the end of the range, the fraction stays). + new object?[] { "DateTime64(6, 'UTC')", -62161776000000000L, "0000-03-04 00:00:00.000000" }, + new object?[] { "DateTime64(3, 'UTC')", long.MinValue, "0000-01-01 00:00:00.192" }, + new object?[] { "DateTime64(3, 'UTC')", -62167219200001L, "0000-01-01 00:00:00.999" }, + new object?[] { "DateTime64(3, 'UTC')", 9223372036854775616L, "9999-12-31 23:59:59.616" }, + new object?[] { "DateTime64(7, 'Asia/Istanbul')", 9223372036854775806L, "9999-12-31 23:59:59.4775806" }, + new object?[] { "DateTime64(8, 'Asia/Istanbul')", 9223372036854775806L, "4892-10-08 00:52:48.54775806" }, + new object?[] { "DateTime('Asia/Tokyo')", 1577836800u, "2020-01-01 09:00:00" }, + new object?[] { "DateTime", new DateTime(2020, 1, 1, 9, 0, 0), "2020-01-01 09:00:00" }, + new object?[] { "Array(Date)", new[] { new DateOnly(2020, 1, 2) }, "['2020-01-02']" }, + new object?[] { "Date", new DateTime(2020, 1, 2, 0, 0, 0, DateTimeKind.Utc), "2020-01-02" }, + new object?[] { "Time", -(new TimeSpan(1, 2, 3)), "-01:02:03" }, + new object?[] { "Time", -3723, "-01:02:03" }, + new object?[] { "Time64(3)", new TimeSpan(100, 0, 0) + TimeSpan.FromMilliseconds(500), "100:00:00.500" }, + new object?[] { "Time64(7)", 11234567L, "00:00:01.1234567" }, + // The server writes a value above 999:59:59 as 999:59:59. + new object?[] { "Time64(2)", TimeSpan.FromHours(2160) + TimeSpan.FromSeconds(12), "999:59:59.00" }, + new object?[] { "Time", -7200000, "-999:59:59" }, + new object?[] { "UUID", Guid.Parse("61f0c404-5cb3-11e7-907b-a6006ad3dba0"), "61f0c404-5cb3-11e7-907b-a6006ad3dba0" }, + new object?[] { "IPv4", IPAddress.Parse("1.2.3.4"), "1.2.3.4" }, + new object?[] { "Array(IPv6)", new[] { IPAddress.Parse("::ffff:1.2.3.4") }, "['::ffff:1.2.3.4']" }, + new object?[] { "Bool", true, "true" }, + new object?[] { "Array(Float64)", new[] { double.NaN, double.PositiveInfinity }, "[nan,inf]" }, + new object?[] { "IntervalDay", 3L, "3" }, + new object?[] { "LowCardinality(String)", "a", "a" }, + new object?[] { "SimpleAggregateFunction(sum, UInt64)", 7UL, "7" }, + new object?[] { "Enum8('a' = 1, 'b' = 2)", "b", "b" }, + new object?[] { "Enum8('a' = 1, 'b' = 2)", (sbyte)2, "b" }, + new object?[] { "Array(Enum16('it''s' = -1))", new short[] { -1 }, "['it\\'s']" }, + new object?[] { "Point", (1.5, 2.5), "(1.5,2.5)" }, + new object?[] { "Ring", new[] { Tuple.Create(1.0, 2.0) }, "[(1,2)]" }, + new object?[] { "SimpleAggregateFunction(anyLast, JSON)", "{\"a\":1}", "{\"a\":1}" }, + // HTTP Variant: the .NET value tells the alternative. + new object?[] { "Variant(String, UInt64)", "a\tb", "a\\tb" }, + new object?[] { "Variant(String, UInt64)", 7UL, "7" }, + new object?[] { "Variant(String, UInt64)", DBNull.Value, "\\N" }, + new object?[] { "Variant(Array(UInt64), String)", new ulong[] { 1, 2 }, "[1,2]" }, + new object?[] { "Variant(Array(UInt8), String)", new byte[] { 1, 2 }, "[1,2]" }, + new object?[] { "Array(Variant(String, UInt8))", new object[] { "a", (byte)1, DBNull.Value }, "['a',1,NULL]" }, + new object?[] { "Variant(Enum8('a' = 1), String)", "a", "a" }, + new object?[] { "Variant(Map(String, UInt8), Array(UInt8))", new List>(), "{}" }, + new object?[] { "Variant(Map(String, UInt8), Array(UInt8))", Array.Empty(), "[]" }, + new object?[] { "Variant(Date, DateTime64(3))", DBNull.Value, "\\N" }, + new object?[] { "Variant(Tuple(UInt8, String), Tuple(String))", Tuple.Create((byte)1, "x"), "(1,'x')" }, + new object?[] { "Geometry", Tuple.Create(1.5, 2.0), "(1.5,2)" }, + new object?[] { "Geometry", new[] { Tuple.Create(1.0, 2.0), Tuple.Create(3.0, 4.0) }, "[(1,2),(3,4)]" }, + new object?[] { "Geometry", new[] { new[] { Tuple.Create(1.0, 2.0) } }, "[[(1,2)]]" }, + new object?[] { "Geometry", new[] { new[] { new[] { Tuple.Create(1.0, 2.0) } } }, "[[[(1,2)]]]" }, + new object?[] { "Geometry", Array.Empty>(), "[]" }, + // HTTP Dynamic: the .NET type gives the text. + new object?[] { "Dynamic", 1L, "1" }, + new object?[] { "Dynamic", (byte)255, "255" }, + new object?[] { "Dynamic", "it's", "it\\'s" }, + new object?[] { "Dynamic", DBNull.Value, "\\N" }, + new object?[] { "Dynamic", 1.5, "1.5" }, + new object?[] { "Dynamic", 0.1f, "0.1" }, + new object?[] { "Dynamic", true, "true" }, + new object?[] { "Dynamic", 1.50m, "1.5" }, + new object?[] { "Dynamic", IPAddress.Parse("1.2.3.4"), "1.2.3.4" }, + new object?[] { "Dynamic", IPAddress.Parse("::ffff:1.2.3.4"), "::ffff:1.2.3.4" }, + new object?[] { "Dynamic", new long[] { 1, 2 }, "[1,2]" }, + new object?[] { "Dynamic", new string?[] { "a", null }, "['a',NULL]" }, + new object?[] { "Dynamic", Tuple.Create(1L, "x"), "(1,'x')" }, + new object?[] { "Dynamic", new List> { new("b", 1), new("a", 2) }, "{'b':1,'a':2}" }, + new object?[] { "Array(Dynamic)", new object[] { 1L, "a", DBNull.Value }, "[1,'a',NULL]" }, + ]; + + // Values that the shim cannot write: the text depends on a type that the client does not give. + private static readonly object?[][] UnknownTextCases = + [ + new object?[] { "Variant(Date, DateTime)", new DateTime(2020, 1, 1) }, + new object?[] { "Variant(JSON, String)", new System.Text.Json.Nodes.JsonObject() }, + new object?[] { "Variant(AggregateFunction(sum, UInt64), String)", "a" }, + new object?[] { "Dynamic", new DateTime(2020, 1, 1) }, + new object?[] { "Dynamic", TimeSpan.FromSeconds(1) }, + new object?[] { "Dynamic", new System.Text.Json.Nodes.JsonObject() }, + new object?[] { "Dynamic", new[] { new DateTime(2020, 1, 1) } }, + new object?[] { "Json", new System.Text.Json.Nodes.JsonObject() }, + ]; + + [TestCaseSource(nameof(UnknownTextCases))] + public void Render_ValueWithoutItsType_IsUnsupported(string type, object? value) + { + var b = new Utf8Buffer(); + Assert.Throws(() => new ValueRenderer().Render(b, ChType.Parse(type), value, false)); + } + + [Test] + public void Render_MapAndArrayForms_AreNotMixedUp() + { + // An empty array is no map, and empty key-value pairs are no array. + var b = new Utf8Buffer(); + Assert.Throws(() => new ValueRenderer().Render(b, ChType.Parse("Map(String, UInt8)"), Array.Empty(), false)); + Assert.Throws(() => new ValueRenderer().Render(b, ChType.Parse("Array(UInt8)"), new List>(), false)); + Assert.Throws(() => new ValueRenderer().Render(b, ChType.Parse("Variant(String, UInt64)"), 1.5, false)); + } + + [TestCaseSource(nameof(ValueCases))] + public void Render_Value_WritesTheServerText(string type, object? value, string expected) + { + var b = new Utf8Buffer(); + new ValueRenderer().Render(b, ChType.Parse(type), value, false); + Assert.That(b.Span.ToArray(), Is.EqualTo(Bytes(expected))); + } + + [Test] + public void Render_DictionaryWithTwoEntries_IsUnsupported() + { + // A Dictionary has no defined order. + var b = new Utf8Buffer(); + Assert.Throws(() => new ValueRenderer().Render(b, ChType.Parse("Map(String, UInt8)"), new Dictionary { ["a"] = 1, ["b"] = 2 }, false)); + Assert.Throws(() => new ValueRenderer().Render(b, ChType.Parse("AggregateFunction(sum, UInt64)"), 1, false)); + } + + [Test] + public void Render_WrongDotNetType_FailsTheStatement() + { + var b = new Utf8Buffer(); + Assert.Throws(() => new ValueRenderer().Render(b, ChType.Parse("UInt8"), "x", false)); + // HTTP without ReadStringsAsByteArrays: a String is a string, and a byte[] is an Array(UInt8). + Assert.Throws(() => new ValueRenderer().Render(b, ChType.Parse("String"), new byte[] { 0x61 }, false)); + } + + // The HTTP client of the shim gives a String as string; a byte[] is an Array(UInt8), also in a Variant or a + // Dynamic value (a String that is not UTF-8 is not readable without ReadStringsAsByteArrays, and with it a + // String and an Array(UInt8) in a Dynamic value are both byte[]). + [TestCase("Dynamic", "[97]")] + [TestCase("Array(Dynamic)", "[[97]]")] + public void Render_HttpByteArray_IsAnArrayOfUInt8(string type, string expected) + { + var value = type.StartsWith("Array", StringComparison.Ordinal) ? new object[] { new byte[] { 0x61 } } : (object)new byte[] { 0x61 }; + var b = new Utf8Buffer(); + new ValueRenderer().Render(b, ChType.Parse(type), value, false); + Assert.That(b.ToString(), Is.EqualTo(expected)); + } + + [Test] + public void TryRenderRaw_StringValue_WritesTheBytesWithoutEscapes() + { + // A FixedString of the TCP client is byte[]; a String without its column is the string of the client. + var renderer = new ValueRenderer(() => TimeZoneInfo.Utc); + var b = new Utf8Buffer(); + Assert.That(renderer.TryRenderRaw(b, ChType.Parse("LowCardinality(Nullable(FixedString(3)))"), new byte[] { 0xff, 0x09, 0x5c }, null, -1), Is.True); + Assert.That(renderer.TryRenderRaw(b, ChType.Parse("Nullable(String)"), "a\tb", null, -1), Is.True); + Assert.That(b.Span.ToArray(), Is.EqualTo(new byte[] { 0xff, 0x09, 0x5c, 0x61, 0x09, 0x62 })); + // The TCP client gives an enum as its ordinal; without its column, the label is from the type. + b.Clear(); + Assert.That(renderer.TryRenderRaw(b, ChType.Parse("Enum8('a\tb' = 1)"), (sbyte)1, null, -1), Is.True); + Assert.That(renderer.TryRenderRaw(b, ChType.Parse("SimpleAggregateFunction(any, String)"), "\\", null, -1), Is.True); + Assert.That(b.ToString(), Is.EqualTo("a\tb\\")); + Assert.That(renderer.TryRenderRaw(b, ChType.Parse("String"), 1, null, -1), Is.False); + } + + [Test] + public void Render_TcpStringColumn_WritesTheBytesOfTheRow() + { + // Rows: FF 41, 41. + var column = new StubStringColumn([0xff, 0x41, 0x41], [0, 2, 3]); + var renderer = new ValueRenderer(() => TimeZoneInfo.Utc); + var b = new Utf8Buffer(); + renderer.Render(b, ChType.Parse("String"), "\uFFFDA", false, column, 0); + b.Append((byte)'|'); + renderer.Render(b, ChType.Parse("Array(String)"), new[] { "\uFFFDA" }, false, null, -1); + Assert.That(b.Span.ToArray(), Is.EqualTo(new byte[] { 0xff, 0x41, (byte)'|', (byte)'[', (byte)'\'', 0xef, 0xbf, 0xbd, 0x41, (byte)'\'', (byte)']' })); + // The value must be the UTF-8 decoding of the bytes of its row: else the row is wrong. + Assert.Throws(() => renderer.Render(b, ChType.Parse("String"), "\uFFFDA", false, column, 1)); + Assert.Throws(() => renderer.Render(b, ChType.Parse("String"), "\uFFFDA", false, column, 2)); + } + + // A String column of the TCP client: the rows are slices of Bytes. + private sealed class StubStringColumn(byte[] bytes, int[] offsets) : ClickHouse.Driver.Tcp.IStringColumn + { + public string Name => "s"; + + public string TypeName => "String"; + + public int RowCount => offsets.Length - 1; + + public ReadOnlySpan Bytes => bytes; + + public ReadOnlySpan Offsets => offsets; + + public ReadOnlySpan Values => Enumerable.Range(0, RowCount).Select(i => this[i]).ToArray(); + + public string this[int row] => GetString(row, System.Text.Encoding.UTF8); + + public ReadOnlySpan GetBytes(int row) => row < 0 || row >= RowCount ? throw new IndexOutOfRangeException() : bytes.AsSpan(offsets[row], offsets[row + 1] - offsets[row]); + + public string GetString(int row, System.Text.Encoding encoding) => encoding.GetString(GetBytes(row)); + + public object GetValue(int row) => this[row]; + + public void Dispose() + { + } + } + + // The expected text of the cases: characters below 0x100 are the bytes (so "\xff" is the byte 0xff). + private static byte[] Bytes(string s) => s.Any(c => c > 0x7f && c < 0x100) + ? s.Select(c => (byte)c).ToArray() + : System.Text.Encoding.UTF8.GetBytes(s); + + private static readonly object[] FormatCases = + [ + new object[] { "SELECT 1", "SELECT 1", "TabSeparated", true }, + new object[] { "SELECT 1 FORMAT TSV", "SELECT 1 ", "TSV", true }, + new object[] { "SELECT 1 FORMAT TSVWithNames SETTINGS max_threads = 1", "SELECT 1 SETTINGS max_threads = 1", "TSVWithNames", true }, + new object[] { "SELECT 1 FORMAT JSONEachRow", "SELECT 1 ", "JSONEachRow", false }, + new object[] { "SELECT 'FORMAT JSON'", "SELECT 'FORMAT JSON'", "TabSeparated", true }, + new object[] { "SELECT * FROM (SELECT 1 FORMAT JSON)", "SELECT * FROM (SELECT 1 FORMAT JSON)", "TabSeparated", true }, + new object[] { "SELECT t.format FROM t", "SELECT t.format FROM t", "TabSeparated", true }, + new object[] { "SELECT 1 FORMAT null", "SELECT 1 ", "null", true }, + new object[] { "SELECT 1 FORMAT TSVRaw", "SELECT 1 ", "TSVRaw", true }, + new object[] { "SELECT 1 FORMAT `Null`;", "SELECT 1 ;", "Null", true }, + // FORMAT as an identifier, not the clause. + new object[] { "SELECT format FROM t", "SELECT format FROM t", "TabSeparated", true }, + new object[] { "SELECT x AS format FROM t WHERE format = 1", "SELECT x AS format FROM t WHERE format = 1", "TabSeparated", true }, + new object[] { "SELECT 1 AS format FROM numbers(1)", "SELECT 1 AS format FROM numbers(1)", "TabSeparated", true }, + new object[] { "SELECT format FROM (SELECT 1 AS format)", "SELECT format FROM (SELECT 1 AS format)", "TabSeparated", true }, + new object[] { "SELECT 1 AS format", "SELECT 1 AS format", "TabSeparated", true }, + new object[] { "SELECT 1 AS format ORDER BY format DESC", "SELECT 1 AS format ORDER BY format DESC", "TabSeparated", true }, + new object[] { "SELECT 1 AS format ORDER BY format ASC", "SELECT 1 AS format ORDER BY format ASC", "TabSeparated", true }, + new object[] { "SELECT 1 AS format ORDER BY format DESC FORMAT TSV", "SELECT 1 AS format ORDER BY format DESC ", "TSV", true }, + new object[] { "SELECT 1 FORMAT TSV -- c\n;", "SELECT 1 -- c\n;", "TSV", true }, + // FORMAT where an operand is expected: a table or a column `format` with an implicit alias. + new object[] { "SELECT * FROM format f", "SELECT * FROM format f", "TabSeparated", true }, + new object[] { "SELECT format TSV", "SELECT format TSV", "TabSeparated", true }, + new object[] { "SELECT 2 * format x", "SELECT 2 * format x", "TabSeparated", true }, + new object[] { "SELECT 1, format x", "SELECT 1, format x", "TabSeparated", true }, + new object[] { "SELECT x FROM t WHERE x = format y", "SELECT x FROM t WHERE x = format y", "TabSeparated", true }, + new object[] { "SELECT * FROM FORMAT FORMAT Values", "SELECT * FROM FORMAT ", "Values", false }, + // After an operand, FORMAT is the clause: a keyword in an operand position is a name, `*` there is the + // asterisk, and a comment, a parameter or a qualified name ends an operand. + new object[] { "SELECT number AS mod FORMAT TSV", "SELECT number AS mod ", "TSV", true }, + new object[] { "SELECT number FROM numbers(2) ORDER BY offset FORMAT TSV", "SELECT number FROM numbers(2) ORDER BY offset ", "TSV", true }, + new object[] { "SELECT * FORMAT TSV", "SELECT * ", "TSV", true }, + new object[] { "SELECT t.* FROM t FORMAT TSV", "SELECT t.* FROM t ", "TSV", true }, + new object[] { "SELECT 1 /* c */ FORMAT TSV", "SELECT 1 /* c */ ", "TSV", true }, + new object[] { "SELECT {p:String} FORMAT TSV", "SELECT {p:String} ", "TSV", true }, + new object[] { "SHOW CREATE TABLE db.table FORMAT Null", "SHOW CREATE TABLE db.table ", "Null", true }, + new object[] { "SELECT $$a FROM$$ FORMAT TSV", "SELECT $$a FROM$$ ", "TSV", true }, + new object[] { "SELECT 1 AS $alias$name$ FORMAT TSVWithNames", "SELECT 1 AS $alias$name$ ", "TSVWithNames", true }, + new object[] { "SELECT 1 AS имя FORMAT TSV", "SELECT 1 AS имя ", "TSV", true }, + new object[] { "SELECT count(*) FROM (SELECT number FROM numbers(2)) AS s FORMAT TSV", "SELECT count(*) FROM (SELECT number FROM numbers(2)) AS s ", "TSV", true }, + new object[] { "SELECT 1 WITH TOTALS FORMAT TSV", "SELECT 1 WITH TOTALS ", "TSV", true }, + ]; + + [TestCaseSource(nameof(FormatCases))] + public void SplitOutputFormat_Query_FindsTheFormatClause(string input, string sql, string format, bool supported) + { + var (q, f) = OutputFormat.Split(input); + Assert.That(q, Is.EqualTo(sql)); + Assert.That(f.Name, Is.EqualTo(format)); + Assert.That(f.Supported, Is.EqualTo(supported)); + } + + [TestCase("KILL MUTATION WHERE table = 't'", true)] + [TestCase("kill query where query_id = 'x' SYNC", true)] + [TestCase("SELECT 1", true)] + [TestCase("ALTER TABLE t DELETE WHERE 1", false)] + [TestCase("INSERT INTO t VALUES (1)", false)] + public void ReturnsRows_Statement_TellsIfItHasAResultSet(string sql, bool expected) => + Assert.That(OutputFormat.ReturnsRows(sql), Is.EqualTo(expected)); + + // ParserExplainQuery of ClickHouse: which query a trailing FORMAT belongs to. + [TestCase("EXPLAIN AST SHOW ROW POLICIES FORMAT TabSeparated;", true)] + [TestCase("explain ast SELECT 1 FORMAT TSV", true)] + [TestCase("EXPLAIN SYNTAX INSERT INTO t FROM INFILE 'f' SELECT x FROM input('x UInt32') FORMAT TSV;", true)] + [TestCase("EXPLAIN SYNTAX INSERT INTO t SELECT x FROM input('x UInt32') FORMAT TSV", true)] + [TestCase("EXPLAIN SYNTAX INSERT INTO t FORMAT TSV", true)] + [TestCase("EXPLAIN SYNTAX INSERT INTO t SELECT 1 FORMAT TSV", false)] + [TestCase("EXPLAIN AST INSERT INTO t (SELECT 1) SETTINGS max_threads = 1 FORMAT TSV;", false)] + [TestCase("EXPLAIN AST (INSERT INTO t SELECT 1) FORMAT TSV;", false)] + [TestCase("EXPLAIN AST (INSERT INTO t FROM INFILE 'f') FORMAT TSV;", false)] + [TestCase("EXPLAIN AST (CREATE TABLE t (x UInt8) ENGINE = Memory) FORMAT TSV;", false)] + [TestCase("EXPLAIN AST (EXPLAIN SYNTAX INSERT INTO t SELECT 1) FORMAT TSV;", false)] + [TestCase("EXPLAIN AST ( /* c */ SELECT 1) FORMAT TSV", true)] + [TestCase("EXPLAIN AST ((SELECT 1) SETTINGS max_threads = 1) FORMAT TSV;", false)] + [TestCase("EXPLAIN AST (with 1 AS x SELECT x) FORMAT TSV", true)] + [TestCase("EXPLAIN AST CREATE TABLE t (x UInt8) ENGINE = Memory FORMAT TSV", true)] + [TestCase("EXPLAIN SYNTAX SYSTEM CLEAR MARK CACHE FORMAT TSV;", false)] + [TestCase("EXPLAIN SYNTAX INSERT INTO t (SELECT 1) FORMAT TSV", false)] + [TestCase("EXPLAIN SYNTAX INSERT INTO t SELECT * FROM (SELECT * FROM input('x UInt32')) FORMAT TSV", true)] + [TestCase("EXPLAIN SYNTAX INSERT INTO t SELECT input FROM s FORMAT TSV", false)] + [TestCase("EXPLAIN PLAN header = 1 INSERT INTO t SELECT 1 FORMAT TSV", false)] + [TestCase("EXPLAIN SELECT 1 FORMAT TSV", false)] + [TestCase("EXPLAIN SYNTAX SELECT insert, input FROM t FORMAT TSV", false)] + [TestCase("SELECT 1 FORMAT TSV", false)] + public void ExplainedQueryOwnsFormat_Explain_FollowsTheServerParser(string sql, bool expected) => + Assert.That(OutputFormat.ExplainedQueryOwnsFormat(sql), Is.EqualTo(expected)); +} diff --git a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/StatementsTests.cs b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/StatementsTests.cs new file mode 100644 index 000000000..de6f9badf --- /dev/null +++ b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/StatementsTests.cs @@ -0,0 +1,149 @@ +using NUnit.Framework; + +namespace ClickHouse.Driver.TestRunner.Tests; + +// Ported from split_test.go of the clickhouse-go harness. +public class StatementsTests +{ + private static readonly object[] SplitCases = + [ + new object[] { "single without semicolon", "SELECT 1", new[] { "SELECT 1" } }, + new object[] { "several", "SELECT 1;\nSELECT 2;\n", new[] { "SELECT 1;", "SELECT 2;" } }, + new object[] { "semicolon in string", "SELECT 'a;b'; SELECT 2", new[] { "SELECT 'a;b';", "SELECT 2" } }, + new object[] { "escaped quote", "SELECT 'a\\';b'; SELECT 2", new[] { "SELECT 'a\\';b';", "SELECT 2" } }, + new object[] { "doubled quote", "SELECT 'a'';b'; SELECT 2", new[] { "SELECT 'a'';b';", "SELECT 2" } }, + new object[] { "semicolon in identifier", "SELECT 1 AS `a;b`; SELECT 2", new[] { "SELECT 1 AS `a;b`;", "SELECT 2" } }, + new object[] { "semicolon in line comment", "SELECT 1 -- a;b\n; SELECT 2", new[] { "SELECT 1 -- a;b\n;", "SELECT 2" } }, + new object[] { "semicolon in a // comment", "SELECT 1 // a;b\n; SELECT 2", new[] { "SELECT 1 // a;b\n;", "SELECT 2" } }, + new object[] { "same-line // comment belongs to the statement", "SELECT 1; // a\nSELECT 2;", new[] { "SELECT 1;", "SELECT 2;" } }, + new object[] { "semicolon in block comment", "SELECT /* a;b */ 1; SELECT 2", new[] { "SELECT /* a;b */ 1;", "SELECT 2" } }, + new object[] { "nested block comment", "SELECT /* a /* b; */ c; */ 1; SELECT 2", new[] { "SELECT /* a /* b; */ c; */ 1;", "SELECT 2" } }, + new object[] { "heredoc", "SELECT $$a;'b$$; SELECT $x$;$x$", new[] { "SELECT $$a;'b$$;", "SELECT $x$;$x$" } }, + new object[] { "trailing comment only", "SELECT 1;\n-- the end\n", new[] { "SELECT 1;" } }, + new object[] { "empty", " \n-- only a comment\n", Array.Empty() }, + new object[] { "tags header is skipped", "-- Tags: no-fasttest\n-- Tag no-fasttest: reason\n\nSELECT 1;", new[] { "SELECT 1;" } }, + new object[] { "leading comment stays with its statement", "SELECT 1;\n-- next\nSELECT 2;", new[] { "SELECT 1;", "-- next\nSELECT 2;" } }, + new object[] { "insert data ends at an empty line", "INSERT INTO t FORMAT CSV\n1,'a;b'\n2,c;\n\nSELECT 1;", new[] { "INSERT INTO t FORMAT CSV\n1,'a;b'\n2,c;", "SELECT 1;" } }, + new object[] { "insert values ends at a semicolon", "INSERT INTO t FORMAT Values (1);\nSELECT 1;", new[] { "INSERT INTO t FORMAT Values (1);", "SELECT 1;" } }, + new object[] { "format of a select is not insert data", "SELECT 1 FORMAT TSV;\nSELECT 2;", new[] { "SELECT 1 FORMAT TSV;", "SELECT 2;" } }, + new object[] { "insert select with a column named format", "INSERT INTO t SELECT format FROM s;\nSELECT 1;", new[] { "INSERT INTO t SELECT format FROM s;", "SELECT 1;" } }, + new object[] { "insert select from input has inline data", "INSERT INTO t SELECT x FROM input('x UInt8') FORMAT TSV\n1;\n2\n\nSELECT 1;", new[] { "INSERT INTO t SELECT x FROM input('x UInt8') FORMAT TSV\n1;\n2", "SELECT 1;" } }, + new object[] { "insert select with a format alias", "INSERT INTO t SELECT 1 AS format FROM numbers(1);\nSELECT 1;", new[] { "INSERT INTO t SELECT 1 AS format FROM numbers(1);", "SELECT 1;" } }, + new object[] { "insert select with an implicit alias after format", "INSERT INTO t SELECT format x FROM s;\nSELECT 1;", new[] { "INSERT INTO t SELECT format x FROM s;", "SELECT 1;" } }, + new object[] { "insert select with format DIV", "INSERT INTO t SELECT format DIV 2 FROM s;\nSELECT 1;", new[] { "INSERT INTO t SELECT format DIV 2 FROM s;", "SELECT 1;" } }, + new object[] { "insert select with format GLOBAL IN after FROM", "INSERT INTO t SELECT x FROM s WHERE format GLOBAL IN (1);\nSELECT 1;", new[] { "INSERT INTO t SELECT x FROM s WHERE format GLOBAL IN (1);", "SELECT 1;" } }, + new object[] { "insert with format before the data", "INSERT INTO t (a) SETTINGS async_insert = 0 FORMAT CSV\n1\n\nSELECT 1;", new[] { "INSERT INTO t (a) SETTINGS async_insert = 0 FORMAT CSV\n1", "SELECT 1;" } }, + new object[] { "insert select from a table named format", "INSERT INTO t SELECT * FROM format f;\nSELECT 1;", new[] { "INSERT INTO t SELECT * FROM format f;", "SELECT 1;" } }, + new object[] { "insert into a table named format", "INSERT INTO format FORMAT CSV\n1\n\nSELECT 1;", new[] { "INSERT INTO format FORMAT CSV\n1", "SELECT 1;" } }, + new object[] { "double semicolon", "SELECT 1;;\nSELECT 2", new[] { "SELECT 1;", "SELECT 2" } }, + ]; + + [TestCaseSource(nameof(SplitCases))] + public void Split_Script_GivesTheStatementsOfClickHouseClient(string name, string input, string[] expected) + { + Assert.That(Statements.Split(input).Select(s => s.Sql), Is.EqualTo(expected), name); + } + + [Test] + public void Split_TrailingHint_BelongsToItsStatement() + { + var stmts = Statements.Split("SELECT throwIf(1); -- { serverError FUNCTION_THROW_IF_VALUE_IS_NON_ZERO }\nSELECT 2;"); + Assert.That(stmts, Has.Count.EqualTo(2)); + Assert.That(stmts[0].Full, Is.EqualTo("SELECT throwIf(1); -- { serverError FUNCTION_THROW_IF_VALUE_IS_NON_ZERO }")); + Assert.That(stmts[0].Hint.ServerErrors, Is.EqualTo(new[] { 395 })); + Assert.That(stmts[1].Hint.ExpectsError, Is.False); + } + + [Test] + public void Split_HintOnNextLine_IsLeadingAndIgnored() + { + // clickhouse-client takes only the same-line comment as the trailing comment. A hint on the next line + // is a leading comment of the next statement, and an error hint in a leading comment is ignored. + var stmts = Statements.Split("SELECT 1;\n-- { serverError 60 }\nSELECT 2;"); + Assert.That(stmts, Has.Count.EqualTo(2)); + Assert.That(stmts[0].Hint.ExpectsError, Is.False); + Assert.That(stmts[1].Hint.ExpectsError, Is.False); + } + + [Test] + public void Split_HintInsideStatement_Counts() + { + var stmts = Statements.Split("SELECT x -- { serverError UNKNOWN_IDENTIFIER }\n;"); + Assert.That(stmts, Has.Count.EqualTo(1)); + Assert.That(stmts[0].Hint.ServerErrors, Is.EqualTo(new[] { 47 })); + } + + [Test] + public void Split_EchoHints_SetEchoOfTheStatements() + { + var stmts = Statements.Split("SELECT 1;\n-- { echoOn }\nSELECT 2; -- two\nSELECT 3;\n-- { echoOff }\nSELECT 4;\nSELECT 5; -- { echo }\n"); + Assert.That(stmts.Select(s => s.Echo), Is.EqualTo(new[] { false, true, true, false, true })); + Assert.That(stmts[1].Full, Is.EqualTo("-- { echoOn }\nSELECT 2; -- two")); + } + + [Test] + public void Split_HintInDoubleSlashComment_Counts() + { + // `//` starts a comment in ClickHouse SQL, so the comment after the `;` belongs to the statement. + var stmts = Statements.Split("SELECT 1; // { serverError 60 }\n// x\nSELECT 2;"); + Assert.That(stmts, Has.Count.EqualTo(2)); + Assert.That(stmts[0].Full, Is.EqualTo("SELECT 1; // { serverError 60 }")); + Assert.That(stmts[0].Hint.ServerErrors, Is.EqualTo(new[] { 60 })); + Assert.That(Statements.LeadingKeyword(stmts[1].Sql), Is.EqualTo("SELECT")); + } + + [Test] + public void Hint_UnicodeWhitespace_IsLexerWhitespace() + { + // Unicode whitespace before a leading comment keeps it leading (its error hint is ignored), and it separates + // the words of a hint. + Assert.That(TestHint.Parse("\u00A0-- { serverError 60 }\nSELECT 1").ExpectsError, Is.False); + Assert.That(TestHint.Parse("SELECT x; -- {serverError\u00A0UNKNOWN_IDENTIFIER}").ServerErrors, Is.EqualTo(new[] { 47 })); + } + + [Test] + public void LeadingKeyword_UnicodeWhitespace_IsSkipped() + { + // The whitespace of ClickHouse skipWhitespacesUTF8 before the keyword, and inside the parentheses. + Assert.That(Statements.LeadingKeyword("\u0085\u00A0\u2000\u200A\u2028SELECT\u2029 1"), Is.EqualTo("SELECT")); + Assert.That(Statements.LeadingKeyword("\uFEFF(\u3000\u180E\u200D\u202F\u205F\u2060select 1)"), Is.EqualTo("SELECT")); + // U+2010 (a hyphen) is not whitespace for the lexer. + Assert.That(Statements.LeadingKeyword("\u2010SELECT 1"), Is.EqualTo(string.Empty)); + } + + [Test] + public void LeadingKeyword_CommentsAndParentheses_AreSkipped() + { + Assert.That(Statements.LeadingKeyword(" -- c\n/* d */ (select 1)"), Is.EqualTo("SELECT")); + Assert.That(Statements.LeadingKeyword("// c\nselect 1"), Is.EqualTo("SELECT")); + Assert.That(Statements.LeadingKeyword("insert into t values (1)"), Is.EqualTo("INSERT")); + Assert.That(Statements.LeadingKeyword("-- only a comment"), Is.EqualTo(string.Empty)); + } + + [TestCase("SELECT {a:UInt8}, { b : String }, {a:UInt16}", new[] { "a", "b" })] + [TestCase("SELECT '{a:String}', `{b:String}`, \"{c:String}\", $$ {d:String} $$, $t${e:String}$t$", new string[0])] + [TestCase("-- {a:String}\nSELECT 1 # {b:String}\n/* {c:String} /* {d:String} */ */", new string[0])] + [TestCase("SELECT 'it''s {a:String}', {b:Identifier} -- {c:String}", new[] { "b" })] + [TestCase("INSERT INTO t VALUES (1, {1 : 'a'}), (2, {_x : 'b'})", new[] { "_x" })] + [TestCase("SELECT {a}, {1a:String}, {a b:String}, {:String}", new string[0])] + public void ParameterNames_Sql_GivesThePlaceholdersInCode(string sql, string[] expected) => + Assert.That(Statements.ParameterNames(sql), Is.EquivalentTo(expected)); + + [Test] + public void Split_Statement_KeepsItsSemicolon() + { + // clickhouse-client sends the semicolon; system.query_log shows it. + var stmts = Statements.Split("SELECT 1; -- c\nSELECT 2\n"); + Assert.That(stmts.Select(s => s.Sql), Is.EqualTo(new[] { "SELECT 1;", "SELECT 2" })); + } + + [Test] + public void Split_LastStatementWithoutSemicolon_EchoesTheRestOfTheText() + { + // clickhouse-client echoes the rest of the text, with the newlines. + var stmts = Statements.Split("SELECT 1;\nSELECT 2\n\n"); + Assert.That(stmts[0].Full, Is.EqualTo("SELECT 1;")); + Assert.That(stmts[1].Full, Is.EqualTo("SELECT 2\n\n")); + Assert.That(stmts[1].Sql, Is.EqualTo("SELECT 2")); + } +} diff --git a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/TestHintTests.cs b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/TestHintTests.cs new file mode 100644 index 000000000..84af7e130 --- /dev/null +++ b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/TestHintTests.cs @@ -0,0 +1,54 @@ +using NUnit.Framework; + +namespace ClickHouse.Driver.TestRunner.Tests; + +// Ported from hint_test.go of the clickhouse-go harness. +public class TestHintTests +{ + private static readonly object?[] HintCases = + [ + new object?[] { "SELECT 1; -- { serverError UNKNOWN_TABLE }", new[] { 60 }, Array.Empty() }, + new object?[] { "SELECT 1; -- { serverError 60 }", new[] { 60 }, Array.Empty() }, + new object?[] { "SELECT 1; -- { serverError 153, ILLEGAL_DIVISION }", new[] { 153, 153 }, Array.Empty() }, + new object?[] { "SELECT; -- { clientError SYNTAX_ERROR }", Array.Empty(), new[] { 62 } }, + new object?[] { "SELECT 1; -- { error 62 }", new[] { 62 }, new[] { 62 } }, + new object?[] { "SELECT 1 /* { serverError 60 } */;", new[] { 60 }, Array.Empty() }, + new object?[] { "SELECT 1; -- { serverError 60 } because there is no table", new[] { 60 }, Array.Empty() }, + new object?[] { "-- { serverError 60 }\nSELECT 1;", Array.Empty(), Array.Empty() }, + new object?[] { "SELECT '-- { serverError 60 }';", Array.Empty(), Array.Empty() }, + new object?[] { "SELECT 1; -- a comment", Array.Empty(), Array.Empty() }, + ]; + + [TestCaseSource(nameof(HintCases))] + public void Parse_Hint_GivesTheExpectedCodes(string input, int[] server, int[] client) + { + var h = TestHint.Parse(input); + Assert.That(h.ParseError, Is.Null); + Assert.That(h.ServerErrors, Is.EqualTo(server)); + Assert.That(h.ClientErrors, Is.EqualTo(client)); + } + + [Test] + public void Parse_UnknownNameOrRetry_IsAParseError() + { + Assert.That(TestHint.Parse("SELECT 1; -- { serverError NOT_A_REAL_ERROR_NAME }").ParseError, Is.Not.Null); + Assert.That(TestHint.Parse("SELECT 1; -- { retry 3 until serverError 60 }").ParseError, Is.Not.Null); + } + + [Test] + public void Matches_ClientErrorHint_AcceptsAServerError() + { + var h = TestHint.Parse("SELECT; -- { clientError SYNTAX_ERROR }"); + // Through a driver, the server finds syntax errors. + Assert.That(h.Matches(62), Is.True); + Assert.That(h.Matches(60), Is.False); + Assert.That(h.Label, Is.EqualTo("clientError SYNTAX_ERROR")); + } + + [Test] + public void Parse_EchoHints_SetEcho() + { + Assert.That(TestHint.Parse("-- { echoOn }\nSELECT 1;").Echo, Is.True); + Assert.That(TestHint.Parse("SELECT 1; -- { echoOff }").Echo, Is.False); + } +} diff --git a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ChType.cs b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ChType.cs new file mode 100644 index 000000000..468b10a67 --- /dev/null +++ b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ChType.cs @@ -0,0 +1,242 @@ +using System.Text; + +namespace ClickHouse.Driver.TestRunner; + +/// +/// A parsed ClickHouse data type, for example Array(Nullable(DateTime64(3, 'UTC'))). +/// +/// +/// holds the parameters inside the parentheses. A parameter is a nested type +/// ( is set) or a literal, such as the 3 and 'UTC' above or the +/// 'a' = 1 of an Enum8. is set for the named elements of a +/// Tuple or Nested, as in Tuple(a Int32, b String). +/// +internal sealed class ChType +{ + public ChType(string baseName, IReadOnlyList? args = null) + { + Base = baseName; + Args = args ?? []; + } + + public string Base { get; } + + public IReadOnlyList Args { get; } + + /// Parses the type name that the server or the client gives for a result column. + public static ChType Parse(string text) + { + var s = text.Trim(); + var (type, rest) = ParseAt(s); + if (rest.Trim().Length != 0) + { + throw new FormatException($"parse type \"{text}\": unexpected trailing text \"{rest}\""); + } + return type; + } + + /// Returns the nested type of argument , or null. + public ChType? TypeArg(int index) => index < Args.Count ? Args[index].Type : null; + + /// Returns the literal of argument without its single quotes, or "". + public string LiteralArg(int index) => index < Args.Count ? Args[index].Literal.Trim('\'') : string.Empty; + + public override string ToString() + { + if (Args.Count == 0) + { + return Base; + } + var parts = Args.Select(a => a switch + { + { Type: not null, Name.Length: > 0 } => a.Name + " " + a.Type, + { Type: not null } => a.Type.ToString(), + _ => a.Literal, + }); + return Base + "(" + string.Join(", ", parts) + ")"; + } + + internal static bool IsWordChar(char c) => c == '_' || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9'); + + private static (ChType Type, string Remainder) ParseAt(string s) + { + var i = 0; + while (i < s.Length && (IsWordChar(s[i]) || s[i] == '.')) + { + i++; + } + if (i == 0) + { + throw new FormatException($"expected a type name at \"{s}\""); + } + var baseName = s[..i]; + var rest = s[i..].TrimStart(' '); + if (!rest.StartsWith('(')) + { + return (new ChType(baseName), rest); + } + var (parts, after) = SplitArgs(rest); + var args = parts.Select(p => ParseArg(baseName, p)).ToList(); + return (new ChType(baseName, args), after); + } + + private static bool TryParseWhole(string s, out ChType type) + { + try + { + var (t, rest) = ParseAt(s); + type = t; + return rest.Trim().Length == 0; + } + catch (FormatException) + { + type = null!; + return false; + } + } + + // Turns one raw parameter into a nested type, a named nested type, or a literal. + private static ChTypeArg ParseArg(string baseName, string raw) + { + raw = raw.Trim(); + if (raw.Length == 0 || raw[0] == '\'' || raw[0] == '-' || char.IsAsciiDigit(raw[0])) + { + return new ChTypeArg(Literal: raw); + } + switch (baseName) + { + case "Enum8" or "Enum16" or "Enum": + return new ChTypeArg(Literal: raw); + case "AggregateFunction" or "SimpleAggregateFunction": + // The first argument is a function name, such as `sum` or `quantiles(0.5, 0.9)`. + if (TryParseWhole(raw, out var fnType) && IsKnownTypeName(fnType.Base)) + { + return new ChTypeArg(Type: fnType); + } + return new ChTypeArg(Literal: raw); + case "Tuple" or "Nested" or "JSON" or "Object" or "Variant": + // A named element: `name Type`; the name can be quoted with backticks. + if (SplitNamedElement(raw, out var name, out var typeText) && TryParseWhole(typeText, out var named)) + { + return new ChTypeArg(Name: name, Type: named); + } + break; + } + return TryParseWhole(raw, out var t) ? new ChTypeArg(Type: t) : new ChTypeArg(Literal: raw); + } + + // Splits `name Type` into its two parts. Returns false for an element that is only a type, such as + // `Int32` or `Array(String)`. + private static bool SplitNamedElement(string raw, out string name, out string type) + { + name = type = string.Empty; + if (raw.StartsWith('`')) + { + var sb = new StringBuilder(); + for (var j = 1; j < raw.Length; j++) + { + if (raw[j] == '\\' && j + 1 < raw.Length) + { + sb.Append(raw[++j]); + } + else if (raw[j] == '`') + { + if (j + 1 < raw.Length && raw[j + 1] == '`') + { + sb.Append('`'); + j++; + continue; + } + name = sb.ToString(); + type = raw[(j + 1)..].Trim(); + return type.Length > 0; + } + else + { + sb.Append(raw[j]); + } + } + return false; + } + var i = 0; + while (i < raw.Length && (IsWordChar(raw[i]) || raw[i] == '.')) + { + i++; + } + if (i == 0 || i >= raw.Length || raw[i] != ' ') + { + return false; + } + name = raw[..i]; + type = raw[i..].Trim(); + return true; + } + + // Splits `(a, b(c, d), 'e,f')rest` into its top-level parameters and the text after the closing + // parenthesis. + private static (List Parts, string Remainder) SplitArgs(string s) + { + var parts = new List(); + var depth = 0; + var start = 1; + var quote = '\0'; + for (var i = 0; i < s.Length; i++) + { + var c = s[i]; + if (quote != '\0') + { + if (c == '\\') + { + i++; + } + else if (c == quote) + { + quote = '\0'; + } + continue; + } + switch (c) + { + case '\'' or '`' or '"': + quote = c; + break; + case '(': + depth++; + break; + case ')': + depth--; + if (depth == 0) + { + var last = s[start..i].Trim(); + if (last.Length != 0 || parts.Count > 0) + { + parts.Add(last); + } + return (parts, s[(i + 1)..]); + } + break; + case ',' when depth == 1: + parts.Add(s[start..i].Trim()); + start = i + 1; + break; + } + } + throw new FormatException($"unbalanced parentheses in \"{s}\""); + } + + // Used only to tell `SimpleAggregateFunction(sum, UInt64)` (function name, then type) apart; a false + // negative only makes the renderer report an unsupported type. + private static bool IsKnownTypeName(string name) => name is + "Int8" or "Int16" or "Int32" or "Int64" or "Int128" or "Int256" or + "UInt8" or "UInt16" or "UInt32" or "UInt64" or "UInt128" or "UInt256" or + "Float32" or "Float64" or "BFloat16" or "Bool" or "String" or "FixedString" or + "Date" or "Date32" or "DateTime" or "DateTime64" or "Time" or "Time64" or "UUID" or "IPv4" or "IPv6" or + "Decimal" or "Decimal32" or "Decimal64" or "Decimal128" or "Decimal256" or + "Enum8" or "Enum16" or "Nullable" or "LowCardinality" or "Array" or "Tuple" or "Map" or "Nothing" or + "Point" or "Ring" or "LineString" or "MultiLineString" or "Polygon" or "MultiPolygon" or "Geometry" or + "JSON" or "Json" or "Object" or "Dynamic" or "Variant" or "Nested" or "QBit" || + name.StartsWith("Interval", StringComparison.Ordinal); +} + +/// One parameter of a . +internal sealed record ChTypeArg(string Name = "", ChType? Type = null, string Literal = ""); diff --git a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ClickHouse.Driver.TestRunner.csproj b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ClickHouse.Driver.TestRunner.csproj new file mode 100644 index 000000000..65ccf2a52 --- /dev/null +++ b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ClickHouse.Driver.TestRunner.csproj @@ -0,0 +1,37 @@ + + + + + Exe + net10.0 + clickhouse-test-runner + ClickHouse.Driver.TestRunner + false + enable + enable + latest + true + + false + true + true + + $(NoWarn);CHTCP0001 + + + + + + + + + + + + + + diff --git a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ErrorCodes.cs b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ErrorCodes.cs new file mode 100644 index 000000000..cebd8c6ae --- /dev/null +++ b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ErrorCodes.cs @@ -0,0 +1,17 @@ +namespace ClickHouse.Driver.TestRunner; + +/// +/// Maps the error names of ClickHouse to their codes. The table is in ErrorCodes.g.cs, which +/// scripts/gen-error-codes.sh generates from the upstream checkout. +/// +internal static partial class ErrorCodes +{ + public const int SyntaxError = 62; + + // Lazy: the initializers of static fields in two files of a partial class run in no defined order. + private static readonly Lazy> Names = new(() => Codes.ToDictionary(kv => kv.Value, kv => kv.Key)); + + public static int? CodeOf(string name) => Codes.TryGetValue(name, out var code) ? code : null; + + public static string? NameOf(int code) => Names.Value.TryGetValue(code, out var name) ? name : null; +} diff --git a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ErrorCodes.g.cs b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ErrorCodes.g.cs new file mode 100644 index 000000000..b9fc92252 --- /dev/null +++ b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ErrorCodes.g.cs @@ -0,0 +1,698 @@ +// +// Generated by scripts/gen-error-codes.sh from src/Common/ErrorCodes.cpp of ClickHouse v26.10.4.207-stable. +// Do not edit. +// + +namespace ClickHouse.Driver.TestRunner; + +internal static partial class ErrorCodes +{ + // The error names of ClickHouse and their codes. Test hints can name an error instead of giving + // its code. + private static readonly Dictionary Codes = new(StringComparer.Ordinal) + { + ["OK"] = 0, + ["UNSUPPORTED_METHOD"] = 1, + ["UNSUPPORTED_PARAMETER"] = 2, + ["UNEXPECTED_END_OF_FILE"] = 3, + ["EXPECTED_END_OF_FILE"] = 4, + ["CANNOT_PARSE_TEXT"] = 6, + ["INCORRECT_NUMBER_OF_COLUMNS"] = 7, + ["THERE_IS_NO_COLUMN"] = 8, + ["SIZES_OF_COLUMNS_DOESNT_MATCH"] = 9, + ["NOT_FOUND_COLUMN_IN_BLOCK"] = 10, + ["POSITION_OUT_OF_BOUND"] = 11, + ["PARAMETER_OUT_OF_BOUND"] = 12, + ["SIZES_OF_COLUMNS_IN_TUPLE_DOESNT_MATCH"] = 13, + ["DUPLICATE_COLUMN"] = 15, + ["NO_SUCH_COLUMN_IN_TABLE"] = 16, + ["SIZE_OF_FIXED_STRING_DOESNT_MATCH"] = 19, + ["NUMBER_OF_COLUMNS_DOESNT_MATCH"] = 20, + ["CANNOT_READ_FROM_ISTREAM"] = 23, + ["CANNOT_WRITE_TO_OSTREAM"] = 24, + ["CANNOT_PARSE_ESCAPE_SEQUENCE"] = 25, + ["CANNOT_PARSE_QUOTED_STRING"] = 26, + ["CANNOT_PARSE_INPUT_ASSERTION_FAILED"] = 27, + ["CANNOT_PRINT_FLOAT_OR_DOUBLE_NUMBER"] = 28, + ["ATTEMPT_TO_READ_AFTER_EOF"] = 32, + ["CANNOT_READ_ALL_DATA"] = 33, + ["TOO_MANY_ARGUMENTS_FOR_FUNCTION"] = 34, + ["TOO_FEW_ARGUMENTS_FOR_FUNCTION"] = 35, + ["BAD_ARGUMENTS"] = 36, + ["UNKNOWN_ELEMENT_IN_AST"] = 37, + ["CANNOT_PARSE_DATE"] = 38, + ["TOO_LARGE_SIZE_COMPRESSED"] = 39, + ["CHECKSUM_DOESNT_MATCH"] = 40, + ["CANNOT_PARSE_DATETIME"] = 41, + ["NUMBER_OF_ARGUMENTS_DOESNT_MATCH"] = 42, + ["ILLEGAL_TYPE_OF_ARGUMENT"] = 43, + ["ILLEGAL_COLUMN"] = 44, + ["UNKNOWN_FUNCTION"] = 46, + ["UNKNOWN_IDENTIFIER"] = 47, + ["NOT_IMPLEMENTED"] = 48, + ["LOGICAL_ERROR"] = 49, + ["UNKNOWN_TYPE"] = 50, + ["EMPTY_LIST_OF_COLUMNS_QUERIED"] = 51, + ["COLUMN_QUERIED_MORE_THAN_ONCE"] = 52, + ["TYPE_MISMATCH"] = 53, + ["STORAGE_REQUIRES_PARAMETER"] = 55, + ["UNKNOWN_STORAGE"] = 56, + ["TABLE_ALREADY_EXISTS"] = 57, + ["TABLE_METADATA_ALREADY_EXISTS"] = 58, + ["ILLEGAL_TYPE_OF_COLUMN_FOR_FILTER"] = 59, + ["UNKNOWN_TABLE"] = 60, + ["SYNTAX_ERROR"] = 62, + ["UNKNOWN_AGGREGATE_FUNCTION"] = 63, + ["CANNOT_GET_SIZE_OF_FIELD"] = 68, + ["ARGUMENT_OUT_OF_BOUND"] = 69, + ["CANNOT_CONVERT_TYPE"] = 70, + ["CANNOT_WRITE_AFTER_END_OF_BUFFER"] = 71, + ["CANNOT_PARSE_NUMBER"] = 72, + ["UNKNOWN_FORMAT"] = 73, + ["CANNOT_READ_FROM_FILE_DESCRIPTOR"] = 74, + ["CANNOT_WRITE_TO_FILE_DESCRIPTOR"] = 75, + ["CANNOT_OPEN_FILE"] = 76, + ["CANNOT_CLOSE_FILE"] = 77, + ["UNKNOWN_TYPE_OF_QUERY"] = 78, + ["INCORRECT_FILE_NAME"] = 79, + ["INCORRECT_QUERY"] = 80, + ["UNKNOWN_DATABASE"] = 81, + ["DATABASE_ALREADY_EXISTS"] = 82, + ["DIRECTORY_DOESNT_EXIST"] = 83, + ["DIRECTORY_ALREADY_EXISTS"] = 84, + ["FORMAT_IS_NOT_SUITABLE_FOR_INPUT"] = 85, + ["RECEIVED_ERROR_FROM_REMOTE_IO_SERVER"] = 86, + ["CANNOT_SEEK_THROUGH_FILE"] = 87, + ["CANNOT_TRUNCATE_FILE"] = 88, + ["UNKNOWN_COMPRESSION_METHOD"] = 89, + ["EMPTY_LIST_OF_COLUMNS_PASSED"] = 90, + ["SIZES_OF_MARKS_FILES_ARE_INCONSISTENT"] = 91, + ["EMPTY_DATA_PASSED"] = 92, + ["UNKNOWN_AGGREGATED_DATA_VARIANT"] = 93, + ["CANNOT_MERGE_DIFFERENT_AGGREGATED_DATA_VARIANTS"] = 94, + ["CANNOT_READ_FROM_SOCKET"] = 95, + ["CANNOT_WRITE_TO_SOCKET"] = 96, + ["UNKNOWN_PACKET_FROM_CLIENT"] = 99, + ["UNKNOWN_PACKET_FROM_SERVER"] = 100, + ["UNEXPECTED_PACKET_FROM_CLIENT"] = 101, + ["UNEXPECTED_PACKET_FROM_SERVER"] = 102, + ["TOO_SMALL_BUFFER_SIZE"] = 104, + ["FILE_DOESNT_EXIST"] = 107, + ["NO_DATA_TO_INSERT"] = 108, + ["CANNOT_BLOCK_SIGNAL"] = 109, + ["CANNOT_UNBLOCK_SIGNAL"] = 110, + ["CANNOT_MANIPULATE_SIGSET"] = 111, + ["CANNOT_WAIT_FOR_SIGNAL"] = 112, + ["THERE_IS_NO_SESSION"] = 113, + ["CANNOT_CLOCK_GETTIME"] = 114, + ["UNKNOWN_SETTING"] = 115, + ["THERE_IS_NO_DEFAULT_VALUE"] = 116, + ["INCORRECT_DATA"] = 117, + ["ENGINE_REQUIRED"] = 119, + ["CANNOT_INSERT_VALUE_OF_DIFFERENT_SIZE_INTO_TUPLE"] = 120, + ["UNSUPPORTED_JOIN_KEYS"] = 121, + ["INCOMPATIBLE_COLUMNS"] = 122, + ["UNKNOWN_TYPE_OF_AST_NODE"] = 123, + ["INCORRECT_ELEMENT_OF_SET"] = 124, + ["INCORRECT_RESULT_OF_SCALAR_SUBQUERY"] = 125, + ["ILLEGAL_INDEX"] = 127, + ["TOO_LARGE_ARRAY_SIZE"] = 128, + ["FUNCTION_IS_SPECIAL"] = 129, + ["CANNOT_READ_ARRAY_FROM_TEXT"] = 130, + ["TOO_LARGE_STRING_SIZE"] = 131, + ["AGGREGATE_FUNCTION_DOESNT_ALLOW_PARAMETERS"] = 133, + ["PARAMETERS_TO_AGGREGATE_FUNCTIONS_MUST_BE_LITERALS"] = 134, + ["ZERO_ARRAY_OR_TUPLE_INDEX"] = 135, + ["UNKNOWN_ELEMENT_IN_CONFIG"] = 137, + ["EXCESSIVE_ELEMENT_IN_CONFIG"] = 138, + ["NO_ELEMENTS_IN_CONFIG"] = 139, + ["SAMPLING_NOT_SUPPORTED"] = 141, + ["NOT_FOUND_NODE"] = 142, + ["UNKNOWN_OVERFLOW_MODE"] = 145, + ["UNKNOWN_DIRECTION_OF_SORTING"] = 152, + ["ILLEGAL_DIVISION"] = 153, + ["DICTIONARIES_WAS_NOT_LOADED"] = 156, + ["TOO_MANY_ROWS"] = 158, + ["TIMEOUT_EXCEEDED"] = 159, + ["TOO_SLOW"] = 160, + ["TOO_MANY_COLUMNS"] = 161, + ["TOO_DEEP_SUBQUERIES"] = 162, + ["READONLY"] = 164, + ["TOO_MANY_TEMPORARY_COLUMNS"] = 165, + ["TOO_MANY_TEMPORARY_NON_CONST_COLUMNS"] = 166, + ["TOO_DEEP_AST"] = 167, + ["TOO_BIG_AST"] = 168, + ["BAD_TYPE_OF_FIELD"] = 169, + ["BAD_GET"] = 170, + ["CANNOT_CREATE_DIRECTORY"] = 172, + ["CANNOT_ALLOCATE_MEMORY"] = 173, + ["CYCLIC_ALIASES"] = 174, + ["MULTIPLE_EXPRESSIONS_FOR_ALIAS"] = 179, + ["THERE_IS_NO_PROFILE"] = 180, + ["ILLEGAL_FINAL"] = 181, + ["ILLEGAL_PREWHERE"] = 182, + ["UNEXPECTED_EXPRESSION"] = 183, + ["ILLEGAL_AGGREGATION"] = 184, + ["UNSUPPORTED_COLLATION_LOCALE"] = 186, + ["COLLATION_COMPARISON_FAILED"] = 187, + ["SIZES_OF_ARRAYS_DONT_MATCH"] = 190, + ["SET_SIZE_LIMIT_EXCEEDED"] = 191, + ["UNKNOWN_USER"] = 192, + ["WRONG_PASSWORD"] = 193, + ["REQUIRED_PASSWORD"] = 194, + ["IP_ADDRESS_NOT_ALLOWED"] = 195, + ["UNKNOWN_ADDRESS_PATTERN_TYPE"] = 196, + ["DNS_ERROR"] = 198, + ["UNKNOWN_QUOTA"] = 199, + ["QUOTA_EXCEEDED"] = 201, + ["TOO_MANY_SIMULTANEOUS_QUERIES"] = 202, + ["NO_FREE_CONNECTION"] = 203, + ["CANNOT_FSYNC"] = 204, + ["ALIAS_REQUIRED"] = 206, + ["AMBIGUOUS_IDENTIFIER"] = 207, + ["EMPTY_NESTED_TABLE"] = 208, + ["SOCKET_TIMEOUT"] = 209, + ["NETWORK_ERROR"] = 210, + ["EMPTY_QUERY"] = 211, + ["UNKNOWN_LOAD_BALANCING"] = 212, + ["UNKNOWN_TOTALS_MODE"] = 213, + ["CANNOT_STATVFS"] = 214, + ["NOT_AN_AGGREGATE"] = 215, + ["QUERY_WITH_SAME_ID_IS_ALREADY_RUNNING"] = 216, + ["CLIENT_HAS_CONNECTED_TO_WRONG_PORT"] = 217, + ["TABLE_IS_DROPPED"] = 218, + ["DATABASE_NOT_EMPTY"] = 219, + ["DUPLICATE_INTERSERVER_IO_ENDPOINT"] = 220, + ["NO_SUCH_INTERSERVER_IO_ENDPOINT"] = 221, + ["UNEXPECTED_AST_STRUCTURE"] = 223, + ["REPLICA_IS_ALREADY_ACTIVE"] = 224, + ["NO_ZOOKEEPER"] = 225, + ["NO_FILE_IN_DATA_PART"] = 226, + ["UNEXPECTED_FILE_IN_DATA_PART"] = 227, + ["BAD_SIZE_OF_FILE_IN_DATA_PART"] = 228, + ["QUERY_IS_TOO_LARGE"] = 229, + ["NOT_FOUND_EXPECTED_DATA_PART"] = 230, + ["TOO_MANY_UNEXPECTED_DATA_PARTS"] = 231, + ["NO_SUCH_DATA_PART"] = 232, + ["BAD_DATA_PART_NAME"] = 233, + ["NO_REPLICA_HAS_PART"] = 234, + ["DUPLICATE_DATA_PART"] = 235, + ["ABORTED"] = 236, + ["NO_REPLICA_NAME_GIVEN"] = 237, + ["FORMAT_VERSION_TOO_OLD"] = 238, + ["CANNOT_MUNMAP"] = 239, + ["CANNOT_MREMAP"] = 240, + ["MEMORY_LIMIT_EXCEEDED"] = 241, + ["TABLE_IS_READ_ONLY"] = 242, + ["NOT_ENOUGH_SPACE"] = 243, + ["UNEXPECTED_ZOOKEEPER_ERROR"] = 244, + ["CORRUPTED_DATA"] = 246, + ["INVALID_PARTITION_VALUE"] = 248, + ["NO_SUCH_REPLICA"] = 251, + ["TOO_MANY_PARTS"] = 252, + ["REPLICA_ALREADY_EXISTS"] = 253, + ["NO_ACTIVE_REPLICAS"] = 254, + ["TOO_MANY_RETRIES_TO_FETCH_PARTS"] = 255, + ["PARTITION_ALREADY_EXISTS"] = 256, + ["PARTITION_DOESNT_EXIST"] = 257, + ["UNION_ALL_RESULT_STRUCTURES_MISMATCH"] = 258, + ["CLIENT_OUTPUT_FORMAT_SPECIFIED"] = 260, + ["UNKNOWN_BLOCK_INFO_FIELD"] = 261, + ["BAD_COLLATION"] = 262, + ["CANNOT_COMPILE_CODE"] = 263, + ["INCOMPATIBLE_TYPE_OF_JOIN"] = 264, + ["NO_AVAILABLE_REPLICA"] = 265, + ["MISMATCH_REPLICAS_DATA_SOURCES"] = 266, + ["INFINITE_LOOP"] = 269, + ["CANNOT_COMPRESS"] = 270, + ["CANNOT_DECOMPRESS"] = 271, + ["CANNOT_IO_SUBMIT"] = 272, + ["CANNOT_IO_GETEVENTS"] = 273, + ["AIO_READ_ERROR"] = 274, + ["AIO_WRITE_ERROR"] = 275, + ["INDEX_NOT_USED"] = 277, + ["ALL_CONNECTION_TRIES_FAILED"] = 279, + ["NO_AVAILABLE_DATA"] = 280, + ["DICTIONARY_IS_EMPTY"] = 281, + ["INCORRECT_INDEX"] = 282, + ["UNKNOWN_DISTRIBUTED_PRODUCT_MODE"] = 283, + ["WRONG_GLOBAL_SUBQUERY"] = 284, + ["TOO_FEW_LIVE_REPLICAS"] = 285, + ["UNSATISFIED_QUORUM_FOR_PREVIOUS_WRITE"] = 286, + ["UNKNOWN_FORMAT_VERSION"] = 287, + ["DISTRIBUTED_IN_JOIN_SUBQUERY_DENIED"] = 288, + ["REPLICA_IS_NOT_IN_QUORUM"] = 289, + ["LIMIT_EXCEEDED"] = 290, + ["DATABASE_ACCESS_DENIED"] = 291, + ["MONGODB_CANNOT_AUTHENTICATE"] = 293, + ["CANNOT_WRITE_TO_FILE"] = 294, + ["RECEIVED_EMPTY_DATA"] = 295, + ["SHARD_HAS_NO_CONNECTIONS"] = 297, + ["CANNOT_PIPE"] = 298, + ["CANNOT_FORK"] = 299, + ["CANNOT_DLSYM"] = 300, + ["CANNOT_CREATE_CHILD_PROCESS"] = 301, + ["CHILD_WAS_NOT_EXITED_NORMALLY"] = 302, + ["CANNOT_SELECT"] = 303, + ["CANNOT_WAITPID"] = 304, + ["TABLE_WAS_NOT_DROPPED"] = 305, + ["TOO_DEEP_RECURSION"] = 306, + ["TOO_MANY_BYTES"] = 307, + ["UNEXPECTED_NODE_IN_ZOOKEEPER"] = 308, + ["FUNCTION_CANNOT_HAVE_PARAMETERS"] = 309, + ["INVALID_CONFIG_PARAMETER"] = 318, + ["UNKNOWN_STATUS_OF_INSERT"] = 319, + ["VALUE_IS_OUT_OF_RANGE_OF_DATA_TYPE"] = 321, + ["UNKNOWN_DATABASE_ENGINE"] = 336, + ["UNFINISHED"] = 341, + ["METADATA_MISMATCH"] = 342, + ["SUPPORT_IS_DISABLED"] = 344, + ["TABLE_DIFFERS_TOO_MUCH"] = 345, + ["CANNOT_CONVERT_CHARSET"] = 346, + ["CANNOT_LOAD_CONFIG"] = 347, + ["CANNOT_INSERT_NULL_IN_ORDINARY_COLUMN"] = 349, + ["AMBIGUOUS_COLUMN_NAME"] = 352, + ["INDEX_OF_POSITIONAL_ARGUMENT_IS_OUT_OF_RANGE"] = 353, + ["ZLIB_INFLATE_FAILED"] = 354, + ["ZLIB_DEFLATE_FAILED"] = 355, + ["INTO_OUTFILE_NOT_ALLOWED"] = 358, + ["TABLE_SIZE_EXCEEDS_MAX_DROP_SIZE_LIMIT"] = 359, + ["CANNOT_CREATE_CHARSET_CONVERTER"] = 360, + ["SEEK_POSITION_OUT_OF_BOUND"] = 361, + ["CURRENT_WRITE_BUFFER_IS_EXHAUSTED"] = 362, + ["CANNOT_CREATE_IO_BUFFER"] = 363, + ["RECEIVED_ERROR_TOO_MANY_REQUESTS"] = 364, + ["SIZES_OF_NESTED_COLUMNS_ARE_INCONSISTENT"] = 366, + ["ALL_REPLICAS_ARE_STALE"] = 369, + ["DATA_TYPE_CANNOT_BE_USED_IN_TABLES"] = 370, + ["INCONSISTENT_CLUSTER_DEFINITION"] = 371, + ["SESSION_NOT_FOUND"] = 372, + ["SESSION_IS_LOCKED"] = 373, + ["INVALID_SESSION_TIMEOUT"] = 374, + ["CANNOT_DLOPEN"] = 375, + ["CANNOT_PARSE_UUID"] = 376, + ["ILLEGAL_SYNTAX_FOR_DATA_TYPE"] = 377, + ["DATA_TYPE_CANNOT_HAVE_ARGUMENTS"] = 378, + ["CANNOT_KILL"] = 380, + ["HTTP_LENGTH_REQUIRED"] = 381, + ["CANNOT_LOAD_CATBOOST_MODEL"] = 382, + ["CANNOT_APPLY_CATBOOST_MODEL"] = 383, + ["PART_IS_TEMPORARILY_LOCKED"] = 384, + ["MULTIPLE_STREAMS_REQUIRED"] = 385, + ["NO_COMMON_TYPE"] = 386, + ["DICTIONARY_ALREADY_EXISTS"] = 387, + ["CANNOT_ASSIGN_OPTIMIZE"] = 388, + ["INSERT_WAS_DEDUPLICATED"] = 389, + ["CANNOT_GET_CREATE_TABLE_QUERY"] = 390, + ["EXTERNAL_LIBRARY_ERROR"] = 391, + ["QUERY_IS_PROHIBITED"] = 392, + ["THERE_IS_NO_QUERY"] = 393, + ["QUERY_WAS_CANCELLED"] = 394, + ["FUNCTION_THROW_IF_VALUE_IS_NON_ZERO"] = 395, + ["TOO_MANY_ROWS_OR_BYTES"] = 396, + ["QUERY_IS_NOT_SUPPORTED_IN_MATERIALIZED_VIEW"] = 397, + ["UNKNOWN_MUTATION_COMMAND"] = 398, + ["FORMAT_IS_NOT_SUITABLE_FOR_OUTPUT"] = 399, + ["CANNOT_STAT"] = 400, + ["FEATURE_IS_NOT_ENABLED_AT_BUILD_TIME"] = 401, + ["CANNOT_IOSETUP"] = 402, + ["INVALID_JOIN_ON_EXPRESSION"] = 403, + ["BAD_ODBC_CONNECTION_STRING"] = 404, + ["TOP_AND_LIMIT_TOGETHER"] = 406, + ["DECIMAL_OVERFLOW"] = 407, + ["BAD_REQUEST_PARAMETER"] = 408, + ["EXTERNAL_SERVER_IS_NOT_RESPONDING"] = 410, + ["PTHREAD_ERROR"] = 411, + ["NETLINK_ERROR"] = 412, + ["CANNOT_SET_SIGNAL_HANDLER"] = 413, + ["ALL_REPLICAS_LOST"] = 415, + ["REPLICA_STATUS_CHANGED"] = 416, + ["EXPECTED_ALL_OR_ANY"] = 417, + ["UNKNOWN_JOIN"] = 418, + ["MULTIPLE_ASSIGNMENTS_TO_COLUMN"] = 419, + ["CANNOT_UPDATE_COLUMN"] = 420, + ["CANNOT_ADD_DIFFERENT_AGGREGATE_STATES"] = 421, + ["UNSUPPORTED_URI_SCHEME"] = 422, + ["CANNOT_GETTIMEOFDAY"] = 423, + ["CANNOT_LINK"] = 424, + ["SYSTEM_ERROR"] = 425, + ["CANNOT_COMPILE_REGEXP"] = 427, + ["FAILED_TO_GETPWUID"] = 429, + ["MISMATCHING_USERS_FOR_PROCESS_AND_DATA"] = 430, + ["ILLEGAL_SYNTAX_FOR_CODEC_TYPE"] = 431, + ["UNKNOWN_CODEC"] = 432, + ["ILLEGAL_CODEC_PARAMETER"] = 433, + ["CANNOT_PARSE_PROTOBUF_SCHEMA"] = 434, + ["NO_COLUMN_SERIALIZED_TO_REQUIRED_PROTOBUF_FIELD"] = 435, + ["PROTOBUF_BAD_CAST"] = 436, + ["PROTOBUF_FIELD_NOT_REPEATED"] = 437, + ["DATA_TYPE_CANNOT_BE_PROMOTED"] = 438, + ["CANNOT_SCHEDULE_TASK"] = 439, + ["INVALID_LIMIT_EXPRESSION"] = 440, + ["CANNOT_PARSE_DOMAIN_VALUE_FROM_STRING"] = 441, + ["BAD_DATABASE_FOR_TEMPORARY_TABLE"] = 442, + ["NO_COLUMNS_SERIALIZED_TO_PROTOBUF_FIELDS"] = 443, + ["UNKNOWN_PROTOBUF_FORMAT"] = 444, + ["CANNOT_MPROTECT"] = 445, + ["FUNCTION_NOT_ALLOWED"] = 446, + ["HYPERSCAN_CANNOT_SCAN_TEXT"] = 447, + ["BROTLI_READ_FAILED"] = 448, + ["BROTLI_WRITE_FAILED"] = 449, + ["BAD_TTL_EXPRESSION"] = 450, + ["BAD_TTL_FILE"] = 451, + ["SETTING_CONSTRAINT_VIOLATION"] = 452, + ["MYSQL_CLIENT_INSUFFICIENT_CAPABILITIES"] = 453, + ["OPENSSL_ERROR"] = 454, + ["SUSPICIOUS_TYPE_FOR_LOW_CARDINALITY"] = 455, + ["UNKNOWN_QUERY_PARAMETER"] = 456, + ["BAD_QUERY_PARAMETER"] = 457, + ["CANNOT_UNLINK"] = 458, + ["CANNOT_SET_THREAD_PRIORITY"] = 459, + ["CANNOT_CREATE_TIMER"] = 460, + ["CANNOT_SET_TIMER_PERIOD"] = 461, + ["CANNOT_FCNTL"] = 463, + ["CANNOT_PARSE_ELF"] = 464, + ["CANNOT_PARSE_DWARF"] = 465, + ["INSECURE_PATH"] = 466, + ["CANNOT_PARSE_BOOL"] = 467, + ["CANNOT_PTHREAD_ATTR"] = 468, + ["VIOLATED_CONSTRAINT"] = 469, + ["INVALID_SETTING_VALUE"] = 471, + ["READONLY_SETTING"] = 472, + ["DEADLOCK_AVOIDED"] = 473, + ["INVALID_TEMPLATE_FORMAT"] = 474, + ["INVALID_WITH_FILL_EXPRESSION"] = 475, + ["WITH_TIES_WITHOUT_ORDER_BY"] = 476, + ["INVALID_USAGE_OF_INPUT"] = 477, + ["UNKNOWN_POLICY"] = 478, + ["UNKNOWN_DISK"] = 479, + ["UNKNOWN_PROTOCOL"] = 480, + ["PATH_ACCESS_DENIED"] = 481, + ["DICTIONARY_ACCESS_DENIED"] = 482, + ["TOO_MANY_REDIRECTS"] = 483, + ["INTERNAL_REDIS_ERROR"] = 484, + ["CANNOT_GET_CREATE_DICTIONARY_QUERY"] = 487, + ["INCORRECT_DICTIONARY_DEFINITION"] = 489, + ["CANNOT_FORMAT_DATETIME"] = 490, + ["UNACCEPTABLE_URL"] = 491, + ["ACCESS_ENTITY_NOT_FOUND"] = 492, + ["ACCESS_ENTITY_ALREADY_EXISTS"] = 493, + ["ACCESS_STORAGE_READONLY"] = 495, + ["QUOTA_REQUIRES_CLIENT_KEY"] = 496, + ["ACCESS_DENIED"] = 497, + ["LIMIT_BY_WITH_TIES_IS_NOT_SUPPORTED"] = 498, + ["S3_ERROR"] = 499, + ["AZURE_BLOB_STORAGE_ERROR"] = 500, + ["CANNOT_CREATE_DATABASE"] = 501, + ["CANNOT_SIGQUEUE"] = 502, + ["AGGREGATE_FUNCTION_THROW"] = 503, + ["FILE_ALREADY_EXISTS"] = 504, + ["UNABLE_TO_SKIP_UNUSED_SHARDS"] = 507, + ["UNKNOWN_ACCESS_TYPE"] = 508, + ["INVALID_GRANT"] = 509, + ["CACHE_DICTIONARY_UPDATE_FAIL"] = 510, + ["UNKNOWN_ROLE"] = 511, + ["SET_NON_GRANTED_ROLE"] = 512, + ["UNKNOWN_PART_TYPE"] = 513, + ["ACCESS_STORAGE_FOR_INSERTION_NOT_FOUND"] = 514, + ["INCORRECT_ACCESS_ENTITY_DEFINITION"] = 515, + ["AUTHENTICATION_FAILED"] = 516, + ["CANNOT_ASSIGN_ALTER"] = 517, + ["CANNOT_COMMIT_OFFSET"] = 518, + ["NO_REMOTE_SHARD_AVAILABLE"] = 519, + ["CANNOT_DETACH_DICTIONARY_AS_TABLE"] = 520, + ["ATOMIC_RENAME_FAIL"] = 521, + ["UNKNOWN_ROW_POLICY"] = 523, + ["ALTER_OF_COLUMN_IS_FORBIDDEN"] = 524, + ["INCORRECT_DISK_INDEX"] = 525, + ["NO_SUITABLE_FUNCTION_IMPLEMENTATION"] = 527, + ["CASSANDRA_INTERNAL_ERROR"] = 528, + ["NOT_A_LEADER"] = 529, + ["CANNOT_CONNECT_RABBITMQ"] = 530, + ["CANNOT_FSTAT"] = 531, + ["LDAP_ERROR"] = 532, + ["UNKNOWN_RAID_TYPE"] = 535, + ["CANNOT_RESTORE_FROM_FIELD_DUMP"] = 536, + ["ILLEGAL_MYSQL_VARIABLE"] = 537, + ["MYSQL_SYNTAX_ERROR"] = 538, + ["CANNOT_BIND_RABBITMQ_EXCHANGE"] = 539, + ["CANNOT_DECLARE_RABBITMQ_EXCHANGE"] = 540, + ["CANNOT_CREATE_RABBITMQ_QUEUE_BINDING"] = 541, + ["CANNOT_REMOVE_RABBITMQ_EXCHANGE"] = 542, + ["UNKNOWN_MYSQL_DATATYPES_SUPPORT_LEVEL"] = 543, + ["ROW_AND_ROWS_TOGETHER"] = 544, + ["FIRST_AND_NEXT_TOGETHER"] = 545, + ["NO_ROW_DELIMITER"] = 546, + ["INVALID_RAID_TYPE"] = 547, + ["UNKNOWN_VOLUME"] = 548, + ["DATA_TYPE_CANNOT_BE_USED_IN_KEY"] = 549, + ["UNRECOGNIZED_ARGUMENTS"] = 552, + ["LZMA_STREAM_ENCODER_FAILED"] = 553, + ["LZMA_STREAM_DECODER_FAILED"] = 554, + ["ROCKSDB_ERROR"] = 555, + ["SYNC_MYSQL_USER_ACCESS_ERROR"] = 556, + ["UNKNOWN_UNION"] = 557, + ["EXPECTED_ALL_OR_DISTINCT"] = 558, + ["INVALID_GRPC_QUERY_INFO"] = 559, + ["ZSTD_ENCODER_FAILED"] = 560, + ["ZSTD_DECODER_FAILED"] = 561, + ["TLD_LIST_NOT_FOUND"] = 562, + ["CANNOT_READ_MAP_FROM_TEXT"] = 563, + ["INTERSERVER_SCHEME_DOESNT_MATCH"] = 564, + ["TOO_MANY_PARTITIONS"] = 565, + ["CANNOT_RMDIR"] = 566, + ["DUPLICATED_PART_UUIDS"] = 567, + ["RAFT_ERROR"] = 568, + ["MULTIPLE_COLUMNS_SERIALIZED_TO_SAME_PROTOBUF_FIELD"] = 569, + ["DATA_TYPE_INCOMPATIBLE_WITH_PROTOBUF_FIELD"] = 570, + ["DATABASE_REPLICATION_FAILED"] = 571, + ["TOO_MANY_QUERY_PLAN_OPTIMIZATIONS"] = 572, + ["EPOLL_ERROR"] = 573, + ["DISTRIBUTED_TOO_MANY_PENDING_BYTES"] = 574, + ["UNKNOWN_SNAPSHOT"] = 575, + ["KERBEROS_ERROR"] = 576, + ["INVALID_SHARD_ID"] = 577, + ["INVALID_FORMAT_INSERT_QUERY_WITH_DATA"] = 578, + ["INCORRECT_PART_TYPE"] = 579, + ["CANNOT_SET_ROUNDING_MODE"] = 580, + ["TOO_LARGE_DISTRIBUTED_DEPTH"] = 581, + ["NO_SUCH_PROJECTION_IN_TABLE"] = 582, + ["ILLEGAL_PROJECTION"] = 583, + ["PROJECTION_NOT_USED"] = 584, + ["CANNOT_PARSE_YAML"] = 585, + ["CANNOT_CREATE_FILE"] = 586, + ["CONCURRENT_ACCESS_NOT_SUPPORTED"] = 587, + ["DISTRIBUTED_BROKEN_BATCH_INFO"] = 588, + ["DISTRIBUTED_BROKEN_BATCH_FILES"] = 589, + ["CANNOT_SYSCONF"] = 590, + ["SQLITE_ENGINE_ERROR"] = 591, + ["DATA_ENCRYPTION_ERROR"] = 592, + ["ZERO_COPY_REPLICATION_ERROR"] = 593, + ["BZIP2_STREAM_DECODER_FAILED"] = 594, + ["BZIP2_STREAM_ENCODER_FAILED"] = 595, + ["INTERSECT_OR_EXCEPT_RESULT_STRUCTURES_MISMATCH"] = 596, + ["NO_SUCH_ERROR_CODE"] = 597, + ["BACKUP_ALREADY_EXISTS"] = 598, + ["BACKUP_NOT_FOUND"] = 599, + ["BACKUP_VERSION_NOT_SUPPORTED"] = 600, + ["BACKUP_DAMAGED"] = 601, + ["NO_BASE_BACKUP"] = 602, + ["WRONG_BASE_BACKUP"] = 603, + ["BACKUP_ENTRY_ALREADY_EXISTS"] = 604, + ["BACKUP_ENTRY_NOT_FOUND"] = 605, + ["BACKUP_IS_EMPTY"] = 606, + ["CANNOT_RESTORE_DATABASE"] = 607, + ["CANNOT_RESTORE_TABLE"] = 608, + ["FUNCTION_ALREADY_EXISTS"] = 609, + ["CANNOT_DROP_FUNCTION"] = 610, + ["CANNOT_CREATE_RECURSIVE_FUNCTION"] = 611, + ["POSTGRESQL_CONNECTION_FAILURE"] = 614, + ["CANNOT_ADVISE"] = 615, + ["UNKNOWN_READ_METHOD"] = 616, + ["LZ4_ENCODER_FAILED"] = 617, + ["LZ4_DECODER_FAILED"] = 618, + ["POSTGRESQL_REPLICATION_INTERNAL_ERROR"] = 619, + ["QUERY_NOT_ALLOWED"] = 620, + ["CANNOT_NORMALIZE_STRING"] = 621, + ["CANNOT_PARSE_CAPN_PROTO_SCHEMA"] = 622, + ["CAPN_PROTO_BAD_CAST"] = 623, + ["BAD_FILE_TYPE"] = 624, + ["IO_SETUP_ERROR"] = 625, + ["CANNOT_SKIP_UNKNOWN_FIELD"] = 626, + ["BACKUP_ENGINE_NOT_FOUND"] = 627, + ["OFFSET_FETCH_WITHOUT_ORDER_BY"] = 628, + ["HTTP_RANGE_NOT_SATISFIABLE"] = 629, + ["HAVE_DEPENDENT_OBJECTS"] = 630, + ["UNKNOWN_FILE_SIZE"] = 631, + ["UNEXPECTED_DATA_AFTER_PARSED_VALUE"] = 632, + ["MONGODB_ERROR"] = 634, + ["CANNOT_POLL"] = 635, + ["CANNOT_EXTRACT_TABLE_STRUCTURE"] = 636, + ["INVALID_TABLE_OVERRIDE"] = 637, + ["SNAPPY_UNCOMPRESS_FAILED"] = 638, + ["SNAPPY_COMPRESS_FAILED"] = 639, + ["NO_HIVEMETASTORE"] = 640, + ["CANNOT_APPEND_TO_FILE"] = 641, + ["CANNOT_PACK_ARCHIVE"] = 642, + ["CANNOT_UNPACK_ARCHIVE"] = 643, + ["NUMBER_OF_DIMENSIONS_MISMATCHED"] = 645, + ["CANNOT_BACKUP_TABLE"] = 647, + ["WRONG_DDL_RENAMING_SETTINGS"] = 648, + ["INVALID_TRANSACTION"] = 649, + ["SERIALIZATION_ERROR"] = 650, + ["CAPN_PROTO_BAD_TYPE"] = 651, + ["ONLY_NULLS_WHILE_READING_SCHEMA"] = 652, + ["CANNOT_PARSE_BACKUP_SETTINGS"] = 653, + ["WRONG_BACKUP_SETTINGS"] = 654, + ["FAILED_TO_SYNC_BACKUP_OR_RESTORE"] = 655, + ["UNKNOWN_STATUS_OF_TRANSACTION"] = 659, + ["HDFS_ERROR"] = 660, + ["CANNOT_SEND_SIGNAL"] = 661, + ["FS_METADATA_ERROR"] = 662, + ["INCONSISTENT_METADATA_FOR_BACKUP"] = 663, + ["ACCESS_STORAGE_DOESNT_ALLOW_BACKUP"] = 664, + ["CANNOT_CONNECT_NATS"] = 665, + ["NOT_INITIALIZED"] = 667, + ["INVALID_STATE"] = 668, + ["NAMED_COLLECTION_DOESNT_EXIST"] = 669, + ["NAMED_COLLECTION_ALREADY_EXISTS"] = 670, + ["NAMED_COLLECTION_IS_IMMUTABLE"] = 671, + ["INVALID_SCHEDULER_NODE"] = 672, + ["RESOURCE_ACCESS_DENIED"] = 673, + ["RESOURCE_NOT_FOUND"] = 674, + ["CANNOT_PARSE_IPV4"] = 675, + ["CANNOT_PARSE_IPV6"] = 676, + ["THREAD_WAS_CANCELED"] = 677, + ["IO_URING_INIT_FAILED"] = 678, + ["IO_URING_SUBMIT_ERROR"] = 679, + ["MIXED_ACCESS_PARAMETER_TYPES"] = 690, + ["UNKNOWN_ELEMENT_OF_ENUM"] = 691, + ["TOO_MANY_MUTATIONS"] = 692, + ["AWS_ERROR"] = 693, + ["ASYNC_LOAD_CYCLE"] = 694, + ["ASYNC_LOAD_FAILED"] = 695, + ["ASYNC_LOAD_CANCELED"] = 696, + ["CANNOT_RESTORE_TO_NONENCRYPTED_DISK"] = 697, + ["INVALID_REDIS_STORAGE_TYPE"] = 698, + ["INVALID_REDIS_TABLE_STRUCTURE"] = 699, + ["USER_SESSION_LIMIT_EXCEEDED"] = 700, + ["CLUSTER_DOESNT_EXIST"] = 701, + ["CLIENT_INFO_DOES_NOT_MATCH"] = 702, + ["INVALID_IDENTIFIER"] = 703, + ["QUERY_CACHE_USED_WITH_NONDETERMINISTIC_FUNCTIONS"] = 704, + ["TABLE_NOT_EMPTY"] = 705, + ["LIBSSH_ERROR"] = 706, + ["GCP_ERROR"] = 707, + ["ILLEGAL_STATISTICS"] = 708, + ["CANNOT_GET_REPLICATED_DATABASE_SNAPSHOT"] = 709, + ["FAULT_INJECTED"] = 710, + ["FILECACHE_ACCESS_DENIED"] = 711, + ["TOO_MANY_MATERIALIZED_VIEWS"] = 712, + ["BROKEN_PROJECTION"] = 713, + ["UNEXPECTED_CLUSTER"] = 714, + ["CANNOT_DETECT_FORMAT"] = 715, + ["CANNOT_FORGET_PARTITION"] = 716, + ["EXPERIMENTAL_FEATURE_ERROR"] = 717, + ["TOO_SLOW_PARSING"] = 718, + ["QUERY_CACHE_USED_WITH_SYSTEM_TABLE"] = 719, + ["USER_EXPIRED"] = 720, + ["DEPRECATED_FUNCTION"] = 721, + ["ASYNC_LOAD_WAIT_FAILED"] = 722, + ["PARQUET_EXCEPTION"] = 723, + ["TOO_MANY_TABLES"] = 724, + ["TOO_MANY_DATABASES"] = 725, + ["UNEXPECTED_HTTP_HEADERS"] = 726, + ["UNEXPECTED_TABLE_ENGINE"] = 727, + ["UNEXPECTED_DATA_TYPE"] = 728, + ["ILLEGAL_TIME_SERIES_TAGS"] = 729, + ["REFRESH_FAILED"] = 730, + ["QUERY_CACHE_USED_WITH_NON_THROW_OVERFLOW_MODE"] = 731, + ["TABLE_IS_BEING_RESTARTED"] = 733, + ["CANNOT_WRITE_AFTER_BUFFER_CANCELED"] = 734, + ["QUERY_WAS_CANCELLED_BY_CLIENT"] = 735, + ["DATALAKE_DATABASE_ERROR"] = 736, + ["GOOGLE_CLOUD_ERROR"] = 737, + ["PART_IS_LOCKED"] = 738, + ["BUZZHOUSE"] = 739, + ["POTENTIALLY_BROKEN_DATA_PART"] = 740, + ["TABLE_UUID_MISMATCH"] = 741, + ["DELTA_KERNEL_ERROR"] = 742, + ["ICEBERG_SPECIFICATION_VIOLATION"] = 743, + ["SESSION_ID_EMPTY"] = 744, + ["SERVER_OVERLOADED"] = 745, + ["DEPENDENCIES_NOT_FOUND"] = 746, + ["FILECACHE_CANNOT_WRITE_THROUGH_CACHE_WITH_CONCURRENT_READS"] = 747, + ["AVRO_EXCEPTION"] = 748, + ["TCP_CONNECTION_LIMIT_REACHED"] = 749, + ["ARROWFLIGHT_INTERNAL_ERROR"] = 750, + ["ARROWFLIGHT_CONNECTION_FAILURE"] = 751, + ["ARROWFLIGHT_FETCH_SCHEMA_ERROR"] = 752, + ["ARROWFLIGHT_WRITE_ERROR"] = 753, + ["UDF_EXECUTION_FAILED"] = 754, + ["TOO_LARGE_LIGHTWEIGHT_UPDATES"] = 755, + ["CANNOT_PARSE_PROMQL_QUERY"] = 756, + ["CANNOT_GET_THREAD_PRIORITY"] = 757, + ["TOO_MANY_NAMED_COLLECTIONS"] = 758, + ["LICENSING_EXCEPTION"] = 759, + ["UNICODE_ERROR"] = 760, + ["ACME_ERROR"] = 761, + ["HTTP_CONNECTION_LIMIT_REACHED"] = 762, + ["SESSION_REFUSED"] = 763, + ["DEDUPLICATION_IS_NOT_POSSIBLE"] = 764, + ["UNKNOWN_MASKING_POLICY"] = 765, + ["INSTRUMENTATION_ERROR"] = 766, + ["REQUIRED_SECOND_FACTOR"] = 767, + ["CANNOT_EXECUTE_PROMQL_QUERY"] = 768, + ["NAMED_COLLECTION_IS_USED"] = 769, + ["WASM_ERROR"] = 770, + ["CACHE_CANNOT_WRITE_TO_CACHE_DISK"] = 771, + ["INCOMPATIBLE_SCHEMA"] = 772, + ["MALFORMED_AI_PROVIDER_RESPONSE"] = 773, + ["TABLE_IS_PERMANENTLY_READ_ONLY"] = 774, + ["STATELESS_WORKER_DISCOVERY_ERROR"] = 775, + ["RESOURCE_LIMIT_EXCEEDED"] = 776, + ["MEMORY_RESERVATION_KILLED"] = 777, + ["MEMORY_RESERVATION_FAILED"] = 778, + ["UNSUPPORTED_MEDIA_TYPE"] = 779, + ["SW_SERVER_NO_WORKERS_AVAILABLE"] = 780, + ["AI_PROVIDER_RESPONSE_TRUNCATED"] = 781, + ["AI_PROVIDER_RESPONSE_INCOMPLETE"] = 782, + ["SSH_AGENT_ERROR"] = 783, + ["OBJECT_STORAGE_QUEUE_POST_PROCESSING_FAILED"] = 784, + ["NOTHING_TO_KILL"] = 785, + ["DISTRIBUTED_CACHE_ERROR"] = 900, + ["CANNOT_USE_DISTRIBUTED_CACHE"] = 901, + ["PROTOCOL_VERSION_MISMATCH"] = 902, + ["DISTRIBUTED_CACHE_REGISTRY_SHUTDOWN"] = 903, + ["TOO_MANY_UNAVAILABLE_SHARDS"] = 904, + ["DISTRIBUTED_CACHE_SERVER_IN_BACKOFF"] = 905, + ["AST_FUZZER_ORACLE_MISMATCH"] = 906, + ["DISTRIBUTED_CACHE_UNEXPECTED_SERVER_CERTIFICATE"] = 907, + ["KEEPER_EXCEPTION"] = 999, + ["POCO_EXCEPTION"] = 1000, + ["STD_EXCEPTION"] = 1001, + ["UNKNOWN_EXCEPTION"] = 1002, + ["SSH_EXCEPTION"] = 1003, + ["STARTUP_SCRIPTS_ERROR"] = 1004, + ["STALE_VERSION"] = 1005, + ["INVALID_CURSOR_LOOKUP"] = 1006, + ["ILLEGAL_STREAM"] = 1007, + ["TEMPORARY_DATA_NOT_IN_CACHE"] = 1008, + ["S3_OBJECT_CHANGED_DURING_READ"] = 1009, + ["UNIQUE_KEY_DENSE_INDEX_UNREADABLE"] = 1010, + ["HANDLER_ALREADY_EXISTS"] = 1011, + ["HANDLER_DOESNT_EXIST"] = 1012, + ["AMBIGUOUS_HANDLER"] = 1013, + ["TRANSACTION_ROLLBACK_PARTIAL_FAILURE"] = 1014, + ["FILE_CHANGED_DURING_READ"] = 1015, + ["TABLE_SIZE_LIMIT_EXCEEDED"] = 1016, + ["ASYNC_INSERT_FLUSH_TIMEOUT"] = 1017, + ["EXCHANGE_PEER_DISCONNECTED"] = 1018, + ["QUERY_SLOT_ACQUISITION_TIMEOUT"] = 1019, + ["MEMORY_RESERVATION_ACQUISITION_TIMEOUT"] = 1020, + ["AZURE_OBJECT_CHANGED_DURING_READ"] = 1021, + ["SEMI_ANTI_JOIN_COLUMN_ACCESS_DENIED"] = 1022, + ["XGBOOST_ERROR"] = 1023, + ["BUZZHOUSE_ORACLE"] = 1024, + }; +} diff --git a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/HttpBackend.cs b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/HttpBackend.cs new file mode 100644 index 000000000..b451c997a --- /dev/null +++ b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/HttpBackend.cs @@ -0,0 +1,129 @@ +using System.Data.Common; +using ClickHouse.Driver.ADO; +using ClickHouse.Driver.ADO.Readers; +using ClickHouse.Driver.Utility; + +namespace ClickHouse.Driver.TestRunner; + +/// +/// The HTTP client, through its ADO.NET API: from a connection string, +/// , and +/// . +/// +/// +/// All requests of the invocation have the same session id (UseSession, SessionId). The +/// driver sends the database of the connection with each request, and that database replaces the current +/// database of the session, so a USE calls . The +/// driver reads every result as RowBinaryWithNamesAndTypes, so the runner removes the FORMAT clause of +/// a query. Values: ; types: +/// . +/// +internal sealed class HttpBackend : IBackend +{ + private readonly ClickHouseConnection connection; + + public HttpBackend(Options opts, string sessionId, InvocationLog log) + { + var builder = new ClickHouseConnectionStringBuilder + { + Host = opts.Host, + Port = (ushort)HttpPort(opts.Port, opts.Secure), + Protocol = opts.Secure ? "https" : "http", + Username = opts.User, + Password = opts.Password, + Database = opts.Database, + UseSession = true, + SessionId = sessionId, + // Keep the server order of map entries and every repeated key (the default Dictionary mode does + // neither). A documented option of the client. + MapReadMode = MapReadMode.KeyValuePairs, + // String stays string (no ReadStringsAsByteArrays), so a String that is not UTF-8 reads with U+FFFD. + // With byte[] strings, a String and an Array(UInt8) in a Dynamic or Variant value are the same .NET + // value, and the client does not give the type of such a value (shim-http-string-bytes in + // allowlist.txt). + ReadStringsAsByteArrays = false, + // tests/clickhouse-test stops a test after its own timeout; the default of the client is 2 + // minutes. + Timeout = TimeSpan.FromSeconds(600), + }; + connection = new ClickHouseConnection(builder.ConnectionString); + log.Add("session_id", sessionId); + log.Add("connection", builder.Host + ":" + builder.Port); + } + + // The HTTP client keeps the session after an error. + public bool SessionLost => false; + + /// + /// Maps the port that tests/clickhouse-test gives (the native TCP port, from CLICKHOUSE_PORT_TCP) to the + /// HTTP port that the runner exports. Any other port is used as given. + /// + public static int HttpPort(int port, bool secure) + { + var (nativeEnv, httpEnv, nativeDefault, httpDefault) = secure + ? ("CLICKHOUSE_PORT_TCP_SECURE", "CLICKHOUSE_PORT_HTTPS", 9440, 8443) + : ("CLICKHOUSE_PORT_TCP", "CLICKHOUSE_PORT_HTTP", 9000, 8123); + var native = EnvInt(nativeEnv, nativeDefault); + return port != 0 && port != native ? port : EnvInt(httpEnv, httpDefault); + } + + public async Task OpenAsync() => await connection.OpenAsync().ConfigureAwait(false); + + public Task ReopenAsync() => Task.CompletedTask; + + public void UseDatabase(string database) => connection.ChangeDatabase(database); + + public async Task ExecuteAsync(string sql, QueryContext context) + { + await using var cmd = Command(sql, context); + await cmd.ExecuteNonQueryAsync().ConfigureAwait(false); + } + + public async Task QueryAsync(string sql, OutputFormat format, ResultWriter writer, QueryContext context) + { + await using var cmd = Command(sql, context); + await using var reader = (ClickHouseDataReader)await cmd.ExecuteReaderAsync().ConfigureAwait(false); + writer.Renderer.HttpServerTimezone = cmd.ServerTimezone; + var count = reader.FieldCount; + if (count == 0) + { + // A statement with no result block (an empty body). + return; + } + var names = new string[count]; + var types = new string[count]; + for (var i = 0; i < count; i++) + { + names[i] = reader.GetName(i); + types[i] = reader.GetDataTypeName(i); + } + writer.Columns(names, types); + while (await reader.ReadAsync().ConfigureAwait(false)) + { + writer.Row(reader.GetValue); + } + } + + public ValueTask DisposeAsync() + { + ((IDisposable)connection).Dispose(); + return ValueTask.CompletedTask; + } + + private static int EnvInt(string name, int fallback) => + int.TryParse(Environment.GetEnvironmentVariable(name), System.Globalization.NumberStyles.Integer, System.Globalization.CultureInfo.InvariantCulture, out var v) ? v : fallback; + + private ClickHouseCommand Command(string sql, QueryContext context) + { + var cmd = connection.CreateCommand(sql); + foreach (var (name, value) in context.Settings) + { + cmd.CustomSettings[name] = value; + } + foreach (var (name, value) in context.Parameters) + { + cmd.AddParameter(name, value); + } + return cmd; + } +} diff --git a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/IBackend.cs b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/IBackend.cs new file mode 100644 index 000000000..5edaffe90 --- /dev/null +++ b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/IBackend.cs @@ -0,0 +1,28 @@ +namespace ClickHouse.Driver.TestRunner; + +/// +/// One client of this repository, as the shim uses it: one session for the whole invocation. +/// +internal interface IBackend : IAsyncDisposable +{ + /// Gets a value indicating whether the session state (SET, USE, temporary tables) was lost, so + /// that the runner must open the session again and run the USE and SET statements again. + bool SessionLost { get; } + + Task OpenAsync(); + + /// Opens a new session after . + Task ReopenAsync(); + + /// Runs a statement that returns no result set. + Task ExecuteAsync(string sql, QueryContext context); + + /// Runs a statement that returns a result set and writes the rows. + Task QueryAsync(string sql, OutputFormat format, ResultWriter writer, QueryContext context); + + /// Records the new current database of the session after a successful USE. + void UseDatabase(string database); +} + +/// The settings and query parameters that go with one statement. +internal sealed record QueryContext(IReadOnlyDictionary Settings, IReadOnlyDictionary Parameters); diff --git a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/InvocationLog.cs b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/InvocationLog.cs new file mode 100644 index 000000000..5c0834e9f --- /dev/null +++ b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/InvocationLog.cs @@ -0,0 +1,80 @@ +using System.Text; + +namespace ClickHouse.Driver.TestRunner; + +/// +/// Collects troubleshooting lines for one invocation and appends them to the file that +/// CLICKHOUSE_CLIENT_CLI_LOG names. Without that variable, it does nothing. The lines are written in +/// one write, so the lines of parallel invocations do not mix. +/// +internal sealed class InvocationLog +{ + public const string PathEnv = "CLICKHOUSE_CLIENT_CLI_LOG"; + + private readonly string? path; + private readonly StringBuilder lines = new(); + + public InvocationLog(string? path) + { + this.path = string.IsNullOrEmpty(path) ? null : path; + Add("=== clickhouse-client invocation", DateTime.UtcNow.ToString("O", System.Globalization.CultureInfo.InvariantCulture)); + } + + /// + /// Returns the arguments with the value of --password replaced by ***, because the log is a + /// file that CI keeps as an artifact. + /// + public static List RedactPassword(IReadOnlyList argv) + { + var result = new List(argv.Count); + for (var i = 0; i < argv.Count; i++) + { + if (argv[i] == "--password" && i + 1 < argv.Count) + { + result.Add(argv[i]); + result.Add("***"); + i++; + } + else if (argv[i].StartsWith("--password=", StringComparison.Ordinal)) + { + result.Add("--password=***"); + } + else + { + result.Add(argv[i]); + } + } + return result; + } + + public void Add(string key, string value) + { + if (path is null) + { + return; + } + lines.Append(key).Append('=').Append(value.Replace("\n", "\\n", StringComparison.Ordinal)).Append('\n'); + } + + /// + /// Appends the lines to the log file. A log that cannot be written must not change the result of a test, + /// so a write error is ignored; the missing lines in the log show it. + /// + public void Flush() + { + if (path is null) + { + return; + } + try + { + File.AppendAllText(path, lines.ToString()); + } + catch (IOException) + { + } + catch (UnauthorizedAccessException) + { + } + } +} diff --git a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/Options.cs b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/Options.cs new file mode 100644 index 000000000..a41acdd04 --- /dev/null +++ b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/Options.cs @@ -0,0 +1,243 @@ +using System.Globalization; +using System.Text.RegularExpressions; + +namespace ClickHouse.Driver.TestRunner; + +/// +/// The clickhouse-client command line, as far as tests/clickhouse-test and the tests use it. +/// +internal sealed partial class Options +{ + public const string UsageText = """ + usage: clickhouse-client [options] + + A clickhouse-client imitation that runs queries through ClickHouse.Driver, so that the ClickHouse + tests/clickhouse-test runner can drive it. If --query is not given, the queries are read from stdin. + Every ";"-separated statement runs. + + Options: + -h, --host HOST Server host (default: localhost) + --port PORT Server port. The native TCP port of the test runner + (CLICKHOUSE_PORT_TCP) maps to CLICKHOUSE_PORT_HTTP when the protocol + is http. + -u, --user USER User name (default: default) + --password PASSWORD Password (default: empty) + -d, --database DB Database (default: default) + -q, --query SQL Queries to run + -s, --secure Use TLS + --param_NAME=VALUE Query parameter + --SETTING=VALUE log_comment, max_insert_threads, max_threads and send_logs_level go + to the server, and async_insert and enable_parallel_replicas with the + value 0; other settings are ignored + -n, --multiquery Ignored + -m, --multiline Ignored + --help Show this help + + Environment variables: + CLICKHOUSE_TEST_RUNNER_PROTOCOL http (default) or tcp + CLICKHOUSE_CLIENT_CLI_LOG Log file for troubleshooting + + """; + + // The command-line settings that the shim sends to the server. tests/clickhouse-test also adds many + // randomized settings to the command line. The shim drops them: they only change performance-related + // paths in the server, and some of them are client-only. + private static readonly HashSet ServerSettings = new(StringComparer.Ordinal) + { + "log_comment", "max_insert_threads", "max_threads", "send_logs_level", + }; + + // The feature-tag overrides of tests/clickhouse-test: a test with the tag `no-async-insert` or + // `no-parallel-replicas` gets `--async_insert 0` or `--enable_parallel_replicas 0`, because it needs the + // feature off (`async_insert` is on by default in current servers). The shim sends only the value 0: with + // randomized settings, tests/clickhouse-test can also give `--enable_parallel_replicas 1` together with + // other parallel-replica settings, which the shim drops. + private static readonly HashSet FeatureOffSettings = new(StringComparer.Ordinal) + { + "async_insert", "enable_parallel_replicas", + }; + + private static readonly OptionSpec[] KnownOptions = + [ + new("host", "h", true), + new("port", null, true), + new("user", "u", true), + new("password", null, true), + new("database", "d", true), + new("query", "q", true), + new("secure", "s", false), + new("no-secure", null, false), + // As in clickhouse-client: `-n` is `--multiquery`, `-m` is `--multiline`. The shim always runs every + // statement of the input. + new("multiquery", "n", false), + new("multi-query", null, false), + new("multiline", "m", false), + new("help", null, false), + // Accepted and ignored. + new("config-file", "C", true), + new("client_logs_file", null, true), + new("allow_repeated_settings", null, false), + new("fake-drop", null, false), + ]; + + public string Host { get; private set; } = "localhost"; + + /// Gets the port, or 0 when it is not given. + public int Port { get; private set; } + + public string User { get; private set; } = "default"; + + public string Password { get; private set; } = string.Empty; + + public string Database { get; private set; } = "default"; + + public bool Secure { get; private set; } + + public string? Query { get; private set; } + + public bool Help { get; private set; } + + /// Gets the server settings of the command line, in the order they were given. + public List> Settings { get; } = []; + + /// Gets the query parameters from --param_<name>=<value>. + public Dictionary Params { get; } = new(StringComparer.Ordinal); + + public static Options Parse(IReadOnlyList argv) + { + var opts = new Options(); + for (var i = 0; i < argv.Count; i++) + { + var arg = argv[i]; + if (arg == "--") + { + return opts; + } + if (arg.StartsWith("--", StringComparison.Ordinal)) + { + var body = arg[2..]; + var eq = body.IndexOf('=', StringComparison.Ordinal); + var name = eq >= 0 ? body[..eq] : body; + string? value = eq >= 0 ? body[(eq + 1)..] : null; + if (name.Length == 0) + { + continue; + } + if (Find(name, null) is { } o) + { + if (!o.HasArg) + { + opts.Set(o.Long, string.Empty); + continue; + } + if (value is null) + { + if (i + 1 >= argv.Count) + { + throw new ArgumentException($"option --{name} needs a value"); + } + value = argv[++i]; + } + opts.Set(o.Long, value); + continue; + } + // Any other long option is a setting (`--max_threads=1`) or a query parameter + // (`--param_x=1`). The value is optional. + if (value is null && i + 1 < argv.Count) + { + var next = argv[i + 1]; + if (!next.StartsWith('-') || NegativeNumber().IsMatch(next)) + { + value = next; + i++; + } + } + value ??= "1"; + if (name.StartsWith("param_", StringComparison.Ordinal)) + { + opts.Params[name["param_".Length..]] = value; + continue; + } + var setting = name.Replace('-', '_'); + if (ServerSettings.Contains(setting) || (FeatureOffSettings.Contains(setting) && value == "0")) + { + var index = opts.Settings.FindIndex(kv => kv.Key == setting); + if (index >= 0) + { + opts.Settings[index] = new(setting, value); + } + else + { + opts.Settings.Add(new(setting, value)); + } + } + } + else if (arg.Length > 1 && arg[0] == '-') + { + if (Find(null, arg[1..]) is not { } o) + { + // Unknown short options are ignored, as the other language ports do. + continue; + } + if (!o.HasArg) + { + opts.Set(o.Long, string.Empty); + continue; + } + if (i + 1 >= argv.Count) + { + throw new ArgumentException($"option {arg} needs a value"); + } + opts.Set(o.Long, argv[++i]); + } + // Positional arguments are ignored. + } + return opts; + } + + private static OptionSpec? Find(string? longName, string? shortName) => + KnownOptions.FirstOrDefault(o => (longName != null && o.Long == longName) || (shortName != null && o.Short == shortName)); + + [GeneratedRegex(@"^-(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?$")] + private static partial Regex NegativeNumber(); + + private void Set(string name, string value) + { + switch (name) + { + case "host": + Host = value; + break; + case "port": + if (!int.TryParse(value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var port)) + { + throw new ArgumentException($"bad --port value \"{value}\""); + } + Port = port; + break; + case "user": + User = value; + break; + case "password": + Password = value; + break; + case "database": + Database = value; + break; + case "query": + Query = value; + break; + case "secure": + Secure = true; + break; + case "no-secure": + Secure = false; + break; + case "help": + Help = true; + break; + } + } + + private sealed record OptionSpec(string Long, string? Short, bool HasArg); +} diff --git a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/OutputFormat.cs b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/OutputFormat.cs new file mode 100644 index 000000000..deda4cdb3 --- /dev/null +++ b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/OutputFormat.cs @@ -0,0 +1,296 @@ +namespace ClickHouse.Driver.TestRunner; + +/// How the shim writes a result set. +internal sealed record OutputFormat( + string Name, + bool Supported, + bool Names = false, + bool Types = false, + bool Raw = false, + bool Discard = false) +{ + public static readonly OutputFormat Default = new("TabSeparated", Supported: true); + + // The leading keywords of the statements that return a result set. The shim reads their rows, and runs + // the other statements without a result. + private static readonly HashSet ResultKeywords = new(StringComparer.Ordinal) + { + "SELECT", "WITH", "SHOW", "DESC", "DESCRIBE", "EXISTS", "EXPLAIN", "CHECK", + // KILL QUERY and KILL MUTATION return a row for each query or mutation that they stop. + "KILL", + // FROM-first syntax: FROM t SELECT x, and pipe syntax: FROM t |> ... + "FROM", + }; + + public static bool ReturnsRows(string sql) => ResultKeywords.Contains(Statements.LeadingKeyword(sql)); + + /// + /// Tells if the trailing FORMAT clause of an EXPLAIN statement belongs to the explained query, as in + /// ParserExplainQuery. Then the format is part of the query text, and the output format of the + /// EXPLAIN is the default one. + /// + /// + /// + /// An explained INSERT keeps the format of its own data: an INSERT without SELECT, with + /// FROM INFILE, or with the input table function. + /// EXPLAIN AST parses the explained query with its output clauses. A query in parentheses is parsed + /// with them only when it is a SELECT (the shim checks the first word in the parentheses); for another + /// query in parentheses the FORMAT after the parentheses is the output format of the EXPLAIN. + /// + /// + public static bool ExplainedQueryOwnsFormat(string sql) + { + var words = Statements.TopLevelWords(sql); + if (words.Count < 2 || !Is(words[0], "EXPLAIN")) + { + return false; + } + var insert = words.FindIndex(w => Is(w, "INSERT")); + var query = words.FindIndex(w => Is(w, "SELECT") || Is(w, "WITH") || Is(w, "FROM")); + if (insert >= 0 && (query < 0 || insert < query)) + { + // The words after INSERT, also in parentheses: INSERT INTO t (SELECT 1), FROM (SELECT * FROM input(...)). + var all = Statements.TopLevelWords(sql, nested: true); + var rest = all.Skip(all.FindIndex(w => Is(w, "INSERT"))).ToList(); + var select = rest.Exists(w => Is(w, "SELECT")); + var infile = rest.Exists(w => Is(w, "INFILE")); + var input = CallsInput(sql); + return !select || infile || input; + } + if (!Is(words[1], "AST")) + { + return false; + } + // The first token of the explained query. + var i = SkipWord(sql, SkipWord(sql, Statements.SkipWhitespaceAndComments(sql, 0))); + if (i >= sql.Length || sql[i] != '(') + { + return true; + } + // A SELECT in parentheses. In `((SELECT 1) SETTINGS max_threads = 1) FORMAT TSV` the explained query is not a + // SELECT, so the FORMAT is the output format of the EXPLAIN. + i = Statements.SkipWhitespaceAndComments(sql, i + 1); + var j = i; + while (j < sql.Length && ChType.IsWordChar(sql[j])) + { + j++; + } + return Is(sql[i..j], "SELECT") || Is(sql[i..j], "WITH"); + + static bool Is(string word, string keyword) => string.Equals(word, keyword, StringComparison.OrdinalIgnoreCase); + + // Tells if the text calls the `input` table function: the word `input` before `(`, outside quotes and + // comments, at any depth (a column named `input` does not count). + static bool CallsInput(string text) + { + for (var i = 0; i < text.Length;) + { + var c = text[i]; + if (c is '\'' or '"' or '`') + { + i = Statements.SkipQuoted(text, i); + } + else if (Statements.StartsLineComment(text, i)) + { + i = Statements.SkipLineComment(text, i); + } + else if (Statements.StartsBlockComment(text, i)) + { + i = Statements.SkipBlockComment(text, i); + } + else if (ChType.IsWordChar(c)) + { + var j = i; + while (j < text.Length && ChType.IsWordChar(text[j])) + { + j++; + } + var k = Statements.SkipWhitespaceAndComments(text, j); + if (Is(text[i..j], "input") && k < text.Length && text[k] == '(') + { + return true; + } + i = j; + } + else + { + i++; + } + } + return false; + } + + // Returns the position after the word at i and the whitespace and comments after it. + static int SkipWord(string text, int i) + { + while (i < text.Length && ChType.IsWordChar(text[i])) + { + i++; + } + return Statements.SkipWhitespaceAndComments(text, i); + } + } + + /// + /// Removes a top-level FORMAT <name> clause from a result-set statement and returns the + /// statement and the format. + /// + /// + /// The clients read results as RowBinary (HTTP) or Native (TCP) and the shim writes them as TabSeparated, + /// so only the TabSeparated family and Null can be written. A statement with another format fails. + /// + public static (string Sql, OutputFormat Format) Split(string sql) + { + var (start, end, name) = FindFormatClause(sql); + if (start < 0) + { + return (sql, Default); + } + var f = name.ToLowerInvariant() switch + { + "tabseparated" or "tsv" => new OutputFormat(name, true), + "tabseparatedwithnames" or "tsvwithnames" => new OutputFormat(name, true, Names: true), + "tabseparatedwithnamesandtypes" or "tsvwithnamesandtypes" => new OutputFormat(name, true, Names: true, Types: true), + "tabseparatedraw" or "tsvraw" or "raw" => new OutputFormat(name, true, Raw: true), + "tabseparatedrawwithnames" or "tsvrawwithnames" or "rawwithnames" => new OutputFormat(name, true, Names: true, Raw: true), + "tabseparatedrawwithnamesandtypes" or "tsvrawwithnamesandtypes" or "rawwithnamesandtypes" => new OutputFormat(name, true, Names: true, Types: true, Raw: true), + "null" => new OutputFormat(name, true, Discard: true), + _ => new OutputFormat(name, false), + }; + return (sql[..start] + sql[end..], f); + } + + // Returns the position of a top-level `FORMAT ` clause, or start = -1. + private static (int Start, int End, string Name) FindFormatClause(string sql) + { + var depth = 0; + for (var i = 0; i < sql.Length;) + { + var c = sql[i]; + if (c is '\'' or '"' or '`') + { + i = Statements.SkipQuoted(sql, i); + } + else if (Statements.StartsLineComment(sql, i)) + { + i = Statements.SkipLineComment(sql, i); + } + else if (Statements.StartsBlockComment(sql, i)) + { + i = Statements.SkipBlockComment(sql, i); + } + else if (c == '$') + { + var e = Statements.HeredocEnd(sql, i); + i = e > 0 ? e : i + 1; + } + else if (c is '(' or '[') + { + depth++; + i++; + } + else if (c is ')' or ']') + { + depth--; + i++; + } + else if (ChType.IsWordChar(c)) + { + var j = i; + while (j < sql.Length && ChType.IsWordChar(sql[j])) + { + j++; + } + if (depth == 0 && string.Equals(sql[i..j], "FORMAT", StringComparison.OrdinalIgnoreCase) && (i == 0 || sql[i - 1] != '.')) + { + // `ORDER BY format DESC` ends the query too: a clause keyword after FORMAT shows an + // identifier named `format`. Where an operand is expected, `format` is a name with an + // implicit alias: `SELECT * FROM format f`. + if (FormatName(sql, j) is { } fn && !Statements.IsClauseKeyword(fn.Name) && EndsQuery(sql, fn.End) && + !Statements.OperandExpected(sql, 0, i)) + { + return (i, fn.End, fn.Name); + } + } + i = j; + } + else + { + i++; + } + } + return (-1, -1, string.Empty); + } + + // Reads the format name after the FORMAT keyword that ends at j. + private static (int End, string Name)? FormatName(string sql, int j) + { + var k = Statements.SkipWhitespaceAndComments(sql, j); + if (k == j || k >= sql.Length) + { + return null; + } + if (sql[k] is '`' or '"') + { + // A quoted format name: FORMAT `Null`. + var m = Statements.SkipQuoted(sql, k); + return Identifiers.Unquote(sql[k..m]) is { } unquoted ? (m, unquoted) : null; + } + var e = k; + while (e < sql.Length && ChType.IsWordChar(sql[e])) + { + e++; + } + return e == k ? null : (e, sql[k..e]); + } + + // Tells if the text from i on can follow the FORMAT clause of a query: nothing, a semicolon, or a + // SETTINGS clause. Otherwise FORMAT is an identifier, as in `SELECT format FROM t`. + private static bool EndsQuery(string sql, int i) + { + var k = Statements.SkipWhitespaceAndComments(sql, i); + if (k >= sql.Length || sql[k] == ';') + { + return true; + } + var m = k; + while (m < sql.Length && ChType.IsWordChar(sql[m])) + { + m++; + } + return string.Equals(sql[k..m], "SETTINGS", StringComparison.OrdinalIgnoreCase); + } +} + +/// Quoted SQL identifiers. +internal static class Identifiers +{ + /// Removes the quotes (` or ") of an identifier and resolves its escapes. + public static string? Unquote(string s) + { + if (s.Length < 2 || s[^1] != s[0]) + { + return null; + } + var q = s[0]; + var sb = new System.Text.StringBuilder(); + for (var i = 1; i < s.Length - 1; i++) + { + var c = s[i]; + if (c == '\\' && i + 1 < s.Length - 1) + { + sb.Append(s[++i]); + } + else if (c == q && i + 1 < s.Length - 1 && s[i + 1] == q) + { + sb.Append(q); + i++; + } + else + { + sb.Append(c); + } + } + return sb.ToString(); + } +} diff --git a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/OutputSettings.cs b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/OutputSettings.cs new file mode 100644 index 000000000..1bfcbf053 --- /dev/null +++ b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/OutputSettings.cs @@ -0,0 +1,101 @@ +namespace ClickHouse.Driver.TestRunner; + +/// The forms of date_time_output_format. +internal enum DateTimeOutputFormat +{ + /// simple (the default): 2020-10-15 00:00:00 in the zone of the type. + Simple, + + /// iso: 2020-10-14T21:00:00Z, always UTC. + Iso, + + /// unix_timestamp: 1602709200, or 1602709200.12 for a DateTime64(2). + UnixTimestamp, +} + +/// +/// The settings that change the server's text output and that the renderer follows. The shim writes the values +/// itself, so it must write them as the server would with these settings. Their values come from the +/// SET statements of the session and the SETTINGS clause of the query. +/// +/// date_time_output_format. +/// format_tsv_null_representation: a NULL at the top level. +/// output_format_decimal_trailing_zeros. +/// date_time_64_output_format_cut_trailing_zeros_align_to_groups_of_thousands. +internal sealed record OutputSettings(DateTimeOutputFormat DateTimeFormat, string NullText, bool DecimalTrailingZeros, bool CutDateTime64TrailingZeros) +{ + /// The server defaults. + public static readonly OutputSettings Default = new(DateTimeOutputFormat.Simple, "\\N", false, false); + + /// The names of the settings that this record holds. + public static readonly IReadOnlySet Names = new HashSet(StringComparer.Ordinal) + { + "date_time_output_format", "format_tsv_null_representation", "output_format_decimal_trailing_zeros", + "date_time_64_output_format_cut_trailing_zeros_align_to_groups_of_thousands", + }; + + /// Makes the settings from setting values (string values without quotes, escapes not resolved). + /// A date_time_output_format that the shim does not know. + public static OutputSettings From(IReadOnlyDictionary values) + { + var s = Default; + if (values.TryGetValue("date_time_output_format", out var f)) + { + s = s with + { + DateTimeFormat = f.ToLowerInvariant() switch + { + "simple" => DateTimeOutputFormat.Simple, + "iso" => DateTimeOutputFormat.Iso, + "unix_timestamp" => DateTimeOutputFormat.UnixTimestamp, + _ => throw new NotSupportedException($"clickhouse-test-runner: date_time_output_format '{f}' is not supported"), + }, + }; + } + if (values.TryGetValue("format_tsv_null_representation", out var n)) + { + s = s with { NullText = Unescape(n) }; + } + if (values.TryGetValue("output_format_decimal_trailing_zeros", out var z)) + { + s = s with { DecimalTrailingZeros = IsTrue(z) }; + } + if (values.TryGetValue("date_time_64_output_format_cut_trailing_zeros_align_to_groups_of_thousands", out var c)) + { + s = s with { CutDateTime64TrailingZeros = IsTrue(c) }; + } + return s; + } + + private static bool IsTrue(string value) => value == "1" || string.Equals(value, "true", StringComparison.OrdinalIgnoreCase); + + // Resolves the backslash escapes of a SQL string literal (the quotes are already removed). + internal static string Unescape(string literal) + { + if (!literal.Contains('\\', StringComparison.Ordinal)) + { + return literal; + } + var sb = new System.Text.StringBuilder(literal.Length); + for (var i = 0; i < literal.Length; i++) + { + var c = literal[i]; + if (c != '\\' || i + 1 == literal.Length) + { + sb.Append(c); + continue; + } + sb.Append(literal[++i] switch + { + 't' => '\t', + 'n' => '\n', + 'r' => '\r', + '0' => '\0', + 'b' => '\b', + 'f' => '\f', + var other => other, + }); + } + return sb.ToString(); + } +} diff --git a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/Program.cs b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/Program.cs new file mode 100644 index 000000000..1e699c461 --- /dev/null +++ b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/Program.cs @@ -0,0 +1,176 @@ +using System.Security.Cryptography; +using System.Text; + +namespace ClickHouse.Driver.TestRunner; + +/// +/// Imitates clickhouse-client well enough for the ClickHouse core test runner +/// (tests/clickhouse-test) to drive it, and runs every query through a client of this repository. It +/// reads the values that the client decoded and writes them as TabSeparated text, so the upstream +/// .reference files check the decoding of the client. See ../README.md. +/// +internal static class Program +{ + public const string ProtocolEnv = "CLICKHOUSE_TEST_RUNNER_PROTOCOL"; + + public static async Task Main(string[] args) + { + using var stdout = Console.OpenStandardOutput(); + using var stderr = new StreamWriter(Console.OpenStandardError(), new UTF8Encoding(false)) { AutoFlush = true }; + return await RunAsync(args, Console.OpenStandardInput(), stdout, stderr).ConfigureAwait(false); + } + + /// The command line. + /// The input. + /// The output. + /// The error output. + /// The protocol, or null for CLICKHOUSE_TEST_RUNNER_PROTOCOL. + public static async Task RunAsync(string[] argv, Stream stdin, Stream stdout, TextWriter stderr, Protocol? protocol = null) + { + if (argv.Length > 0 && argv[0] == "extract-from-config") + { + return ExtractFromConfig(argv[1..], stdout); + } + + var log = new InvocationLog(Environment.GetEnvironmentVariable(InvocationLog.PathEnv)); + try + { + log.Add("argv", string.Join(' ', InvocationLog.RedactPassword(argv))); + return await RunCoreAsync(argv, stdin, stdout, stderr, log, protocol).ConfigureAwait(false); + } + finally + { + log.Flush(); + } + } + + public static Protocol ProtocolFromEnvironment() => Environment.GetEnvironmentVariable(ProtocolEnv) switch + { + null or "" or "http" => Protocol.Http, + "tcp" => Protocol.Tcp, + var v => throw new ArgumentException($"unknown {ProtocolEnv} \"{v}\": use http or tcp"), + }; + + private static async Task RunCoreAsync(string[] argv, Stream stdin, Stream stdout, TextWriter stderr, InvocationLog log, Protocol? protocolOverride) + { + Options opts; + Protocol protocol; + try + { + opts = Options.Parse(argv); + protocol = protocolOverride ?? ProtocolFromEnvironment(); + } + catch (ArgumentException e) + { + await stderr.WriteAsync($"Error: {e.Message}\n\n{Options.UsageText}").ConfigureAwait(false); + return 1; + } + if (opts.Help) + { + await stdout.WriteAsync(Encoding.UTF8.GetBytes(Options.UsageText)).ConfigureAwait(false); + return 0; + } + log.Add("protocol", protocol.ToString().ToLowerInvariant()); + + string text; + if (opts.Query is not null) + { + text = opts.Query; + } + else + { + using var reader = new StreamReader(stdin, new UTF8Encoding(false)); + text = await reader.ReadToEndAsync().ConfigureAwait(false); + } + if (string.IsNullOrWhiteSpace(text)) + { + await stderr.WriteLineAsync("Error: no query. Use --query or write the queries to stdin.").ConfigureAwait(false); + return 1; + } + + var statements = Statements.Split(text); + log.Add("statements", statements.Count.ToString(System.Globalization.CultureInfo.InvariantCulture)); + if (statements.Count == 0) + { + return 0; + } + + TcpBackend? tcp = null; + IBackend backend; + if (protocol == Protocol.Tcp) + { + backend = tcp = new TcpBackend(opts, log); + } + else + { + backend = new HttpBackend(opts, "clickhouse-cs-test-runner-" + Convert.ToHexStringLower(RandomNumberGenerator.GetBytes(16)), log); + } + var renderer = new ValueRenderer(tcp is null ? null : () => tcp.ServerTimeZone); + await using (backend.ConfigureAwait(false)) + { + try + { + var runner = new Runner(opts, backend, protocol, stdout, log, renderer); + await runner.RunAsync(statements).ConfigureAwait(false); + await stdout.FlushAsync().ConfigureAwait(false); + return 0; + } + catch (Exception e) when (e is not OutOfMemoryException) + { + log.Add("error", e.ToString()); + return await ReportErrorAsync(stderr, e).ConfigureAwait(false); + } + } + } + + /// + /// Writes the error to stderr and returns the exit code. As in clickhouse-client, the exit code is + /// the error code modulo 256 when it is a server error. + /// + private static async Task ReportErrorAsync(TextWriter stderr, Exception e) + { + int code; + if (e is HintException hint) + { + await stderr.WriteLineAsync("Error: " + hint.Message).ConfigureAwait(false); + code = hint.Code; + } + else if (ServerError.From(e) is { } server) + { + await stderr.WriteLineAsync("Received exception from server:\n" + server.Format()).ConfigureAwait(false); + code = server.Code; + } + else + { + await stderr.WriteLineAsync($"Error: {e.GetType().Name}: {e.Message}").ConfigureAwait(false); + code = 0; + } + return code % 256 != 0 ? code % 256 : 1; + } + + /// + /// Answers clickhouse extract-from-config --key <key>, which tests/clickhouse-test runs to read + /// the server config. Only listen_host has an answer; for other keys the output is empty, as for a + /// key that is not in the config. + /// + private static int ExtractFromConfig(string[] argv, Stream stdout) + { + string? key = null; + for (var i = 0; i < argv.Length; i++) + { + if (argv[i] == "--key" && i + 1 < argv.Length) + { + key = argv[++i]; + } + else if (argv[i].StartsWith("--key=", StringComparison.Ordinal)) + { + key = argv[i]["--key=".Length..]; + } + } + if (key == "listen_host") + { + stdout.Write("127.0.0.1\n"u8); + } + return 0; + } +} diff --git a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ResultWriter.cs b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ResultWriter.cs new file mode 100644 index 000000000..6fef2f529 --- /dev/null +++ b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ResultWriter.cs @@ -0,0 +1,107 @@ +using ClickHouse.Driver.Tcp; + +namespace ClickHouse.Driver.TestRunner; + +/// Writes one result set in a format of the TabSeparated family. +internal sealed class ResultWriter +{ + private readonly Utf8Buffer output; + private readonly OutputFormat format; + private readonly ValueRenderer renderer; + private ChType[] types = []; + private bool headerWritten; + + public ResultWriter(Utf8Buffer output, OutputFormat format, ValueRenderer renderer) + { + this.output = output; + this.format = format; + this.renderer = renderer; + } + + public ValueRenderer Renderer => renderer; + + /// Appends rows that another writer wrote (the totals or the extremes). + public void Append(Utf8Buffer rows) => output.Append(rows); + + /// + /// Sets the columns. It writes the header lines of the WithNames formats the first time. + /// + /// The column names. + /// The column type names, as the client gives them. + public void Columns(IReadOnlyList names, IReadOnlyList typeNames) + { + if (types.Length != typeNames.Count || !headerWritten) + { + types = typeNames.Select(ChType.Parse).ToArray(); + } + if (headerWritten || format.Discard) + { + headerWritten = true; + return; + } + headerWritten = true; + if (format.Names) + { + HeaderLine(names); + } + if (format.Types) + { + HeaderLine(typeNames); + } + } + + /// Writes one row. gives the value of column i. + /// The value of a column. + /// TCP only: the column of index i, so that the renderer can take time zones and enum + /// labels from the client. + /// TCP only: the row in . + public void Row(Func value, Func? column = null, int row = -1) + { + if (format.Discard) + { + // `FORMAT Null`: the values are read, but not written. + for (var i = 0; i < types.Length; i++) + { + _ = value(i); + } + return; + } + for (var i = 0; i < types.Length; i++) + { + if (i > 0) + { + output.Append((byte)'\t'); + } + var v = value(i); + var c = column?.Invoke(i); + if (format.Raw && ValueRenderer.IsStringType(types[i]) && renderer.TryRenderRaw(output, types[i], v, c, row)) + { + continue; + } + renderer.Render(output, types[i], v, false, c, row); + } + output.Append((byte)'\n'); + } + + /// Writes the empty line before the totals or the extremes. + public void Separator() + { + if (!format.Discard) + { + output.Append((byte)'\n'); + } + } + + private void HeaderLine(IReadOnlyList values) + { + for (var i = 0; i < values.Count; i++) + { + if (i > 0) + { + output.Append((byte)'\t'); + } + output.AppendEscaped(values[i], false); + } + output.Append((byte)'\n'); + } +} diff --git a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/Runner.cs b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/Runner.cs new file mode 100644 index 000000000..ff334dbc6 --- /dev/null +++ b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/Runner.cs @@ -0,0 +1,402 @@ +using System.Runtime.ExceptionServices; + +namespace ClickHouse.Driver.TestRunner; + +/// +/// Runs the statements of one shim invocation on one session. +/// +/// +/// Session state (SET, USE, temporary tables) must survive from one statement to the next, as in +/// clickhouse-client. When the backend loses the session (the TCP client closes the connection after +/// a server exception), the runner opens a new session and runs the USE and SET statements of +/// the invocation again. Other session state, such as temporary tables, is lost. +/// +/// The shim sends nothing that clickhouse-client does not send, because some tests read their own +/// queries from system.query_log. +/// +internal sealed class Runner +{ + private readonly Options opts; + private readonly IBackend backend; + private readonly Protocol protocol; + private readonly Stream stdout; + private readonly InvocationLog log; + private readonly ValueRenderer renderer; + + // The command-line settings that go with each query, as clickhouse-client sends them. A `SET` of the + // same setting in the test removes it from here, because the session then holds the value. + private readonly Dictionary settings = new(StringComparer.Ordinal); + + // The session values of the output settings (OutputSettings.Names) from the `SET` statements of the test. + private readonly Dictionary outputSettings = new(StringComparer.Ordinal); + + // The `USE` and `SET` statements of the test. They rebuild the session state on a new session. + private readonly List sessionInit = []; + + // The output of the current statement, until the runner knows whether it echoes the statement first. + private readonly Utf8Buffer result = new(); + private readonly Utf8Buffer echoBuffer = new(); + + // The value of the last `SET dialect`. + private string dialect = string.Empty; + + // Set by `SET implicit_select = 1`, with which an expression alone (`1 + 2`) is a query. + private bool implicitSelect; + + public Runner(Options opts, IBackend backend, Protocol protocol, Stream stdout, InvocationLog log, ValueRenderer renderer) + { + this.opts = opts; + this.backend = backend; + this.protocol = protocol; + this.stdout = stdout; + this.log = log; + this.renderer = renderer; + foreach (var (name, value) in opts.Settings) + { + settings[name] = value; + } + } + + /// + /// Runs the statements in order. It stops at the first statement whose result does not match its test + /// hint, like clickhouse-client. + /// + public async Task RunAsync(IReadOnlyList statements) + { + await backend.OpenAsync().ConfigureAwait(false); + foreach (var st in statements) + { + await RunOneAsync(st).ConfigureAwait(false); + } + } + + /// Returns the database name of a USE statement; a {name:Identifier} query + /// parameter is replaced by its value. + internal static string? ParseUseDatabase(string sql, IReadOnlyDictionary parameters) + { + var i = Statements.SkipWhitespaceAndComments(sql, 0) + "USE".Length; + var rest = sql[i..].Trim(); + rest = rest.EndsWith(';') ? rest[..^1].Trim() : rest; + var space = rest.IndexOf(' ', StringComparison.Ordinal); + if (space > 0 && string.Equals(rest[..space], "DATABASE", StringComparison.OrdinalIgnoreCase)) + { + rest = rest[space..].Trim(); + } + if (rest.Length == 0) + { + return null; + } + switch (rest[0]) + { + case '`' or '"': + return Identifiers.Unquote(rest); + case '{': + { + var inner = rest.Trim('{', '}'); + var colon = inner.IndexOf(':', StringComparison.Ordinal); + return colon < 0 ? null : parameters.GetValueOrDefault(inner[..colon].Trim()); + } + } + return rest.All(ChType.IsWordChar) ? rest : null; + } + + /// Returns the settings that a SET a = 1, b = 'x' statement assigns, with their values + /// (string values without quotes). + internal static Dictionary ParseSetAssignments(string sql) + { + var i = Statements.SkipWhitespaceAndComments(sql, 0) + "SET".Length; + var body = sql[i..].Trim(); + body = body.EndsWith(';') ? body[..^1] : body; + var output = new Dictionary(StringComparer.Ordinal); + void Add(string part) + { + var eq = part.IndexOf('=', StringComparison.Ordinal); + if (eq < 0) + { + return; + } + var value = part[(eq + 1)..].Trim(); + if (value.Length >= 2 && value[0] == '\'' && value[^1] == '\'') + { + value = value[1..^1]; + } + output[part[..eq].Trim()] = value; + } + int depth = 0, start = 0; + for (var j = 0; j < body.Length; j++) + { + switch (body[j]) + { + case '\'' or '"' or '`': + j = Statements.SkipQuoted(body, j) - 1; + break; + case '(' or '[': + depth++; + break; + case ')' or ']': + depth--; + break; + case ',' when depth == 0: + Add(body[start..j]); + start = j + 1; + break; + } + } + Add(body[start..]); + return output; + } + + /// + /// Tells if a SET statement changes the state of the session. SET DEFAULT ROLE ... TO user is + /// an access-control statement: it changes the user, so a new session must not run it again. + /// + internal static bool IsSessionSet(string sql) + { + var words = Statements.TopLevelWords(sql); + return !(words.Count >= 3 && + string.Equals(words[1], "DEFAULT", StringComparison.OrdinalIgnoreCase) && + string.Equals(words[2], "ROLE", StringComparison.OrdinalIgnoreCase)); + } + + private async Task RunOneAsync(Statement st) + { + if (st.Hint.ParseError is { } parseError) + { + WriteEcho(st); + Flush(); + throw new HintException(parseError, 0); + } + if (backend.SessionLost) + { + await InitSessionAsync().ConfigureAwait(false); + } + + log.Add("query", st.Sql); + result.Clear(); + Exception? error = null; + try + { + await ExecuteAsync(st.Sql).ConfigureAwait(false); + } + catch (Exception e) when (e is not OutOfMemoryException) + { + error = e; + } + var serverError = error is null ? null : ServerError.From(error); + + // clickhouse-client parses a statement before it echoes it, so it does not echo a statement with a + // syntax error. A parse error fails a hint that expects only server errors (ClientBase::executeMultiQuery), + // so with such a hint the client parsed the statement and the server found the syntax error at run time, + // as in formatQuery('...') or a table function argument: then the statement is echoed. + var serverOnlyHint = st.Hint.ServerErrors.Count > 0 && st.Hint.ClientErrors.Count == 0; + if (serverError?.Code != ErrorCodes.SyntaxError || serverOnlyHint) + { + WriteEcho(st); + } + stdout.Write(result.Span); + Flush(); + + if (st.Hint.ExpectsError && error is null) + { + throw new HintException($"expected {st.Hint.Label}, but the query succeeded (query: {st.Full})", 0); + } + if (st.Hint.ExpectsError && serverError is not null) + { + if (!st.Hint.Matches(serverError.Code)) + { + throw new HintException($"expected {st.Hint.Label}, but got {serverError.Format()} (query: {st.Full})", serverError.Code); + } + log.Add("expected_error_matched", st.Hint.Label); + return; + } + if (error is not null) + { + // Keep the stack trace of the throw site (client or renderer) for the invocation log. + ExceptionDispatchInfo.Throw(error); + } + AfterSuccess(st.Sql); + } + + // Runs the statements that rebuild the session state on a new session. + private async Task InitSessionAsync() + { + await backend.ReopenAsync().ConfigureAwait(false); + foreach (var q in sessionInit) + { + log.Add("session_init", q); + try + { + await backend.ExecuteAsync(q, Context(q)).ConfigureAwait(false); + } + catch (Exception e) when (e is not OutOfMemoryException) + { + throw new InvalidOperationException($"initialize the session again with \"{q}\": {e.Message}", e); + } + } + } + + private void WriteEcho(Statement st) + { + if (st.Echo) + { + echoBuffer.Clear(); + echoBuffer.Append(st.Full); + echoBuffer.Append((byte)'\n'); + stdout.Write(echoBuffer.Span); + } + } + + private void Flush() => stdout.Flush(); + + // Updates the session state after a USE or SET statement. + private void AfterSuccess(string sql) + { + switch (Statements.LeadingKeyword(sql)) + { + case "USE": + { + var db = ParseUseDatabase(sql, opts.Params) ?? throw new InvalidOperationException($"clickhouse-test-runner: cannot read the database name of \"{sql}\""); + sessionInit.Add(sql); + backend.UseDatabase(db); + break; + } + case "SET" when IsSessionSet(sql): + sessionInit.Add(sql); + foreach (var (name, value) in ParseSetAssignments(sql)) + { + settings.Remove(name); + if (OutputSettings.Names.Contains(name)) + { + outputSettings[name] = value; + } + switch (name) + { + case "dialect": + dialect = value; + break; + case "implicit_select": + implicitSelect = value != "0" && !string.Equals(value, "false", StringComparison.OrdinalIgnoreCase); + break; + } + } + break; + } + } + + // The settings and the query parameters of a statement. Only the parameters that the statement uses go + // with it: the TCP client needs the type of each parameter from its placeholder, and it does not see a + // placeholder in a string literal or a comment (the server does not substitute one there either). + private QueryContext Context(string sql) + { + var parameters = new Dictionary(StringComparer.Ordinal); + if (opts.Params.Count > 0) + { + foreach (var name in Statements.ParameterNames(sql)) + { + if (opts.Params.TryGetValue(name, out var value)) + { + parameters[name] = value; + } + } + } + return new QueryContext(new Dictionary(settings, StringComparer.Ordinal), parameters); + } + + private async Task ExecuteAsync(string sql) + { + var other = OtherDialect(sql); + if (other && protocol == Protocol.Http) + { + // Over HTTP the server parses the request body as one query, and the parsers of other dialects + // do not accept a trailing semicolon. + sql = sql.TrimEnd(' ', '\t', '\r', '\n'); + sql = sql.EndsWith(';') ? sql[..^1] : sql; + } + var context = Context(sql); + if (!OutputFormat.ReturnsRows(sql) && !other && !IsImplicitSelect(sql)) + { + await backend.ExecuteAsync(sql, context).ConfigureAwait(false); + return; + } + var (query, format) = (sql, OutputFormat.Default); + if (!other && !OutputFormat.ExplainedQueryOwnsFormat(sql)) + { + // The FORMAT clause is SQL; other dialects can use the word differently (the `format` pipe of + // LogsQL). + (query, format) = OutputFormat.Split(sql); + } + if (!format.Supported) + { + throw new NotSupportedException($"clickhouse-test-runner: output format {format.Name} is not supported: the clients read results as RowBinary (HTTP) or Native (TCP), and the shim writes them only as TabSeparated"); + } + var explainNull = format.Discard && Statements.LeadingKeyword(sql) == "EXPLAIN"; + if (explainNull) + { + // With ignore_format_null_for_explain (on by default), the server ignores `FORMAT Null` for + // EXPLAIN and sends the plan. The server decides, so write the rows that it sends. + format = OutputFormat.Default; + } + if (protocol == Protocol.Tcp || format.Discard || explainNull) + { + // Send the text as clickhouse-client does; tests that read system.query_log see it. Over TCP the + // server ignores the FORMAT clause (the client reads Native blocks). With `FORMAT Null`, the + // server sends no rows over either protocol. + query = sql; + } + renderer.Output = StatementOutputSettings(sql); + var writer = new ResultWriter(result, format, renderer); + await backend.QueryAsync(query, format, writer, context).ConfigureAwait(false); + } + + // The output settings of a query: the session values, then the SETTINGS clause of the query. + internal OutputSettings StatementOutputSettings(string sql) + { + var clause = Statements.TrailingSettingsClause(sql); + if (outputSettings.Count == 0 && clause is null) + { + return OutputSettings.Default; + } + var values = new Dictionary(outputSettings, StringComparer.Ordinal); + if (clause is not null) + { + foreach (var (name, value) in ParseSetAssignments("SET " + clause)) + { + if (OutputSettings.Names.Contains(name)) + { + values[name] = value; + } + } + } + return OutputSettings.From(values); + } + + // Tells if the session uses another query language than SQL (`SET dialect = 'kusto'`, 'prql', ...). The + // shim cannot see if a statement in such a language returns rows, so it reads a result for it. + private bool OtherDialect(string sql) => + dialect.Length != 0 && !string.Equals(dialect, "clickhouse", StringComparison.OrdinalIgnoreCase) && Statements.LeadingKeyword(sql) != "SET"; + + // Tells if the statement is an expression alone, which `SET implicit_select = 1` makes a query. + private bool IsImplicitSelect(string sql) => implicitSelect && Statements.LeadingKeyword(sql) is not ( + "INSERT" or "CREATE" or "DROP" or "ALTER" or "SET" or "USE" or "TRUNCATE" or "RENAME" or "OPTIMIZE" or + "SYSTEM" or "GRANT" or "REVOKE" or "ATTACH" or "DETACH" or "KILL" or "EXCHANGE" or "UNDROP" or "BACKUP" or "RESTORE"); +} + +/// A result that does not match the test hint. +internal sealed class HintException : Exception +{ + public HintException(string message, int code) + : base(message) + { + Code = code; + } + + /// Gets the server error code, or 0. + public int Code { get; } +} + +/// The protocol (client) that the shim uses. +public enum Protocol +{ + Http, + Tcp, +} diff --git a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ServerError.cs b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ServerError.cs new file mode 100644 index 000000000..37605ef74 --- /dev/null +++ b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ServerError.cs @@ -0,0 +1,45 @@ +using ClickHouse.Driver.Tcp; + +namespace ClickHouse.Driver.TestRunner; + +/// An error that the server reported, as either client gives it. +internal sealed record ServerError(int Code, string Message) +{ + /// + /// Returns the server error in , or null when is not a server + /// error (a client or transport failure). + /// + public static ServerError? From(Exception e) + { + switch (e) + { + case ClickHouseServerException http: + return new ServerError(http.ErrorCode, http.Message); + case ClickHouseTcpServerException tcp: + return new ServerError(tcp.RawCode, tcp.Message); + case AggregateException { InnerExceptions.Count: 1 } a: + return From(a.InnerException!); + default: + return null; + } + } + + /// + /// Writes the error the way clickhouse-client does, so that a reader can find the code and the + /// name: Code: 60. DB::Exception: ... (UNKNOWN_TABLE). + /// + public string Format() + { + var msg = Message.Trim(); + if (msg.StartsWith("Code: ", StringComparison.Ordinal)) + { + return msg; + } + var name = ErrorCodes.NameOf(Code); + if (name != null && !msg.Contains("(" + name + ")", StringComparison.Ordinal)) + { + msg += " (" + name + ")"; + } + return $"Code: {Code}. DB::Exception: {msg}"; + } +} diff --git a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/Statements.cs b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/Statements.cs new file mode 100644 index 000000000..9d8ac763b --- /dev/null +++ b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/Statements.cs @@ -0,0 +1,713 @@ +namespace ClickHouse.Driver.TestRunner; + +/// +/// One query of a multi-query script, split the way clickhouse-client splits it +/// (see ClientBase::executeMultiQuery). +/// +internal sealed class Statement +{ + public Statement(string sql, string full) + { + Sql = sql; + Full = full; + Hint = TestHint.Parse(full); + } + + /// + /// Gets the text to send to the server: from the first non-whitespace character (leading comments + /// included) to the end of the query, with the semicolon. + /// + public string Sql { get; } + + /// + /// Gets plus the semicolon and the same-line trailing comment. The client reads the test + /// hints from this text and prints it for echo. + /// + public string Full { get; } + + public TestHint Hint { get; } + + /// Gets or sets a value indicating whether the statement is printed before it runs. + public bool Echo { get; set; } +} + +/// Splits a script into statements and finds the parts of a statement. +internal static class Statements +{ + // SQL words that can follow a column or an alias named `format`, as in `INSERT INTO t SELECT format + // FROM s`. No input or output format has such a name, so after FORMAT they show an identifier, not the + // FORMAT clause. + private static readonly HashSet ClauseKeywords = new(StringComparer.OrdinalIgnoreCase) + { + "FROM", "WHERE", "PREWHERE", "AS", "AND", "OR", "NOT", "IN", "IS", "LIKE", "ILIKE", "BETWEEN", + "GROUP", "ORDER", "LIMIT", "OFFSET", "HAVING", "QUALIFY", "WINDOW", "UNION", "EXCEPT", "INTERSECT", + "JOIN", "INNER", "LEFT", "RIGHT", "FULL", "CROSS", "ARRAY", "ON", "USING", "SETTINGS", "INTO", + "ASC", "DESC", "NULLS", "COLLATE", "WITH", "THEN", "ELSE", "END", "WHEN", "OVER", + "GLOBAL", "DIV", "MOD", "REGEXP", "FINAL", "SAMPLE", "FILL", "TIES", "BY", + }; + + // SQL keywords that an operand follows (see OperandExpected). + private static readonly HashSet OperandKeywords = new(StringComparer.OrdinalIgnoreCase) + { + "SELECT", "DISTINCT", "FROM", "JOIN", "WHERE", "PREWHERE", "BY", "ON", "AS", "AND", "OR", "NOT", "IN", + "IS", "LIKE", "ILIKE", "BETWEEN", "CASE", "WHEN", "THEN", "ELSE", "LIMIT", "OFFSET", "HAVING", "QUALIFY", + "USING", "INTO", "WITH", "DIV", "MOD", + }; + + /// + /// Splits a script into statements, as clickhouse-client does. + /// + /// + /// + /// The -- Tags: header (the first line and the -- lines after it) is not part of any + /// statement. + /// A statement ends at a top-level ;. A comment on the same line after the ; belongs to + /// that statement; this is where test hints are. + /// The inline data of INSERT ... FORMAT <name> (other than Values) ends at an empty + /// line, not at ;. + /// Comment-only text after the last statement is not a statement. + /// + /// + public static List Split(string text) + { + var output = new List(); + var pos = TestTagsLength(text); + var echo = false; + while (true) + { + pos = SkipWhitespace(text, pos); + if (pos >= text.Length || !HasSignificantToken(text, pos)) + { + return output; + } + var begin = pos; + var end = ScanStatementEnd(text, pos); + var sqlEnd = end; + // Consume the semicolons after the statement. + pos = end; + while (pos < text.Length && text[pos] == ';') + { + pos++; + var next = SkipWhitespaceAndComments(text, pos); + if (next < text.Length && text[next] == ';') + { + pos = next; + } + } + // Add the same-line trailing comment when the next statement starts after the end of this line. + var newline = text.IndexOf('\n', pos); + if (newline < 0) + { + newline = text.Length; + } + if (newline <= SkipWhitespaceAndComments(text, pos)) + { + pos = newline; + } + // clickhouse-client sends the statement with its semicolon. Tests that read system.query_log + // see it. + var sql = text[begin..sqlEnd].TrimEnd(' ', '\t', '\r', '\n'); + if (sqlEnd < text.Length && text[sqlEnd] == ';') + { + sql = text[begin..(sqlEnd + 1)]; + } + // The last statement has no semicolon: clickhouse-client echoes all the rest of the text, with its + // trailing newlines. + var full = sqlEnd == text.Length ? text[begin..] : text[begin..pos].TrimEnd(' ', '\t', '\r', '\n'); + var st = new Statement(sql, full); + if (st.Hint.Echo is { } e) + { + echo = e; + } + st.Echo = echo; + output.Add(st); + } + } + + /// + /// Returns the first word of a statement in upper case, after comments, whitespace and opening + /// parentheses. + /// + public static string LeadingKeyword(string sql) + { + var i = SkipWhitespaceAndComments(sql, 0); + while (i < sql.Length && (sql[i] == '(' || IsLexerSpace(sql[i]))) + { + i = SkipWhitespaceAndComments(sql, i + 1); + } + var j = i; + while (j < sql.Length && ChType.IsWordChar(sql[j])) + { + j++; + } + return sql[i..j].ToUpperInvariant(); + } + + public static bool IsClauseKeyword(string word) => ClauseKeywords.Contains(word); + + /// + /// Tells if the SQL parser expects an operand (a column, a table, an expression) at + /// of the statement that begins at . There, format is a name, not the + /// FORMAT clause: SELECT * FROM format f, SELECT format TSV and SELECT 2 * format x + /// read a table or a column format with an implicit alias. + /// + /// + /// An operand is expected at the start of a statement or a parenthesis, and after a keyword of + /// , a comma, a dot or an operator. A keyword where an operand is expected is a name (AS mod, + /// ORDER BY offset), so an operand follows it. * after an operand is the multiplication, + /// otherwise the asterisk (an operand). + /// + public static bool OperandExpected(string text, int start, int pos) + { + // At the start of the statement, a keyword is a keyword. + bool atStart = true, expect = false; + for (var i = start; i < pos;) + { + var c = text[i]; + if (IsLexerSpace(c)) + { + i++; + continue; + } + if (StartsLineComment(text, i)) + { + i = SkipLineComment(text, i); + continue; + } + if (StartsBlockComment(text, i)) + { + i = SkipBlockComment(text, i); + continue; + } + var wasStart = atStart; + atStart = false; + if (c is '\'' or '"' or '`') + { + i = SkipQuoted(text, i); + expect = false; + } + else if (c == '$' && HeredocEnd(text, i) is var e && e > 0) + { + i = e; + expect = false; + } + else if (ChType.IsWordChar(c) || c == '$') + { + // A `$` that does not start a heredoc is a part of an identifier: `$alias$name$`. + var j = i; + while (j < text.Length && (ChType.IsWordChar(text[j]) || text[j] == '$')) + { + j++; + } + expect = OperandKeywords.Contains(text[i..j]) && (wasStart || !expect); + i = j; + } + else if (c is ')' or ']' or '}') + { + // The end of a parenthesis, an array, or a query parameter `{p:String}`. + i++; + expect = false; + } + else if (c == '*') + { + i++; + expect = !wasStart && !expect; + } + else if (c is ';' or '(') + { + // A statement, or a subquery: `(SELECT ...`. + i++; + atStart = true; + expect = false; + } + else + { + // After `[`, `{`, `,`, `.` and an operator, an operand follows. Any other character ends an + // operand, so that FORMAT after it stays the clause. + i++; + expect = c is '[' or '{' or ',' or '.' or '+' or '-' or '/' or '%' or '=' or '<' or '>' or '!' + or '|' or '&' or '^' or '~' or '?' or ':'; + } + } + return atStart || expect; + } + + public static bool IsSpace(char c) => c is ' ' or '\t' or '\n' or '\r' or '\f' or '\v'; + + /// + /// Tells if the ClickHouse lexer skips the character as whitespace: the ASCII whitespace and the Unicode + /// whitespace of skipWhitespacesUTF8 (U+0085, U+00A0, U+180E, U+2000..U+200D, U+2028, U+2029, U+202F, + /// U+205F, U+2060, U+3000, U+FEFF). + /// + public static bool IsLexerSpace(char c) => + IsSpace(c) || c is '\u0085' or '\u00A0' or '\u180E' or (>= '\u2000' and <= '\u200D') or '\u2028' + or '\u2029' or '\u202F' or '\u205F' or '\u2060' or '\u3000' or '\uFEFF'; + + public static int SkipQuoted(string text, int i) + { + var q = text[i]; + for (var j = i + 1; j < text.Length; j++) + { + if (text[j] == '\\') + { + j++; + } + else if (text[j] == q) + { + // A doubled quote is an escaped quote. + if (j + 1 < text.Length && text[j + 1] == q) + { + j++; + continue; + } + return j + 1; + } + } + return text.Length; + } + + public static int SkipLineComment(string text, int i) + { + var nl = text.IndexOf('\n', i); + return nl >= 0 ? nl : text.Length; + } + + public static int SkipBlockComment(string text, int i) + { + // Block comments nest in ClickHouse. + var depth = 0; + for (var j = i; j < text.Length - 1;) + { + if (text[j] == '/' && text[j + 1] == '*') + { + depth++; + j += 2; + } + else if (text[j] == '*' && text[j + 1] == '/') + { + depth--; + j += 2; + if (depth == 0) + { + return j; + } + } + else + { + j++; + } + } + return text.Length; + } + + /// + /// Returns the end offset of the $tag$ ... $tag$ heredoc that starts at , or 0 + /// when the $ at does not start one. + /// + public static int HeredocEnd(string text, int i) + { + var tagEnd = text.IndexOf('$', i + 1); + if (tagEnd < 0) + { + return 0; + } + for (var k = i + 1; k < tagEnd; k++) + { + if (!ChType.IsWordChar(text[k])) + { + return 0; + } + } + var delim = text[i..(tagEnd + 1)]; + var end = text.IndexOf(delim, tagEnd + 1, StringComparison.Ordinal); + return end < 0 ? 0 : end + delim.Length; + } + + /// Tells if a single-line comment starts at : --, //, # or + /// #!, as in the ClickHouse lexer (Lexer::nextTokenImpl). + public static bool StartsLineComment(string text, int i) => + string.CompareOrdinal(text, i, "--", 0, 2) == 0 || + string.CompareOrdinal(text, i, "//", 0, 2) == 0 || + string.CompareOrdinal(text, i, "#!", 0, 2) == 0 || + string.CompareOrdinal(text, i, "# ", 0, 2) == 0; + + public static bool StartsBlockComment(string text, int i) => string.CompareOrdinal(text, i, "/*", 0, 2) == 0; + + public static int SkipWhitespaceAndComments(string text, int i) + { + while (i < text.Length) + { + if (IsLexerSpace(text[i])) + { + i++; + } + else if (StartsLineComment(text, i)) + { + i = SkipLineComment(text, i); + } + else if (StartsBlockComment(text, i)) + { + i = SkipBlockComment(text, i); + } + else + { + return i; + } + } + return i; + } + + /// + /// Returns the names of the {name:Type} query parameters of . As in the server's + /// lexer, a placeholder counts only outside string literals, quoted identifiers, heredocs and comments. + /// + public static HashSet ParameterNames(string sql) + { + var names = new HashSet(StringComparer.Ordinal); + for (var i = 0; i < sql.Length;) + { + var c = sql[i]; + if (c is '\'' or '"' or '`') + { + i = SkipQuoted(sql, i); + } + else if (c == '$' && HeredocEnd(sql, i) is var end and > 0) + { + i = end; + } + else if (StartsLineComment(sql, i)) + { + i = SkipLineComment(sql, i); + } + else if (StartsBlockComment(sql, i)) + { + i = SkipBlockComment(sql, i); + } + else if (c == '{' && ParameterName(sql, i) is { } name) + { + names.Add(name); + i++; + } + else + { + i++; + } + } + return names; + } + + // The name of the `{name:Type}` placeholder that starts at `i`, or null. + private static string? ParameterName(string sql, int i) + { + var j = SkipWhitespace(sql, i + 1); + var start = j; + if (j >= sql.Length || !(char.IsAsciiLetter(sql[j]) || sql[j] == '_')) + { + return null; + } + while (j < sql.Length && ChType.IsWordChar(sql[j])) + { + j++; + } + var name = sql[start..j]; + j = SkipWhitespace(sql, j); + return j < sql.Length && sql[j] == ':' ? name : null; + } + + /// + /// Returns the text after the last SETTINGS keyword outside quotes, comments and parentheses (the + /// settings clause of the query), up to a following top-level FORMAT or the end, or null when there is + /// none. + /// + public static string? TrailingSettingsClause(string sql) + { + int depth = 0, start = -1, end = -1; + for (var i = 0; i < sql.Length;) + { + var c = sql[i]; + if (c is '\'' or '"' or '`') + { + i = SkipQuoted(sql, i); + } + else if (StartsLineComment(sql, i)) + { + i = SkipLineComment(sql, i); + } + else if (StartsBlockComment(sql, i)) + { + i = SkipBlockComment(sql, i); + } + else if (c is '(' or '[') + { + depth++; + i++; + } + else if (c is ')' or ']') + { + depth--; + i++; + } + else if (ChType.IsWordChar(c)) + { + var j = i; + while (j < sql.Length && ChType.IsWordChar(sql[j])) + { + j++; + } + if (depth == 0 && (i == 0 || sql[i - 1] != '.')) + { + if (string.Equals(sql[i..j], "SETTINGS", StringComparison.OrdinalIgnoreCase)) + { + start = j; + end = -1; + } + else if (start >= 0 && end < 0 && string.Equals(sql[i..j], "FORMAT", StringComparison.OrdinalIgnoreCase)) + { + end = i; + } + } + i = j; + } + else + { + i++; + } + } + if (start < 0) + { + return null; + } + var clause = sql[start..(end < 0 ? sql.Length : end)].Trim(); + return clause.EndsWith(';') ? clause[..^1] : clause; + } + + /// Returns the words of outside quotes, comments and (unless + /// ) parentheses. + public static List TopLevelWords(string sql, bool nested = false) + { + var words = new List(); + var depth = 0; + for (var i = 0; i < sql.Length;) + { + var c = sql[i]; + if (c is '\'' or '"' or '`') + { + i = SkipQuoted(sql, i); + } + else if (StartsLineComment(sql, i)) + { + i = SkipLineComment(sql, i); + } + else if (StartsBlockComment(sql, i)) + { + i = SkipBlockComment(sql, i); + } + else if (c is '(' or '[') + { + depth++; + i++; + } + else if (c is ')' or ']') + { + depth--; + i++; + } + else if (ChType.IsWordChar(c)) + { + var j = i; + while (j < sql.Length && ChType.IsWordChar(sql[j])) + { + j++; + } + if (depth == 0 || nested) + { + words.Add(sql[i..j]); + } + i = j; + } + else + { + i++; + } + } + return words; + } + + /// + /// Mirrors getTestTagsLength: the length of the leading -- Tags: ... line and the -- + /// comment lines right after it. + /// + private static int TestTagsLength(string text) + { + var pos = 0; + var first = true; + while (true) + { + var lineStart = pos; + while (pos < text.Length && text[pos] is ' ' or '\t') + { + pos++; + } + if (string.CompareOrdinal(text, pos, "--", 0, 2) != 0) + { + return lineStart; + } + pos += 2; + if (first) + { + while (pos < text.Length && text[pos] is ' ' or '\t') + { + pos++; + } + if (string.CompareOrdinal(text, pos, "Tags:", 0, 5) != 0) + { + return 0; + } + pos += 5; + first = false; + } + var eol = text.IndexOfAny(['\r', '\n'], pos); + if (eol < 0) + { + return text.Length; + } + var eolLen = 1; + if (eol + 1 < text.Length && text[eol + 1] is '\r' or '\n' && text[eol + 1] != text[eol]) + { + eolLen = 2; + } + pos = eol + eolLen; + } + } + + // Returns the offset of the `;` that ends the statement at start, or text.Length. + private static int ScanStatementEnd(string text, int start) + { + var parens = 0; + for (var i = start; i < text.Length;) + { + var c = text[i]; + if (c is '\'' or '"' or '`') + { + i = SkipQuoted(text, i); + } + else if (StartsLineComment(text, i)) + { + i = SkipLineComment(text, i); + } + else if (c == '/' && StartsBlockComment(text, i)) + { + i = SkipBlockComment(text, i); + } + else if (c == '$') + { + var end = HeredocEnd(text, i); + i = end > 0 ? end : i + 1; + } + else if (c is '(' or '[') + { + parens++; + i++; + } + else if (c is ')' or ']') + { + parens--; + i++; + } + else if (c == ';' && parens <= 0) + { + return i; + } + else if (ChType.IsWordChar(c)) + { + var j = i; + while (j < text.Length && ChType.IsWordChar(text[j])) + { + j++; + } + if (parens <= 0 && string.Equals(text[i..j], "FORMAT", StringComparison.OrdinalIgnoreCase) && + InsertDataStart(text, start, j) is { } dataStart) + { + // The inline data ends at an empty line. + var k = text.IndexOf("\n\n", dataStart, StringComparison.Ordinal); + return k >= 0 ? k : text.Length; + } + i = j; + } + else + { + i++; + } + } + return text.Length; + } + + // Tells whether the FORMAT keyword that ends at formatEnd starts the inline data of an INSERT statement + // that begins at start, and returns the offset of the data after the format name. The `Values` format is + // excluded: its data ends at `;`, like a query. + private static int? InsertDataStart(string text, int start, int formatEnd) + { + if (LeadingKeyword(text[start..formatEnd]) != "INSERT" || OperandExpected(text, start, formatEnd - "FORMAT".Length)) + { + return null; + } + var i = formatEnd; + if (i >= text.Length || text[i] is not (' ' or '\t' or '\n' or '\r')) + { + return null; + } + while (i < text.Length && text[i] is ' ' or '\t' or '\n' or '\r') + { + i++; + } + var j = i; + while (j < text.Length && ChType.IsWordChar(text[j])) + { + j++; + } + var word = text[i..j]; + if (j == i || string.Equals(word, "Values", StringComparison.OrdinalIgnoreCase) || IsClauseKeyword(word)) + { + return null; + } + // After a SELECT, the FORMAT clause comes at the end of the SELECT, so after its top-level FROM: + // `INSERT INTO t SELECT * FROM input('x UInt8') FORMAT TSV`. Before that FROM, `format` is in the + // select list (`SELECT format x FROM s`). + if (!FormatAfterSelectFrom(text[start..(formatEnd - "FORMAT".Length)])) + { + return null; + } + return j; + } + + // Tells if a FORMAT that follows head can be the FORMAT clause of an INSERT: head has no top-level + // SELECT, or a top-level FROM follows its last top-level SELECT. + private static bool FormatAfterSelectFrom(string head) + { + bool afterSelect = false, sawFrom = false; + foreach (var w in TopLevelWords(head)) + { + if (string.Equals(w, "SELECT", StringComparison.OrdinalIgnoreCase)) + { + afterSelect = true; + sawFrom = false; + } + else if (string.Equals(w, "FROM", StringComparison.OrdinalIgnoreCase)) + { + sawFrom = true; + } + } + return !afterSelect || sawFrom; + } + + private static int SkipWhitespace(string text, int i) + { + while (i < text.Length && IsSpace(text[i])) + { + i++; + } + return i; + } + + private static bool HasSignificantToken(string text, int pos) => SkipWhitespaceAndComments(text, pos) < text.Length; +} diff --git a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/TcpBackend.cs b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/TcpBackend.cs new file mode 100644 index 000000000..67c7b20a7 --- /dev/null +++ b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/TcpBackend.cs @@ -0,0 +1,161 @@ +using ClickHouse.Driver.Tcp; + +namespace ClickHouse.Driver.TestRunner; + +/// +/// The native TCP client: from a connection string, and one +/// (one pinned connection) for the invocation, so that SET, +/// USE and temporary tables last. +/// +/// +/// Statements that return rows run with ; the shim reads +/// each value with (what QueryAsync gives per row) and the type with +/// . Other statements run with . +/// The pool has one connection (MaxPoolSize=1), so the client cannot open a second one without the +/// shim seeing it. Totals and extremes come from . +/// +internal sealed class TcpBackend : IBackend +{ + private readonly ClickHouseTcpClient client; + private readonly InvocationLog log; + private IClickHouseTcpSession? session; + + public TcpBackend(Options opts, InvocationLog log) + { + this.log = log; + var builder = new ClickHouseTcpConnectionStringBuilder + { + Host = opts.Host, + Port = opts.Port != 0 ? opts.Port : null, + Username = opts.User, + Password = opts.Password, + Database = opts.Database, + UseTls = opts.Secure, + MaxPoolSize = 1, + // tests/clickhouse-test stops a test after its own timeout. + ReadTimeout = TimeSpan.FromSeconds(600), + }; + client = new ClickHouseTcpClient(builder.ConnectionString); + log.Add("connection", builder.Host + ":" + (builder.Port?.ToString(System.Globalization.CultureInfo.InvariantCulture) ?? "default")); + } + + /// Gets the time zone of the server, from the handshake. + public TimeZoneInfo ServerTimeZone { get; private set; } = TimeZoneInfo.Utc; + + public bool SessionLost => session is { IsOpen: false }; + + public async Task OpenAsync() + { + session = await client.OpenSessionAsync().ConfigureAwait(false); + var info = await session.GetServerInfoAsync().ConfigureAwait(false); + if (!string.IsNullOrEmpty(info.Timezone)) + { + ServerTimeZone = ValueRenderer.FindZone(info.Timezone); + } + } + + public async Task ReopenAsync() + { + log.Add("session", "the session is closed; opening a new one"); + if (session is not null) + { + await session.DisposeAsync().ConfigureAwait(false); + } + session = await client.OpenSessionAsync().ConfigureAwait(false); + } + + // The session holds the current database. + public void UseDatabase(string database) + { + } + + public async Task ExecuteAsync(string sql, QueryContext context) => + await Session.ExecuteAsync(sql, QueryOptions(context, null)).ConfigureAwait(false); + + public async Task QueryAsync(string sql, OutputFormat format, ResultWriter writer, QueryContext context) + { + // The totals and the extremes come in callbacks, as borrowed blocks; render them at once, and write + // them after the data. + var plain = format with { Names = false, Types = false }; + Utf8Buffer? totals = null, extremes = null; + Exception? callbackError = null; + void Capture(Block block, ref Utf8Buffer? into) + { + try + { + into ??= new Utf8Buffer(); + WriteBlock(new ResultWriter(into, plain, writer.Renderer), block); + } + catch (Exception e) when (e is not OutOfMemoryException) + { + callbackError ??= e; + } + } + var callbacks = new ClickHouseTcpQueryCallbacks + { + OnTotals = block => Capture(block, ref totals), + OnExtremes = block => Capture(block, ref extremes), + }; + await foreach (var block in Session.StreamAsync(sql, QueryOptions(context, callbacks)).ConfigureAwait(false)) + { + WriteBlock(writer, block); + } + if (callbackError is not null) + { + throw callbackError; + } + // `WITH TOTALS`: an empty line, then the totals row. `extremes = 1`: an empty line, then the minimum and + // the maximum row. + if (totals is not null) + { + writer.Separator(); + writer.Append(totals); + } + if (extremes is not null) + { + writer.Separator(); + writer.Append(extremes); + } + } + + public async ValueTask DisposeAsync() + { + if (session is not null) + { + await session.DisposeAsync().ConfigureAwait(false); + } + await client.DisposeAsync().ConfigureAwait(false); + } + + private static void WriteBlock(ResultWriter writer, Block block) + { + var columns = block.Columns; + writer.Columns(block.ColumnNames, columns.Select(c => c.TypeName).ToArray()); + for (var row = 0; row < block.RowCount; row++) + { + var r = row; + writer.Row(i => columns[i].GetValue(r), i => columns[i], r); + } + } + + private static ClickHouseTcpQueryOptions QueryOptions(QueryContext context, ClickHouseTcpQueryCallbacks? callbacks) + { + ClickHouseTcpParameterCollection? parameters = null; + if (context.Parameters.Count > 0) + { + parameters = new ClickHouseTcpParameterCollection(); + foreach (var (name, value) in context.Parameters) + { + parameters.Add(name, value); + } + } + return new ClickHouseTcpQueryOptions + { + Settings = context.Settings.Count > 0 ? context.Settings : null, + Parameters = parameters, + Callbacks = callbacks, + }; + } + + private IClickHouseTcpSession Session => session ?? throw new InvalidOperationException("the session is not open"); +} diff --git a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/TestHint.cs b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/TestHint.cs new file mode 100644 index 000000000..2c8aa75a8 --- /dev/null +++ b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/TestHint.cs @@ -0,0 +1,192 @@ +namespace ClickHouse.Driver.TestRunner; + +/// +/// The test hints of one statement, as clickhouse-client parses them (see +/// src/Client/TestHint.cpp). +/// +/// +/// +/// SELECT throwIf(1); -- { serverError FUNCTION_THROW_IF_VALUE_IS_NON_ZERO } +/// SELECT 1 / 0; -- { serverError 153, 6 } +/// -- { echoOn } +/// +/// An error hint counts only when it is not in a leading comment. An echo hint counts in any comment. +/// +internal sealed class TestHint +{ + public List ServerErrors { get; private set; } = []; + + public List ClientErrors { get; private set; } = []; + + /// Gets the value that echo, echoOn (true) or echoOff (false) set. + public bool? Echo { get; private set; } + + /// Gets the error of a malformed hint or of a hint that names an unknown error. + public string? ParseError { get; private set; } + + public bool ExpectsError => ServerErrors.Count > 0 || ClientErrors.Count > 0; + + public string Label + { + get + { + static string Codes(List list) => string.Join(", ", list.Select(c => ErrorCodes.NameOf(c) ?? c.ToString(System.Globalization.CultureInfo.InvariantCulture))); + if (ServerErrors.Count > 0 && ClientErrors.Count > 0) + { + return "error " + Codes(ServerErrors); + } + return ServerErrors.Count > 0 ? "serverError " + Codes(ServerErrors) : "clientError " + Codes(ClientErrors); + } + } + + public static TestHint Parse(string full) + { + var h = new TestHint(); + var leading = true; + for (var i = 0; i < full.Length;) + { + int end; + var c = full[i]; + if (Statements.IsLexerSpace(c)) + { + i++; + continue; + } + if (Statements.StartsLineComment(full, i)) + { + end = Statements.SkipLineComment(full, i); + } + else if (Statements.StartsBlockComment(full, i)) + { + end = Statements.SkipBlockComment(full, i); + } + else if (c is '\'' or '"' or '`') + { + leading = false; + i = Statements.SkipQuoted(full, i); + continue; + } + else if (c == '$') + { + leading = false; + var e = Statements.HeredocEnd(full, i); + i = e > 0 ? e : i + 1; + continue; + } + else + { + leading = false; + i++; + continue; + } + var comment = full[i..end]; + var open = comment.IndexOf('{', StringComparison.Ordinal); + if (open >= 0) + { + var closing = comment.IndexOf('}', open); + if (closing >= 0) + { + h.ParseBody(comment[(open + 1)..closing], leading); + } + } + i = end; + } + return h; + } + + /// + /// Tells if the error code satisfies the hint. Through a driver the server finds every error, also the + /// syntax errors that clickhouse-client finds itself, so a server error can satisfy a + /// clientError hint too. + /// + public bool Matches(int code) => ServerErrors.Contains(code) || ClientErrors.Contains(code); + + private static List Tokenize(string body) + { + var output = new List(); + for (var i = 0; i < body.Length;) + { + var c = body[i]; + if (Statements.IsLexerSpace(c)) + { + i++; + } + else if (c == ',') + { + output.Add(","); + i++; + } + else + { + var j = i; + while (j < body.Length && !Statements.IsLexerSpace(body[j]) && body[j] != ',') + { + j++; + } + output.Add(body[i..j]); + i = j; + } + } + return output; + } + + private void ParseBody(string body, bool leading) + { + var tokens = Tokenize(body); + for (var i = 0; i < tokens.Count; i++) + { + switch (tokens[i]) + { + case "echo" or "echoOn": + Echo = true; + break; + case "echoOff": + Echo = false; + break; + case "retry": + // `retry N until|while serverError X` is used by a few tests that wait for a background + // process. It is not supported. + ParseError = "the \"retry\" test hint is not supported"; + return; + case "serverError" or "clientError" or "error": + if (leading) + { + continue; + } + var codes = new List(); + foreach (var t in tokens.Skip(i + 1)) + { + if (t == ",") + { + continue; + } + if (int.TryParse(t, System.Globalization.NumberStyles.Integer, System.Globalization.CultureInfo.InvariantCulture, out var n)) + { + codes.Add(n); + continue; + } + if (ErrorCodes.CodeOf(t) is not { } code) + { + ParseError = $"unknown error name \"{t}\" in test hint"; + return; + } + codes.Add(code); + } + switch (tokens[i]) + { + case "serverError": + ServerErrors = codes; + break; + case "clientError": + ClientErrors = codes; + break; + default: + ServerErrors = codes; + ClientErrors = [.. codes]; + break; + } + return; + } + } + } +} diff --git a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/Utf8Buffer.cs b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/Utf8Buffer.cs new file mode 100644 index 000000000..48397f536 --- /dev/null +++ b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/Utf8Buffer.cs @@ -0,0 +1,134 @@ +using System.Text; + +namespace ClickHouse.Driver.TestRunner; + +/// +/// A growable byte buffer for the shim's output. The output is bytes, not text: a FixedString or a +/// byte array can hold bytes that are not UTF-8, and the server writes them as they are. +/// +internal sealed class Utf8Buffer +{ + private byte[] buffer = new byte[4096]; + + public int Length { get; private set; } + + public ReadOnlySpan Span => buffer.AsSpan(0, Length); + + public void Clear() => Length = 0; + + public void Append(byte b) + { + Ensure(1); + buffer[Length++] = b; + } + + public void Append(char c) + { + if (c < 0x80) + { + Append((byte)c); + return; + } + Append(c.ToString()); + } + + public void Append(ReadOnlySpan bytes) + { + Ensure(bytes.Length); + bytes.CopyTo(buffer.AsSpan(Length)); + Length += bytes.Length; + } + + /// Appends as UTF-8. + public void Append(string s) + { + Ensure(Encoding.UTF8.GetMaxByteCount(s.Length)); + Length += Encoding.UTF8.GetBytes(s, buffer.AsSpan(Length)); + } + + public void Append(Utf8Buffer other) => Append(other.Span); + + /// + /// Appends with the escapes of ClickHouse's writeAnyEscapedString (with + /// the single quote as the quote character), quoted when is set. + /// + public void AppendEscaped(ReadOnlySpan bytes, bool quote) + { + if (quote) + { + Append((byte)'\''); + } + foreach (var c in bytes) + { + switch (c) + { + case (byte)'\\': + Append("\\\\"u8); + break; + case (byte)'\'': + Append("\\'"u8); + break; + case (byte)'\b': + Append("\\b"u8); + break; + case (byte)'\f': + Append("\\f"u8); + break; + case (byte)'\n': + Append("\\n"u8); + break; + case (byte)'\r': + Append("\\r"u8); + break; + case (byte)'\t': + Append("\\t"u8); + break; + case 0: + Append("\\0"u8); + break; + default: + Append(c); + break; + } + } + if (quote) + { + Append((byte)'\''); + } + } + + /// Appends the UTF-8 bytes of with escapes; see . + public void AppendEscaped(string s, bool quote) => AppendEscaped(Encoding.UTF8.GetBytes(s), quote); + + /// Appends text that has no characters to escape (dates, UUIDs, addresses), quoted when nested. + public void AppendQuotedIf(string s, bool quote) + { + if (quote) + { + Append((byte)'\''); + } + Append(s); + if (quote) + { + Append((byte)'\''); + } + } + + public void WriteTo(Stream stream) => stream.Write(buffer, 0, Length); + + public override string ToString() => Encoding.UTF8.GetString(Span); + + private void Ensure(int extra) + { + if (Length + extra <= buffer.Length) + { + return; + } + var size = buffer.Length * 2; + while (size < Length + extra) + { + size *= 2; + } + Array.Resize(ref buffer, size); + } +} diff --git a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ValueRenderer.cs b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ValueRenderer.cs new file mode 100644 index 000000000..9fb8ee5d5 --- /dev/null +++ b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ValueRenderer.cs @@ -0,0 +1,1188 @@ +using System.Collections; +using System.Collections.Concurrent; +using System.Globalization; +using System.Net; +using System.Net.Sockets; +using System.Numerics; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Text.Json.Nodes; +using ClickHouse.Driver.Tcp; +using NodaTime; + +namespace ClickHouse.Driver.TestRunner; + +/// +/// Writes the .NET values that a client of this repository read as the text that the server writes for the +/// TabSeparated format. The upstream .reference files hold the server's text, so a test passes +/// only when the client decoded every value correctly. +/// +/// +/// +/// The rendering is type-directed: the .NET value alone is not sufficient (the precision of a +/// DateTime64 is in the type only, and the TCP client gives a DateTime as its raw count). +/// +/// +/// The two clients give different .NET types for the same ClickHouse type, so the renderer takes the values +/// of both. HTTP: BigInteger, Tuple<...>, List<KeyValuePair>, calendar +/// DateTime, enum labels. TCP: Int128, ValueTuple, KeyValuePair[], raw +/// uint/long counts for DateTime/DateTime64/Time64, enum ordinals, +/// byte[] for FixedString, DateOnly. For TCP, the renderer also gets the column that +/// holds the value, and takes the time zone of a DateTime (), the +/// label of an enum () and the bytes of a String +/// (; the value is their UTF-8 decoding, with U+FFFD for bytes that are not +/// UTF-8) from the client. The HTTP client gives a String as that decoding only. +/// +/// +/// ClickHouse uses two text forms: at the top level (serializeTextEscaped) strings are escaped, not +/// quoted, and NULL is \N; nested in Array, Tuple and Map +/// (serializeTextQuoted) strings are quoted, and NULL is NULL. +/// +/// +internal sealed class ValueRenderer +{ + // The server writes a Time value above 999:59:59 as 999:59:59. + private const long MaxTimeSeconds = (999 * 3600) + (59 * 60) + 59; + + private static readonly ConcurrentDictionary PairProperties = new(); + private static readonly ConcurrentDictionary Zones = new(StringComparer.Ordinal); + + private readonly Func? sessionTimeZone; + + // True for the values of the HTTP client. A Variant or Dynamic value of the TCP client is written only from + // its column: without its type, a raw count (DateTime, DateTime64, Time64) is not different from an integer. + private readonly bool valuesFromHttp; + + /// TCP only (null for HTTP): the time zone of a DateTime raw count without + /// a time zone in its type, when no column gives one. + public ValueRenderer(Func? sessionTimeZone = null) + { + this.sessionTimeZone = sessionTimeZone; + valuesFromHttp = sessionTimeZone is null; + } + + /// + /// HTTP only: the time zone of the current result, ClickHouseCommand.ServerTimezone (the + /// X-ClickHouse-Timezone header, which gives the session time zone: SET session_timezone or + /// the setting of the query). The HTTP client gives a DateTime or DateTime64 without a time zone + /// in its type as its UTC wall clock (DateTimeKind.Unspecified), and its changelog tells the user to + /// apply the time zone after reading. The renderer applies this zone with the time-zone database that the + /// client uses for the zones in a type (NodaTime TZDB). Null or UTC: the value is written as it is. + /// + public string? HttpServerTimezone { get; set; } + + /// The output settings of the current query (date_time_output_format, ...). + public OutputSettings Output { get; set; } = OutputSettings.Default; + + /// Tells if a top-level value of the type is written without escapes by the TSVRaw formats. + public static bool IsStringType(ChType t) + { + while (Unwrapped(t) is { } inner) + { + t = inner; + } + return t.Base is "String" or "FixedString" or "Enum8" or "Enum16"; + } + + // The value type of Nullable(T), LowCardinality(T) and SimpleAggregateFunction(f, T), or null. + private static ChType? Unwrapped(ChType t) => t.Base switch + { + "Nullable" or "LowCardinality" => t.TypeArg(0), + "SimpleAggregateFunction" when t.Args.Count > 0 => t.TypeArg(t.Args.Count - 1), + _ => null, + }; + + /// Renders one value. + /// The output. + /// The ClickHouse type of the value. + /// The value that the client gave. + /// True inside Array, Tuple and Map. + /// TCP only: the column that holds the value, or null. + /// TCP only: the row of in , or -1 when it is + /// not known (inside a composite value). + public void Render(Utf8Buffer b, ChType t, object? v, bool nested, IColumn? column = null, int row = -1) + { + switch (t.Base) + { + case "Nullable": + Render(b, Arg(t, 0), v, nested, column is INullableColumn n ? n.Inner : column, column is INullableColumn ? row : -1); + return; + case "LowCardinality": + if (column is ILowCardinalityColumn lc) + { + // TCP: row r is row Keys[r] of the dictionary. The dictionary holds the bare inner type, also + // for LowCardinality(Nullable(T)) (key 0 is NULL, and then the value is null). + var inner = Arg(t, 0); + var key = row >= 0 ? lc.Keys[row] : -1; + Render(b, inner.Base == "Nullable" ? Arg(inner, 0) : inner, v, nested, lc.Dictionary, key); + return; + } + Render(b, Arg(t, 0), v, nested, column, -1); + return; + case "SimpleAggregateFunction": + Render(b, Arg(t, t.Args.Count - 1), v, nested, column, row); + return; + } + + if (v is null or DBNull) + { + b.Append(nested ? "NULL" : Output.NullText); + return; + } + + switch (t.Base) + { + case "Int8" or "Int16" or "Int32" or "Int64" or "UInt8" or "UInt16" or "UInt32" or "UInt64" or + "Int128" or "Int256" or "UInt128" or "UInt256": + b.Append(IntegerText(t, v)); + return; + case "Float32" or "BFloat16": + b.Append(v is float f ? FormatFloat(f) : throw Mismatch(t, v)); + return; + case "Float64": + b.Append(v is double d ? FormatFloat(d) : throw Mismatch(t, v)); + return; + case "Bool": + b.Append(v is bool flag ? (flag ? "true" : "false") : throw Mismatch(t, v)); + return; + case "String" or "FixedString" or "JSON" or "Json": + if (t.Base is "JSON" or "Json" && v is JsonNode) + { + throw Unsupported(t, "the client gives " + v.GetType().Name + "; only JSON as String text is supported"); + } + if (t.Base is "JSON" or "Json" && v is not string) + { + throw Mismatch(t, v); + } + // The HTTP client of the shim reads a String as string (no ReadAsByteArray), so a byte[] is an + // Array(UInt8) there. (The TCP client gives a FixedString as byte[].) + if (valuesFromHttp && t.Base == "String" && v is byte[]) + { + throw Mismatch(t, v); + } + // TCP: the bytes of the String from its column, also when they are not UTF-8. + if (TryColumnBytes(t, v, column, row, out var fromColumn)) + { + b.AppendEscaped(fromColumn, nested); + return; + } + RenderStringLike(b, t, v, nested); + return; + case "Enum8" or "Enum16": + b.AppendEscaped(EnumLabel(t, v, column), nested); + return; + case "Decimal" or "Decimal32" or "Decimal64" or "Decimal128" or "Decimal256": + b.Append(DecimalText(t, v)); + return; + case "Date" or "Date32": + b.AppendQuotedIf(DateText(t, v), nested); + return; + case "DateTime": + b.AppendQuotedIf(DateTimeText(t, v, column, 0), nested); + return; + case "DateTime64": + b.AppendQuotedIf(DateTimeText(t, v, column, Precision(t, 0)), nested); + return; + case "Time": + b.AppendQuotedIf(TimeText(t, v, 0), nested); + return; + case "Time64": + b.AppendQuotedIf(TimeText(t, v, Precision(t, 0)), nested); + return; + case "UUID": + b.AppendQuotedIf(v is Guid g ? g.ToString("D") : throw Mismatch(t, v), nested); + return; + case "IPv4": + b.AppendQuotedIf(v is IPAddress { AddressFamily: AddressFamily.InterNetwork } ip4 ? ip4.ToString() : throw Mismatch(t, v), nested); + return; + case "IPv6": + b.AppendQuotedIf(v is IPAddress ip6 ? FormatIPv6(ip6.MapToIPv6().GetAddressBytes()) : throw Mismatch(t, v), nested); + return; + case "Nothing": + // A `Nothing` column has no values; a value here is a NULL. + b.Append(nested ? "NULL" : Output.NullText); + return; + case "Array": + // Row i of an array column holds the inner rows [Offsets[i], Offsets[i + 1]). + RenderSequence(b, Arg(t, 0), v, t, column is IArrayColumn a ? a.Inner : null, column is IArrayColumn ar && row >= 0 ? ar.Offsets[row] : -1); + return; + case "QBit": + RenderSequence(b, Arg(t, 0), v, t, null, -1); + return; + case "Tuple": + RenderTuple(b, t, v, column as ITupleColumn, row); + return; + case "Map": + RenderMap(b, t, v, column as IMapColumn, row); + return; + case "Nested": + if (column is INestedColumn nestedColumn && row >= 0) + { + RenderNested(b, t, v, nestedColumn, row); + return; + } + // Nested(a T1, b T2) is an Array(Tuple(T1, T2)). + RenderSequence(b, new ChType("Tuple", t.Args), v, t, null, -1); + return; + case "Point": + RenderTuple(b, new ChType("Tuple", [new(Type: new ChType("Float64")), new(Type: new ChType("Float64"))]), v, null, -1); + return; + case "Ring" or "LineString": + RenderSequence(b, new ChType("Point"), v, t, null, -1); + return; + case "Polygon" or "MultiLineString": + RenderSequence(b, new ChType("Ring"), v, t, null, -1); + return; + case "MultiPolygon": + RenderSequence(b, new ChType("Polygon"), v, t, null, -1); + return; + case "Variant": + RenderVariant(b, t, VariantAlternatives(t), v, nested, column, row); + return; + case "Geometry": + // `Geometry` is a Variant of the six geometry types, in the server's discriminator order. + RenderVariant(b, t, GeometryAlternatives, v, nested, column, row); + return; + case "Dynamic": + RenderDynamic(b, t, v, nested, column, row); + return; + } + if (t.Base.StartsWith("Interval", StringComparison.Ordinal)) + { + b.Append(IntegerText(t, v)); + return; + } + throw Unsupported(t); + } + + /// + /// Writes as ClickHouse does: the shortest text that reads back as the same value, in + /// positional notation when the decimal exponent is in [-6, 21), else in scientific notation without a + /// + sign or exponent padding (1e21, 1.5e-7). This is the same layout as + /// JavaScript's Number.prototype.toString. + /// + public static string FormatFloat(double f) => FormatFloat(f, f.ToString("R", CultureInfo.InvariantCulture)); + + /// + public static string FormatFloat(float f) => FormatFloat(f, f.ToString("R", CultureInfo.InvariantCulture)); + + /// + /// Follows ClickHouse's formatIPv6: the longest run of two or more zero words becomes ::, and + /// an IPv4-mapped (::ffff:a.b.c.d) or IPv4-compatible (::a.b.c.d) address ends in dotted + /// form. + /// + public static string FormatIPv6(byte[] ip) + { + var words = new int[8]; + for (var i = 0; i < 8; i++) + { + words[i] = (ip[2 * i] << 8) | ip[(2 * i) + 1]; + } + int bestBase = -1, bestLen = 0; + for (var i = 0; i < 8;) + { + if (words[i] != 0) + { + i++; + continue; + } + var j = i; + while (j < 8 && words[j] == 0) + { + j++; + } + if (j - i > bestLen) + { + bestBase = i; + bestLen = j - i; + } + i = j; + } + if (bestLen < 2) + { + bestBase = -1; + } + var ipv4Compatible = bestBase == 0 && bestLen == 6; + var ipv4Mapped = bestBase == 0 && bestLen == 5 && words[5] == 0xffff; + var sb = new System.Text.StringBuilder(); + for (var i = 0; i < 8; i++) + { + if (bestBase != -1 && i >= bestBase && i < bestBase + bestLen) + { + if (i == bestBase) + { + sb.Append(':'); + } + continue; + } + if (i != 0) + { + sb.Append(':'); + } + if (i == 6 && (ipv4Compatible || ipv4Mapped)) + { + sb.Append(CultureInfo.InvariantCulture, $"{ip[12]}.{ip[13]}.{ip[14]}.{ip[15]}"); + return sb.ToString(); + } + sb.Append(words[i].ToString("x", CultureInfo.InvariantCulture)); + } + if (bestBase != -1 && bestBase + bestLen == 8) + { + sb.Append(':'); + } + return sb.ToString(); + } + + /// + /// Writes a Time / Time64 value given as seconds and a fraction of + /// digits: [-]HH:MM:SS[.fff]. The hours can be more than 24. + /// + public static string FormatTime(bool negative, long seconds, long fraction, int precision) + { + // The server writes a value above 999:59:59 as 999:59:59, with a zero fraction; the stored value is + // not changed. + if (seconds > MaxTimeSeconds) + { + seconds = MaxTimeSeconds; + fraction = 0; + } + var text = string.Create(CultureInfo.InvariantCulture, $"{(negative ? "-" : string.Empty)}{seconds / 3600:00}:{seconds / 60 % 60:00}:{seconds % 60:00}"); + return precision > 0 ? text + "." + fraction.ToString(CultureInfo.InvariantCulture).PadLeft(precision, '0') : text; + } + + internal static TimeZoneInfo FindZone(string name) => Zones.GetOrAdd(name, TimeZoneInfo.FindSystemTimeZoneById); + + private static string FormatFloat(double f, string shortest) + { + if (double.IsNaN(f)) + { + return "nan"; + } + if (double.IsPositiveInfinity(f)) + { + return "inf"; + } + if (double.IsNegativeInfinity(f)) + { + return "-inf"; + } + if (f == 0) + { + return double.IsNegative(f) ? "-0" : "0"; + } + // The shortest round-trip text of .NET, such as 123.45, 1E+21, 1.5E-07 or 0.0001. + var neg = shortest.StartsWith('-'); + var s = neg ? shortest[1..] : shortest; + var ePos = s.IndexOfAny(['E', 'e']); + var mantissa = ePos >= 0 ? s[..ePos] : s; + var exp = ePos >= 0 ? int.Parse(s[(ePos + 1)..], NumberStyles.AllowLeadingSign, CultureInfo.InvariantCulture) : 0; + var point = mantissa.IndexOf('.', StringComparison.Ordinal); + var intLen = point >= 0 ? point : mantissa.Length; + var digits = mantissa.Replace(".", string.Empty, StringComparison.Ordinal); + var leadingZeros = digits.Length - digits.TrimStart('0').Length; + digits = digits.Trim('0'); + // The value is 0.digits × 10^n. + var n = intLen + exp - leadingZeros; + var k = digits.Length; + string text; + if (k <= n && n <= 21) + { + text = digits + new string('0', n - k); + } + else if (n > 0 && n <= 21) + { + text = digits[..n] + "." + digits[n..]; + } + else if (n > -6 && n <= 0) + { + text = "0." + new string('0', -n) + digits; + } + else + { + text = digits[..1] + (k > 1 ? "." + digits[1..] : string.Empty) + "e" + (n - 1).ToString(CultureInfo.InvariantCulture); + } + return neg ? "-" + text : text; + } + + private static ChType Arg(ChType t, int index) => t.TypeArg(index) ?? throw Unsupported(t); + + private static int Precision(ChType t, int index) => + int.TryParse(t.LiteralArg(index), NumberStyles.Integer, CultureInfo.InvariantCulture, out var p) && p is >= 0 and <= 9 ? p : throw Unsupported(t); + + private static NotSupportedException Unsupported(ChType t, string? why = null) => + new("clickhouse-test-runner: no TabSeparated renderer for type " + t + (why is null ? string.Empty : " (" + why + ")")); + + private static InvalidOperationException Mismatch(ChType t, object v) => + new($"clickhouse-test-runner: unexpected .NET value {v.GetType()} for type {t}"); + + private static string IntegerText(ChType t, object v) => v switch + { + sbyte or byte or short or ushort or int or uint or long or ulong or Int128 or UInt128 or BigInteger => + ((IFormattable)v).ToString(null, CultureInfo.InvariantCulture), + Int256 or UInt256 => v.ToString()!, + _ => throw Mismatch(t, v), + }; + + private string DecimalText(ChType t, object v) + { + if (v is not (decimal or IFormattable)) + { + throw Mismatch(t, v); + } + var s = ((IFormattable)v).ToString(null, CultureInfo.InvariantCulture); + if (v is not (decimal or ClickHouse.Driver.Numerics.ClickHouseDecimal or ClickHouseTcpDecimal) || + s.Contains('E', StringComparison.OrdinalIgnoreCase)) + { + throw Mismatch(t, v); + } + // The server writes no trailing zeros (output_format_decimal_trailing_zeros = 0). + if (s.Contains('.', StringComparison.Ordinal)) + { + s = s.TrimEnd('0').TrimEnd('.'); + } + s = s == "-0" ? "0" : s; + if (Output.DecimalTrailingZeros && DecimalScale(t) is int scale and > 0) + { + // output_format_decimal_trailing_zeros = 1: exactly `scale` fractional digits. + var dot = s.IndexOf('.', StringComparison.Ordinal); + s = dot < 0 ? s + "." + new string('0', scale) : s + new string('0', scale - (s.Length - dot - 1)); + } + return s; + } + + // The scale of Decimal(P, S) or DecimalN(S), or null for another type. + private static int? DecimalScale(ChType t) => t.Base switch + { + "Decimal" when int.TryParse(t.LiteralArg(1), NumberStyles.Integer, CultureInfo.InvariantCulture, out var s) => s, + "Decimal" => 0, + "Decimal32" or "Decimal64" or "Decimal128" or "Decimal256" when int.TryParse(t.LiteralArg(0), NumberStyles.Integer, CultureInfo.InvariantCulture, out var s) => s, + _ => null, + }; + + private static string DateText(ChType t, object v) => v switch + { + DateOnly d => d.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), + DateTime dt => dt.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), + _ => throw Mismatch(t, v), + }; + + private static string FormatWallClock(DateTime dt, long fraction, int precision) + { + var s = dt.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture); + return precision > 0 ? s + "." + fraction.ToString(CultureInfo.InvariantCulture).PadLeft(precision, '0') : s; + } + + private static long Pow10(int p) + { + long r = 1; + for (var i = 0; i < p; i++) + { + r *= 10; + } + return r; + } + + private static string TimeText(ChType t, object v, int precision) + { + switch (v) + { + case TimeSpan ts: + { + // The HTTP client: 100-nanosecond ticks. + var ticks = ts.Ticks; + var negative = ticks < 0; + var abs = negative ? -(BigInteger)ticks : ticks; + var seconds = (long)(abs / TimeSpan.TicksPerSecond); + var fraction7 = (long)(abs % TimeSpan.TicksPerSecond); + return FormatTime(negative, seconds, ScaleFraction(fraction7, 7, precision), precision); + } + case int or long: + { + // The TCP client: the raw count at the scale of the type. + var count = Convert.ToInt64(v, CultureInfo.InvariantCulture); + var negative = count < 0; + var abs = BigInteger.Abs(count); + var scale = Pow10(precision); + return FormatTime(negative, (long)(abs / scale), (long)(abs % scale), precision); + } + default: + throw Mismatch(t, v); + } + } + + // Converts a fraction of `from` digits to `to` digits (cutting or padding with zeros). + private static long ScaleFraction(long fraction, int from, int to) => + to >= from ? fraction * Pow10(to - from) : fraction / Pow10(from - to); + + /// + /// Writes a top-level value of a string type () without escapes, for the + /// TSVRaw formats: the bytes of a String (TCP: from the column), a FixedString or the label + /// of an enum. Returns false when the value is not a string or a byte[] (the TCP client gives an enum as + /// its ordinal); then write it with . + /// + public bool TryRenderRaw(Utf8Buffer b, ChType t, object? v, IColumn? column, int row) + { + // The same column and row as Render takes for the inner type. + while (Unwrapped(t) is { } inner) + { + if (column is ILowCardinalityColumn lc && t.Base == "LowCardinality") + { + row = row >= 0 ? lc.Keys[row] : -1; + column = lc.Dictionary; + inner = inner.Base == "Nullable" ? inner.TypeArg(0) ?? inner : inner; + } + else if (column is INullableColumn n && t.Base == "Nullable") + { + column = n.Inner; + } + else if (t.Base != "SimpleAggregateFunction") + { + row = -1; + } + t = inner; + } + switch (v) + { + case string when TryColumnBytes(t, v, column, row, out var fromColumn): + b.Append(fromColumn); + return true; + case sbyte or short when t.Base is "Enum8" or "Enum16": + // The TCP client gives an enum as its ordinal. + b.Append(EnumLabel(t, v, column)); + return true; + case string s: + b.Append(s); + return true; + case byte[] bytes: + b.Append(bytes); + return true; + default: + return false; + } + } + + // TCP: the bytes of a String value (also of JSON read as text) from its column (IStringColumn.GetBytes), when + // the value has U+FFFD: the value of the column is the UTF-8 decoding of the bytes, with U+FFFD for a byte that + // is not UTF-8, so only such a value can differ from its bytes. The value must be the decoding of the bytes + // (a check of the row; it cannot tell two rows apart that decode to the same text). + private static bool TryColumnBytes(ChType t, object v, IColumn? column, int row, out ReadOnlySpan bytes) + { + if (t.Base is not ("String" or "JSON" or "Json") || column is not IStringColumn strings || row < 0 || + v is not string s || !s.Contains('\uFFFD', StringComparison.Ordinal)) + { + bytes = default; + return false; + } + bytes = strings.GetBytes(row); + if (System.Text.Encoding.UTF8.GetString(bytes) != s) + { + throw new InvalidOperationException($"clickhouse-test-runner: row {row} of the String column does not hold the value of the client"); + } + return true; + } + + private static void RenderStringLike(Utf8Buffer b, ChType t, object v, bool nested) + { + switch (v) + { + case string s: + b.AppendEscaped(s, nested); + break; + case byte[] bytes: + b.AppendEscaped(bytes, nested); + break; + default: + throw Mismatch(t, v); + } + } + + private static string EnumLabel(ChType t, object v, IColumn? column) + { + if (v is string label) + { + return label; + } + if (v is not (sbyte or short or int or long)) + { + throw Mismatch(t, v); + } + var ordinal = Convert.ToInt64(v, CultureInfo.InvariantCulture); + if (column is IEnumColumn e) + { + return e.TryGetLabel(ordinal, out var fromClient) ? fromClient : throw new InvalidOperationException($"clickhouse-test-runner: the client has no label for {ordinal} in {t}"); + } + // No column (inside a composite value that the client gave without its column): use the type. + foreach (var arg in t.Args) + { + var eq = arg.Literal.LastIndexOf('='); + if (eq > 0 && long.TryParse(arg.Literal[(eq + 1)..].Trim(), NumberStyles.AllowLeadingSign, CultureInfo.InvariantCulture, out var n) && n == ordinal) + { + var quoted = arg.Literal[..eq].Trim(); + return Identifiers.Unquote(quoted.Replace("\\'", "''", StringComparison.Ordinal)) ?? quoted; + } + } + throw new InvalidOperationException($"clickhouse-test-runner: no label for {ordinal} in {t}"); + } + + private string DateTimeText(ChType t, object v, IColumn? column, int precision) + { + var text = DateTimeTextAtPrecision(t, v, column, precision); + if (!Output.CutDateTime64TrailingZeros || precision == 0 || Output.DateTimeFormat != DateTimeOutputFormat.Simple) + { + return text; + } + // date_time_64_output_format_cut_trailing_zeros_align_to_groups_of_thousands: the fraction without its + // trailing zeros, padded to a multiple of three digits (`.120000` -> `.120`, `.1` of DateTime64(1) -> + // `.100`, `.000000` -> nothing). + var digits = text[^precision..].TrimEnd('0'); + var whole = text[..^(precision + 1)]; + return digits.Length == 0 ? whole : whole + "." + digits.PadRight((digits.Length + 2) / 3 * 3, '0'); + } + + private string DateTimeTextAtPrecision(ChType t, object v, IColumn? column, int precision) + { + if (Output.DateTimeFormat != DateTimeOutputFormat.Simple) + { + var (utcSeconds, fraction) = UtcParts(t, v, precision); + return Output.DateTimeFormat == DateTimeOutputFormat.Iso + ? WallClockText(utcSeconds, TimeZoneInfo.Utc).Replace(' ', 'T') + FractionText(fraction, precision) + "Z" + : UnixTimestampText(utcSeconds, fraction, precision); + } + switch (v) + { + case DateTime dt: + { + // The HTTP client gives the wall-clock time of the column's time zone, or the UTC wall clock + // when the type has no time zone. + if (valuesFromHttp && TypeZoneName(t).Length == 0) + { + dt = InHttpServerZone(dt); + } + var fraction7 = dt.Ticks % TimeSpan.TicksPerSecond; + return FormatWallClock(new DateTime(dt.Ticks - fraction7, DateTimeKind.Unspecified), ScaleFraction(fraction7, 7, precision), precision); + } + case DateTimeOffset dto: + { + var fraction7 = dto.Ticks % TimeSpan.TicksPerSecond; + return FormatWallClock(new DateTime(dto.DateTime.Ticks - fraction7, DateTimeKind.Unspecified), ScaleFraction(fraction7, 7, precision), precision); + } + case uint or long: + { + // The TCP client gives the raw count: seconds (DateTime) or units of 10^-precision seconds + // (DateTime64), in the time zone that the client resolved for the column. + var (seconds, fraction) = CountParts(v, precision); + var zone = (column as IDateTimeColumn)?.TimeZone ?? TypeZone(t) ?? sessionTimeZone?.Invoke() ?? TimeZoneInfo.Utc; + return WallClockText(seconds, zone) + FractionText(fraction, precision); + } + default: + throw Mismatch(t, v); + } + } + + private static string FractionText(long fraction, int precision) => + precision > 0 ? "." + fraction.ToString(CultureInfo.InvariantCulture).PadLeft(precision, '0') : string.Empty; + + // A raw count of the TCP client as whole seconds since the epoch and the fraction (0 <= fraction < 10^precision). + private static (long Seconds, long Fraction) CountParts(object v, int precision) + { + var count = Convert.ToInt64(v, CultureInfo.InvariantCulture); + var scale = Pow10(precision); + var seconds = count / scale; + var fraction = count % scale; + if (fraction < 0) + { + seconds--; + fraction += scale; + } + return (seconds, fraction); + } + + // The instant of a value as whole seconds since the epoch and the fraction at the precision of the type. + private static (long Seconds, long Fraction) UtcParts(ChType t, object v, int precision) + { + DateTime utc; + switch (v) + { + case uint or long: + return CountParts(v, precision); + case DateTimeOffset dto: + utc = dto.UtcDateTime; + break; + case DateTime dt when dt.Kind == DateTimeKind.Utc || TypeZoneName(t).Length == 0: + // HTTP: a type without a time zone gives the UTC wall clock. + utc = dt; + break; + case DateTime dt: + { + // HTTP: the wall clock in the zone of the type, with the time-zone database of the client. + var name = TypeZoneName(t); + var zone = DateTimeZoneProviders.Tzdb.GetZoneOrNull(name) + ?? throw new NotSupportedException($"clickhouse-test-runner: the time zone database of the client has no zone {name}"); + utc = LocalDateTime.FromDateTime(dt).InZoneLeniently(zone).ToDateTimeUtc(); + break; + } + default: + throw Mismatch(t, v); + } + var ticks = utc.Ticks - DateTime.UnixEpoch.Ticks; + var seconds = Math.DivRem(ticks, TimeSpan.TicksPerSecond, out var fraction7); + if (fraction7 < 0) + { + seconds--; + fraction7 += TimeSpan.TicksPerSecond; + } + return (seconds, ScaleFraction(fraction7, 7, precision)); + } + + // date_time_output_format = 'unix_timestamp': the count as a decimal number with `precision` digits. + private static string UnixTimestampText(long seconds, long fraction, int precision) + { + if (precision == 0) + { + return seconds.ToString(CultureInfo.InvariantCulture); + } + var scale = Pow10(precision); + var count = ((Int128)seconds * scale) + fraction; + var negative = count < 0; + var abs = negative ? -count : count; + var whole = abs / scale; + var frac = (long)(abs % scale); + return (negative ? "-" : string.Empty) + whole.ToString(CultureInfo.InvariantCulture) + FractionText(frac, precision); + } + + // The range of the server's text: 0000-01-01 00:00:00 .. 9999-12-31 23:59:59 UTC + // (DateLUTImpl::min_representable_time, max_representable_time). + private const long MinRepresentableTime = -62167219200; + private const long MaxRepresentableTime = 253402300799; + private const long SecondsPerDay = 86400; + + /// + /// Writes the wall clock of a Unix time in a zone as the server does (DateLUTImpl::toDateTimeComponents and + /// its out-of-range path): a DateTime64 count can be outside the range of the .NET date types (year 0000, or + /// after 9999-12-31). The server bounds the instant to the representable window and two days, converts it + /// to the local civil time (proleptic Gregorian calendar, with a year 0000), and then clamps a year outside + /// [0000, 9999] to 0000-01-01 00:00:00 or 9999-12-31 23:59:59. + /// + private static string WallClockText(long seconds, TimeZoneInfo zone) + { + seconds = Math.Clamp(seconds, MinRepresentableTime - (2 * SecondsPerDay), MaxRepresentableTime + (2 * SecondsPerDay)); + // The offset at the instant; outside the .NET range, the offset at the nearest end of that range. + var probe = DateTimeOffset.FromUnixTimeSeconds(Math.Clamp(seconds, DateTimeOffset.MinValue.ToUnixTimeSeconds(), DateTimeOffset.MaxValue.ToUnixTimeSeconds())); + var local = seconds + (long)zone.GetUtcOffset(probe).TotalSeconds; + var days = Math.DivRem(local, SecondsPerDay, out var secondOfDay); + if (secondOfDay < 0) + { + days--; + secondOfDay += SecondsPerDay; + } + var (year, month, day) = CivilFromDays(days); + if (year > 9999) + { + return "9999-12-31 23:59:59"; + } + if (year < 0) + { + return "0000-01-01 00:00:00"; + } + return string.Create(CultureInfo.InvariantCulture, $"{year:D4}-{month:D2}-{day:D2} {secondOfDay / 3600:D2}:{secondOfDay / 60 % 60:D2}:{secondOfDay % 60:D2}"); + } + + // Days since 1970-01-01 -> proleptic Gregorian date with a year 0 (H. Hinnant, "civil_from_days"). + private static (long Year, int Month, int Day) CivilFromDays(long z) + { + z += 719468; + var era = (z >= 0 ? z : z - 146096) / 146097; + var doe = z - (era * 146097); + var yoe = (doe - (doe / 1460) + (doe / 36524) - (doe / 146096)) / 365; + var doy = doe - ((365 * yoe) + (yoe / 4) - (yoe / 100)); + var mp = ((5 * doy) + 2) / 153; + var day = (int)(doy - (((153 * mp) + 2) / 5) + 1); + var month = (int)(mp < 10 ? mp + 3 : mp - 9); + var year = yoe + (era * 400) + (month <= 2 ? 1 : 0); + return (year, month, day); + } + + private static TimeZoneInfo? TypeZone(ChType t) + { + var name = TypeZoneName(t); + return name.Length == 0 ? null : FindZone(name); + } + + private static string TypeZoneName(ChType t) => t.LiteralArg(t.Base == "DateTime64" ? 1 : 0); + + // The wall clock of a UTC wall clock in the zone of HttpServerTimezone. + private DateTime InHttpServerZone(DateTime utcWallClock) + { + var name = HttpServerTimezone; + if (string.IsNullOrEmpty(name) || name == "UTC") + { + return utcWallClock; + } + var zone = DateTimeZoneProviders.Tzdb.GetZoneOrNull(name) + ?? throw new NotSupportedException($"clickhouse-test-runner: the time zone database of the client has no zone {name}"); + return Instant.FromDateTimeUtc(DateTime.SpecifyKind(utcWallClock, DateTimeKind.Utc)).InZone(zone).ToDateTimeUnspecified(); + } + + // The alternatives of `Geometry`, in the order of the server's discriminators (sorted by name). + private static readonly IReadOnlyList GeometryAlternatives = + [new("LineString"), new("MultiLineString"), new("MultiPolygon"), new("Point"), new("Polygon"), new("Ring")]; + + private static readonly ConcurrentDictionary PairSequenceTypes = new(); + + private static IReadOnlyList VariantAlternatives(ChType t) => + t.Args.Select(a => a.Type ?? throw Unsupported(t)).ToList(); + + // Tells if the value is a sequence of KeyValuePair: the map form of both clients (MapReadMode.KeyValuePairs, + // and KeyValuePair[] of the TCP client). The element type tells it also for an empty map. + private static bool IsPairSequence(object v) => PairSequenceTypes.GetOrAdd(v.GetType(), static type => + type.GetInterfaces().Append(type).Any(static i => + i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IEnumerable<>) && + i.GetGenericArguments()[0] is { IsGenericType: true } e && e.GetGenericTypeDefinition() == typeof(KeyValuePair<,>))); + + private (object? Key, object? Value) Pair(object? pair, ChType t, object v) + { + if (pair is null) + { + throw Mismatch(t, v); + } + var (key, value) = PairProperties.GetOrAdd(pair.GetType(), static type => + (type.GetProperty("Key") ?? throw new InvalidOperationException("no Key in " + type), + type.GetProperty("Value") ?? throw new InvalidOperationException("no Value in " + type))); + return (key.GetValue(pair), value.GetValue(pair)); + } + + private void RenderSequence(Utf8Buffer b, ChType inner, object v, ChType t, IColumn? innerColumn, int firstRow) + { + // A map (a Dictionary, or a sequence of key-value pairs) and a JSON value are not arrays, also when empty. + if (v is string or IDictionary or JsonNode || v is not IEnumerable items || IsPairSequence(v)) + { + throw Mismatch(t, v); + } + b.Append((byte)'['); + var index = 0; + foreach (var item in items) + { + if (index > 0) + { + b.Append((byte)','); + } + // TCP: element i of the row is row firstRow + i of the inner column. + Render(b, inner, item, true, innerColumn, innerColumn is not null && firstRow >= 0 ? firstRow + index : -1); + index++; + } + b.Append((byte)']'); + } + + private void RenderTuple(Utf8Buffer b, ChType t, object v, ITupleColumn? column, int row) + { + IReadOnlyList items = v switch + { + ITuple tuple => Enumerable.Range(0, tuple.Length).Select(i => tuple[i]).ToList(), + object?[] array => array, + _ => throw Mismatch(t, v), + }; + if (items.Count != t.Args.Count) + { + throw Mismatch(t, v); + } + b.Append((byte)'('); + for (var i = 0; i < items.Count; i++) + { + if (i > 0) + { + b.Append((byte)','); + } + var elementType = t.Args[i].Type ?? throw Unsupported(t); + // TCP: the element columns have the rows of the tuple column. + var child = column is not null && i < column.Children.Count ? column.Children[i] : null; + Render(b, elementType, items[i], true, child, child is null ? -1 : row); + } + b.Append((byte)')'); + } + + // TCP: Nested(a T1, b T2) row r holds the records Offsets[r] .. Offsets[r + 1] - 1, one row of each field + // column; the client gives the row as object[][] (a record is an object[] of its fields). + private void RenderNested(Utf8Buffer b, ChType t, object v, INestedColumn column, int row) + { + if (v is not object?[][] records || column.FieldCount != t.Args.Count) + { + throw Mismatch(t, v); + } + var first = column.Offsets[row]; + b.Append((byte)'['); + for (var i = 0; i < records.Length; i++) + { + if (i > 0) + { + b.Append((byte)','); + } + if (records[i].Length != t.Args.Count) + { + throw Mismatch(t, v); + } + b.Append((byte)'('); + for (var j = 0; j < records[i].Length; j++) + { + if (j > 0) + { + b.Append((byte)','); + } + Render(b, t.Args[j].Type ?? throw Unsupported(t), records[i][j], true, column.GetField(j), first + i); + } + b.Append((byte)')'); + } + b.Append((byte)']'); + } + + private void RenderMap(Utf8Buffer b, ChType t, object v, IMapColumn? column, int row) + { + var kt = Arg(t, 0); + var vt = Arg(t, 1); + // TCP: entry i of the row is row Offsets[row] + i of the key and value columns. + var entryRow = column is not null && row >= 0 ? column.Offsets[row] : -1; + b.Append((byte)'{'); + var first = true; + void Entry(object? key, object? value) + { + if (!first) + { + b.Append((byte)','); + } + first = false; + Render(b, kt, key, true, column?.KeyColumn, entryRow); + b.Append((byte)':'); + Render(b, vt, value, true, column?.ValueColumn, entryRow); + if (entryRow >= 0) + { + entryRow++; + } + } + switch (v) + { + case IDictionary dictionary: + // A Dictionary has no defined order: only a map with less than two entries has one text. + if (dictionary.Count > 1) + { + throw Unsupported(t, "the client gives a Dictionary, which does not keep the server order"); + } + foreach (DictionaryEntry e in dictionary) + { + Entry(e.Key, e.Value); + } + break; + case IEnumerable pairs when v is not JsonNode && IsPairSequence(v): + // MapReadMode.KeyValuePairs (HTTP) and the TCP client keep the server order. + foreach (var pair in pairs) + { + var (key, value) = Pair(pair, t, v); + Entry(key, value); + } + break; + default: + throw Mismatch(t, v); + } + b.Append((byte)'}'); + } + + private void RenderVariant(Utf8Buffer b, ChType t, IReadOnlyList alternatives, object v, bool nested, IColumn? column, int row) + { + if (column is IVariantColumn variant && row >= 0) + { + // TCP: the column tells the alternative of each row. + var discriminator = variant.Discriminators[row]; + if (discriminator == IVariantColumn.NullDiscriminator) + { + b.Append(nested ? "NULL" : Output.NullText); + return; + } + Render(b, ChType.Parse(variant.TypeNames[discriminator]), v, nested, variant.GetTypeColumn(discriminator), variant.LocalIndices[row]); + return; + } + if (column is not null || !valuesFromHttp) + { + throw Unsupported(t, "the client does not give the alternative of a Variant value here"); + } + RenderByAlternatives(b, t, alternatives, v, nested); + } + + /// + /// Writes a Variant value of the HTTP client, which gives the value of the alternative, but not the + /// alternative. The value has one text when each alternative that accepts its .NET type writes the same text + /// for it: a string fits String and an enum with the same text, a list of points fits + /// LineString and Ring. When two alternatives that accept it write different texts (a + /// DateTime fits Date and DateTime), or when the shim has no renderer for an alternative, + /// the text is not known, and the shim reports it. + /// + private void RenderByAlternatives(Utf8Buffer b, ChType t, IReadOnlyList alternatives, object v, bool nested) + { + Utf8Buffer? text = null; + ChType? fit = null; + NotSupportedException? gap = null; + foreach (var alternative in alternatives) + { + var candidate = new Utf8Buffer(); + try + { + Render(candidate, alternative, v, nested); + } + catch (NotSupportedException e) + { + // The shim cannot write this alternative, so it cannot tell if the value is of it. + gap ??= e; + continue; + } + catch (Exception e) when (e is InvalidOperationException or InvalidCastException or ArgumentException or FormatException or OverflowException) + { + // The .NET value is not of this alternative. + continue; + } + if (text is null) + { + text = candidate; + fit = alternative; + } + else if (!text.Span.SequenceEqual(candidate.Span)) + { + throw Unsupported(t, $"the client does not give the alternative; a {v.GetType().Name} fits {fit} and {alternative}, which have different texts"); + } + } + if (text is null) + { + throw gap ?? (Exception)Mismatch(t, v); + } + if (gap is not null) + { + throw Unsupported(t, $"the client does not give the alternative; a {v.GetType().Name} fits {fit}, and the shim cannot write all alternatives ({gap.Message})"); + } + b.Append(text); + } + + private void RenderDynamic(Utf8Buffer b, ChType t, object v, bool nested, IColumn? column, int row) + { + if (column is IDynamicColumn dynamic && row >= 0) + { + // TCP: the column tells the type of each row. + var discriminator = dynamic.Discriminators[row]; + if (discriminator < 0 || discriminator >= dynamic.TypeCount) + { + b.Append(nested ? "NULL" : Output.NullText); + return; + } + Render(b, ChType.Parse(dynamic.TypeNames[discriminator]), v, nested, dynamic.GetTypeColumn(discriminator), dynamic.LocalIndices[row]); + return; + } + if (column is not null || !valuesFromHttp) + { + throw Unsupported(t, "the client does not give the type of a Dynamic value here"); + } + RenderByValue(b, t, v, nested); + } + + /// + /// Writes a Dynamic value of the HTTP client, which gives the value without its type. The .NET type gives the + /// text when each ClickHouse type that the client reads as that .NET type has the same text for the value: + /// all integer types, Float32 (float), Float64 (double), Bool, String, + /// FixedString and the enums (string), UUID, IPv4 and IPv6, the decimals, and + /// arrays, tuples and maps of these. A DateTime (Date, Date32, DateTime, + /// DateTime64(P)), a TimeSpan (Time, Time64(P)) and a JSON value have no single + /// text, and the shim reports them. + /// + private void RenderByValue(Utf8Buffer b, ChType t, object? v, bool nested) + { + switch (v) + { + case null or DBNull: + b.Append(nested ? "NULL" : Output.NullText); + return; + case JsonNode: + throw Unsupported(t, "the client gives the value without its type, as " + v.GetType().Name); + case string: + Render(b, new ChType("String"), v, nested); + return; + case bool: + Render(b, new ChType("Bool"), v, nested); + return; + case sbyte or byte or short or ushort or int or uint or long or ulong or Int128 or UInt128 or BigInteger or Int256 or UInt256: + b.Append(IntegerText(t, v)); + return; + case float: + Render(b, new ChType("Float32"), v, nested); + return; + case double: + Render(b, new ChType("Float64"), v, nested); + return; + case decimal or ClickHouse.Driver.Numerics.ClickHouseDecimal: + b.Append(DecimalText(t, v)); + return; + case Guid: + Render(b, new ChType("UUID"), v, nested); + return; + case IPAddress ip: + Render(b, new ChType(ip.AddressFamily == AddressFamily.InterNetwork ? "IPv4" : "IPv6"), v, nested); + return; + case ITuple tuple: + b.Append((byte)'('); + for (var i = 0; i < tuple.Length; i++) + { + if (i > 0) + { + b.Append((byte)','); + } + RenderByValue(b, t, tuple[i], true); + } + b.Append((byte)')'); + return; + case IDictionary dictionary: + if (dictionary.Count > 1) + { + throw Unsupported(t, "the client gives a Dictionary, which does not keep the server order"); + } + b.Append((byte)'{'); + foreach (DictionaryEntry e in dictionary) + { + RenderByValue(b, t, e.Key, true); + b.Append((byte)':'); + RenderByValue(b, t, e.Value, true); + } + b.Append((byte)'}'); + return; + case IEnumerable pairs when IsPairSequence(v): + { + b.Append((byte)'{'); + var first = true; + foreach (var pair in pairs) + { + if (!first) + { + b.Append((byte)','); + } + first = false; + var (key, value) = Pair(pair, t, v); + RenderByValue(b, t, key, true); + b.Append((byte)':'); + RenderByValue(b, t, value, true); + } + b.Append((byte)'}'); + return; + } + case IEnumerable items: + { + b.Append((byte)'['); + var first = true; + foreach (var item in items) + { + if (!first) + { + b.Append((byte)','); + } + first = false; + RenderByValue(b, t, item, true); + } + b.Append((byte)']'); + return; + } + default: + throw Unsupported(t, $"the client gives the value without its type, and a {v.GetType().Name} has more than one text"); + } + } +} diff --git a/tests/clickhouse-test-runner/README.md b/tests/clickhouse-test-runner/README.md new file mode 100644 index 000000000..cd8e14ea3 --- /dev/null +++ b/tests/clickhouse-test-runner/README.md @@ -0,0 +1,315 @@ +# clickhouse-test-runner + +This harness runs the ClickHouse core SQL tests +([`tests/queries/0_stateless`](https://github.com/ClickHouse/ClickHouse/tree/master/tests/queries/0_stateless)) +through the two clients of this repository: the HTTP client (`ClickHouse.Driver`) and the native TCP client +(`ClickHouse.Driver.Tcp`). + +The upstream test runner +([`tests/clickhouse-test`](https://github.com/ClickHouse/ClickHouse/blob/master/tests/clickhouse-test)) +runs each `.sql` test through `clickhouse-client` and compares the output with the `.reference` file of the +test. This harness is a small .NET program (the shim, `ClickHouse.Driver.TestRunner`) that imitates +`clickhouse-client` well enough for the runner to drive it without changes: the same flags, the same stdin +and `--query` behavior, and the `extract-from-config` shortcut. + +The shim sends every query through one of the two clients, with the client's public API. It reads each value +with the client's normal type mapping, and writes the values as `TabSeparated` text itself. Thus a test +passes only when the client decodes every value correctly. `CLICKHOUSE_TEST_RUNNER_PROTOCOL` selects the +protocol: + +| Protocol | Client | API | +|---|---|---| +| `http` (default) | `ClickHouse.Driver` | ADO.NET: `ClickHouseConnection`, `ClickHouseCommand`, `ClickHouseDataReader.GetValue` (RowBinary over HTTP) | +| `tcp` | `ClickHouse.Driver.Tcp` | `ClickHouseTcpClient.OpenSessionAsync`, `IClickHouseTcpSession.StreamAsync`, `IColumn.GetValue` (Native) | + +The shim is a port of the +[Go harness](https://github.com/ClickHouse/clickhouse-go/pull/2141). It is not in +`ClickHouse.Driver.sln` and not in the NuGet package. + +## Run the tests locally + +You need the .NET 10 SDK, Python 3 with `jinja2`, and Docker. The TCP client and the shim read the tz +database of the system, and some tests use legacy zone names (`US/Samoa`): on Ubuntu, install `tzdata-legacy` +too. Run the commands from the root of the repository. + +1. Start the pinned ClickHouse server. The version is in [`clickhouse-version`](clickhouse-version): + + ```bash + docker run -d --name clickhouse -p 8123:8123 -p 9000:9000 --ulimit nofile=262144:262144 \ + --hostname "$(hostname)" -e CLICKHOUSE_SKIP_USER_SETUP=1 \ + "clickhouse/clickhouse-server:$(tests/clickhouse-test-runner/scripts/pinned-version.sh)" + ``` + + `CLICKHOUSE_SKIP_USER_SETUP=1` keeps the `default` user of the image: without it, the user without a + password can connect only from inside the container. `tests/clickhouse-test` replaces its own host name + with `localhost` in the output of each test, and some `.reference` files have `localhost` for + `hostName()`, so the server gets the host name of your machine. + +2. Get the upstream tests of the same version: + + ```bash + tests/clickhouse-test-runner/scripts/fetch-upstream.sh + ``` + + The script checks out the release tag of the pinned version (for example `v26.10.4.207-stable`) into + `.upstream/ClickHouse`, sparse and shallow. The same server build made the `.reference` files of that tag. + The script also generates + [`ClickHouse.Driver.TestRunner/ErrorCodes.g.cs`](ClickHouse.Driver.TestRunner/ErrorCodes.g.cs) from the + same checkout. To try another version, give it as the argument (`fetch-upstream.sh 26.11.1.10`), and + start the server of that version. + + The run script stops when the server and the tests are of different versions, because then the + `.reference` files do not match. Set `ALLOW_VERSION_MISMATCH=1` to run anyway. + +3. Run the allowlisted tests over each protocol: + + ```bash + pip install jinja2 + tests/clickhouse-test-runner/scripts/run-upstream-tests.sh -j 8 + CLICKHOUSE_TEST_RUNNER_PROTOCOL=tcp tests/clickhouse-test-runner/scripts/run-upstream-tests.sh -j 8 + ``` + +The run script builds the shim with [`scripts/build.sh`](scripts/build.sh) (`dotnet publish`, Release, +ReadyToRun) into `.bin/publish`, writes the `.bin/clickhouse` command and its `clickhouse-client` symlink, +puts `.bin` first in `PATH` for the runner only, and starts `tests/clickhouse-test`. It gives the runner +`--no-stateful --no-random-settings --no-random-merge-tree-settings --max-failures-chain 1000000`; other +arguments go to the runner after these. `--max-failures-chain` turns off a limit of the runner: by default it +stops after 20 failures in a row. To run any one test, also one that is not in the allowlist: + +```bash +UPSTREAM_TEST_LIST=<(echo 00001_select_1) tests/clickhouse-test-runner/scripts/run-upstream-tests.sh +``` + +The runner writes the diff of a failed test to its own output. The output of the test is next to the test, +in `.upstream/ClickHouse/tests/queries/0_stateless/..stdout` and `.stderr`. A test that runs alone +(the `no-parallel` tag, or all tests without `-j`) writes `.stdout` and `.stderr`. + +The unit tests of the shim need no server. The live tests compare the output of the shim with the server's +own `TabSeparated` output, over both protocols, and need the server of step 1: + +```bash +CLICKHOUSE_TEST_RUNNER_LIVE=1 dotnet test \ + tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/ClickHouse.Driver.TestRunner.Tests.csproj +``` + +To run one statement through the shim, build it once and call it as `clickhouse-client`: + +```bash +tests/clickhouse-test-runner/scripts/build.sh +tests/clickhouse-test-runner/.bin/clickhouse-client --query "SELECT [1, 2], map('a', 1)" +CLICKHOUSE_TEST_RUNNER_PROTOCOL=tcp tests/clickhouse-test-runner/.bin/clickhouse-client --query "SELECT 1" +``` + +### Environment variables + +| Variable | Default | Description | +|---|---|---| +| `CLICKHOUSE_TEST_RUNNER_PROTOCOL` | `http` | The client: `http` (`ClickHouse.Driver`) or `tcp` (`ClickHouse.Driver.Tcp`). | +| `UPSTREAM_CLICKHOUSE_DIR` | `.upstream/ClickHouse` | The checkout of `ClickHouse/ClickHouse`. | +| `UPSTREAM_REPO_URL` | the `ClickHouse/ClickHouse` repository on GitHub | The repository that `fetch-upstream.sh` checks out. | +| `UPSTREAM_TEST_LIST` | `allowlist.txt` | The file with the tests to run. | +| `SHARD_INDEX`, `SHARD_TOTAL` | `1`, `1` | Run only shard `SHARD_INDEX` of `SHARD_TOTAL` round-robin shards of the list. | +| `KNOWN_FAILURES` | (none) | Run the known failures of these groups instead of the allowlist: comma-separated IDs, or `all`. | +| `RETRY_FAILED` | `0` | Run the failed tests again, at most this many times. See [CI](#ci). | +| `SKIP_BUILD` | `0` | `1`: do not build; use the shim in `.bin` as it is. | +| `ALLOW_VERSION_MISMATCH` | `0` | `1`: run also when the server and the upstream tests are of different versions. | +| `CLICKHOUSE_CLIENT_CLI_LOG` | (none) | A file. Each invocation of the shim adds its arguments (the `--password` value hidden), statements and errors to it. | +| `CLICKHOUSE_HOST` | `localhost` | The server host, for the runner, the version check of the run script and the live tests. | +| `CLICKHOUSE_PORT_TCP`, `CLICKHOUSE_PORT_HTTP` | `9000`, `8123` | The ports of the server. When `CLICKHOUSE_PORT_TCP` is set, the runner gives `--port=$CLICKHOUSE_PORT_TCP`; with `http`, the shim uses `CLICKHOUSE_PORT_HTTP` for it. With `--secure`, the shim maps `CLICKHOUSE_PORT_TCP_SECURE` (`9440`) to `CLICKHOUSE_PORT_HTTPS` (`8443`) in the same way. | +| `CLICKHOUSE_TEST_RUNNER_LIVE` | (none) | `1`: run the live tests of `ClickHouse.Driver.TestRunner.Tests` (they read `CLICKHOUSE_HOST` and the two ports). | +| `CLICKHOUSE_CONTAINER` | `clickhouse` | The server container, for `run-with-real-client.sh`. | + +Do not set `CLICKHOUSE_DATABASE`: `tests/clickhouse-test` then gives the client `--database` two times. The +real `clickhouse-client` (`run-with-real-client.sh`) refuses this, and every test fails. + +## The allowlist + +[`allowlist.txt`](allowlist.txt) lists the tests that pass reliably, one test name (the file name without +`.sql`) per line. `#` starts a comment. The script gives the runner anchored regular expressions, so each +name selects exactly one test. (The runner itself matches each name as a substring, so `00396_uuid` would +also select `00396_uuid_v7`.) + +The file has four kinds of lines: + +| Line | Meaning | +|---|---| +| `00001_select_1` | The test runs over both protocols. | +| `00015_totals_having_constants # only=tcp: ` | The test runs over that protocol only, because it cannot pass over the other one for an environment cause (for example, the server sends no `WITH TOTALS` row in the HTTP `RowBinary` output). | +| `01523_interval_operator_support_string_literal # known=http: [http-type-interval]` | A **known failure over one protocol**: a bug of that client or a gap of the shim. The test runs over the other protocol. | +| `# 02243_make_date32 # [date32-year-zero]` | A **known failure over both protocols**: the test does not run. | + +The ID in brackets names the group of the known failure. The known failures are at the end of the file, one +section per group. The header of the group describes the cause, names the protocols and gives the number of +tests per protocol. The header of a client group also gives a small reproduction and has an `Issue:` line; a +shim group has `shim:` in its first line. A `known=` line is in the section of its group. + +The run script reads only one group per line. So a test that fails for two causes is in the section of one +group, and the header of the other group names it ("Also:"). A test can fail over one protocol for an +environment cause and over the other for a client bug. Then its line is `# # []`, and its group +header gives the environment cause. + +To run the known failures of one or more groups, for example to check a fix: + +```bash +KNOWN_FAILURES=http-type-interval tests/clickhouse-test-runner/scripts/run-upstream-tests.sh +KNOWN_FAILURES=all CLICKHOUSE_TEST_RUNNER_PROTOCOL=tcp tests/clickhouse-test-runner/scripts/run-upstream-tests.sh --timeout 120 +``` + +Over a protocol, `KNOWN_FAILURES` selects the `# # []` lines and the `known=` lines of +that protocol. Some known failures over `tcp` hang until the timeout of the runner (600 s; see the group +`[tcp-insert-needs-client-data]`), so give `--timeout 120` for a run of all groups. + +When a fix makes the tests of a group pass, change their lines: `# # []` becomes ``, and +` # known=: []` becomes ``. When all tests of a group pass, remove the group +header. + +### Grow the allowlist + +1. Run the candidate tests through the harness over **both** protocols. To try all `.sql` tests: + + ```bash + ls tests/clickhouse-test-runner/.upstream/ClickHouse/tests/queries/0_stateless \ + | sed -nE 's/\.sql(\.j2)?$//p' | sort -u > /tmp/candidates.txt + for p in http tcp; do + CLICKHOUSE_TEST_RUNNER_PROTOCOL=$p UPSTREAM_TEST_LIST=/tmp/candidates.txt \ + tests/clickhouse-test-runner/scripts/run-upstream-tests.sh -j 6 --no-long --timeout 120 \ + | tee /tmp/run-$p.log + done + ``` + + Run the protocols one after the other, not at the same time: the memory pressure on the server causes + `MEMORY_LIMIT_EXCEEDED` failures that are not real. + +2. Keep the tests that report `[ OK ]` over both protocols: + + ```bash + comm -12 \ + <(sed -nE 's/^.*\] ([^ :]+): +\[ OK \].*/\1/p' /tmp/run-http.log | sort -u) \ + <(sed -nE 's/^.*\] ([^ :]+): +\[ OK \].*/\1/p' /tmp/run-tcp.log | sort -u) + ``` + + Find the cause of each test that fails over one protocol or both (see [`AGENTS.md`](AGENTS.md)), and add + it as an `only=`, `known=` or `# # []` line. + +3. Run the new allowlist three times on a fresh server, with `-j` higher than CI uses, over each protocol. + Find the cause of each failure before you remove a test. + +**Rule:** add only tests that pass reliably. Before you remove a test or decide not to add it, find out +whether it fails because of a bug in the client. The harness exists to find those bugs. See +[`AGENTS.md`](AGENTS.md) for the steps. + +To compare with the real `clickhouse-client`, run the same tests through it, in the server container: + +```bash +UPSTREAM_TEST_LIST=<(echo 01523_interval_operator_support_string_literal) \ + tests/clickhouse-test-runner/scripts/run-with-real-client.sh +``` + +A test that passes there and fails through the shim shows a bug in the client or in the shim. + +## How the shim imitates clickhouse-client + +The shim sends nothing that `clickhouse-client` does not send, because some tests read their own queries from +`system.query_log`. + +- **Statements.** The shim splits the input into statements as `clickhouse-client` does: at a top-level `;`, + with the same-line trailing comment kept with its statement. It sends each statement with its `;`. The + inline data of `INSERT ... FORMAT ` (other than `Values`) ends at an empty line. The `-- Tags:` header + is not part of a statement. Every statement runs, with or without `--multiquery`. +- **Test hints.** `-- { serverError X }`, `-- { clientError X }` and `-- { error X }` (codes or names) make + the error the expected result. A hint in a leading comment is ignored, as upstream. Through a client, the + server finds all errors, so a server error can satisfy a `clientError` hint. `-- { echo }`, + `-- { echoOn }` and `-- { echoOff }` print the statements, but not a statement with a syntax error + (`clickhouse-client` parses before it echoes). `-- { retry ... }` is not supported. +- **Sessions.** `SET`, `USE` and temporary tables last for the whole invocation. + - `http`: all requests of an invocation have the same session ID (`UseSession`, `SessionId`). The client + sends the database of the connection with each request, so a `USE` calls + `ClickHouseConnection.ChangeDatabase`. + - `tcp`: the session is one connection (`OpenSessionAsync`, `MaxPoolSize=1`). The TCP client closes the + session after a server exception, also after one that a hint expects + (`[tcp-session-lost-on-error]` in the allowlist). The shim then opens a new session and runs the `USE` and + `SET` statements of the invocation again. Other session state, such as a temporary table, is lost. +- **Statement types.** Statements that start with `SELECT`, `WITH`, `FROM`, `SHOW`, `DESC`, `DESCRIBE`, + `EXISTS`, `EXPLAIN`, `CHECK` or `KILL` return rows: `ExecuteReaderAsync` (`http`) or `StreamAsync` + (`tcp`). All other statements run with `ExecuteNonQueryAsync` (`http`) or `ExecuteAsync` (`tcp`). After + `SET dialect` to another language (KQL, PRQL, ...), every statement other than `SET` returns rows. Over + `http`, the shim removes the trailing `;` of such a statement. After `SET implicit_select = 1`, an + expression alone (`1 + 2`) also returns rows. +- **Values.** The shim renders the value that the client gives (`ClickHouseDataReader.GetValue` or + `IColumn.GetValue`), directed by the column type of the result (`GetDataTypeName` or `IColumn.TypeName`), + as the server writes `TabSeparated`. Over `http`, the connection uses `MapReadMode=KeyValuePairs`, the + option of the client that keeps the server order of the map entries and repeated keys. The renderer also + follows the output settings of the session and the query: `date_time_output_format`, + `format_tsv_null_representation`, `output_format_decimal_trailing_zeros` and + `date_time_64_output_format_cut_trailing_zeros_align_to_groups_of_thousands`. +- **Output formats.** The clients read results as `RowBinaryWithNamesAndTypes` (`http`) or `Native` (`tcp`), + and the shim writes them in the `TabSeparated` family (also `TSVRaw` and `...WithNames[AndTypes]`) or + `Null`. A statement with any other output format fails. Over `tcp`, the shim sends the statement as it is + (the server ignores the `FORMAT` clause). Over `http`, it removes the clause, except for `FORMAT Null`. + Where the SQL parser expects an operand, `format` is a name and not the clause (`SELECT * FROM format f`, + `SELECT format TSV`), as for the server. +- **Totals and extremes.** Over `tcp`, the totals and the extremes come from `ClickHouseTcpQueryCallbacks`, + and the shim writes an empty line before each block, as the server does. The HTTP `RowBinary` output has + no totals and no extremes, so such tests run over `tcp` only. +- **Settings.** Of the settings on the command line, only `log_comment`, `max_insert_threads`, `max_threads` + and `send_logs_level` go to the server, with each query (`ClickHouseCommand.CustomSettings` or + `ClickHouseTcpQueryOptions.Settings`), as in `clickhouse-client`. The runner's feature-tag overrides + `async_insert` and `enable_parallel_replicas` go too, when their value is `0`. A `SET` of the same setting + in the test replaces the command-line value. `--param_=` gives a query parameter to the + statements that use it. +- **Errors.** An unexpected error stops the shim. It writes the error with its code and name to stderr, and + the exit code is the error code modulo 256. Otherwise the shim writes nothing to stderr. +- **Error names.** [`ErrorCodes.g.cs`](ClickHouse.Driver.TestRunner/ErrorCodes.g.cs) maps the error names + of test hints to codes. [`scripts/fetch-upstream.sh`](scripts/fetch-upstream.sh) generates it from + `src/Common/ErrorCodes.cpp` of the upstream checkout, so it always matches the tests. Commit the file when + it changes. +- **Config.** `clickhouse extract-from-config --key listen_host` prints `127.0.0.1`; other keys print + nothing. + +## Known failures + +The end of [`allowlist.txt`](allowlist.txt) lists the tests that fail because of a bug in one of the clients +or a gap in the shim, in groups. Each group header describes the cause and names the protocols; a client group +also gives a small reproduction. A test that cannot pass for an environment cause (a cluster, ZooKeeper, server +configuration, features of `clickhouse-client` itself) is not listed; see +[`AGENTS.md`](AGENTS.md#environment-causes). The shim does not try `.sh` tests. + +One known failure can pass without a fix: `03024_total_rows_approx_is_set_for_system_zeros_and_generate_random` +uses `generateRandom()` without a structure, and fails over `tcp` only when the random structure has a tuple +of more than 7 elements (`[tcp-tuple-over-7-elements]`). + +## CI + +[`upstream-sql-tests.yml`](../../.github/workflows/upstream-sql-tests.yml) runs the allowlist nightly, +manually, and on pushes and pull requests that change this directory or the workflow. A pull request that +changes only the clients does not start it; the nightly run tests the clients of `main`. + +- The `build` job builds the shim once (`scripts/build.sh`), and the test jobs use it. The `harness-tests` job + runs the unit and live tests of the shim. +- The matrix of the test jobs is `{protocol: http, tcp} × {shard: 1..8}`, at `-j 4` on 4-vCPU runners. +- CI does not stop a shard after 20 failures in a row (`--max-failures-chain`, see above), so a failed run + shows all the failures of its shard. +- CI does not run the failed tests again: no known client bug makes random tests fail, so a failed test fails + the job. If such a bug appears, `RETRY_FAILED=` runs the failed tests again, at most `n` times: a test + that passes on a retry shows as a warning, and a test that fails every time fails the job. Do not set + `RETRY_FAILED` when you grow or check the allowlist: a test that needs a retry is not reliable. +- The server version and the upstream tests are pinned together in [`clickhouse-version`](clickhouse-version). + A new ClickHouse release changes nothing in CI, so a pull request never fails because of a release that it + does not touch. A bump is a pull request of its own; see [`AGENTS.md`](AGENTS.md#bump-the-server-version). +- The `clickhouse_version` input of a manual run tries another version without a commit, for example before a + bump. The version must have a `clickhouse/clickhouse-server:` image and a `v-stable` tag + upstream. An LTS release has a `v-lts` tag instead, so the input does not take it. +- When an allowlisted test is not in the checkout (upstream renamed or removed it), the run shows a warning + with the names. +- A failed job uploads the output of the runner (with the diffs), the log of the shim + (`CLICKHOUSE_CLIENT_CLI_LOG`), the error log of the server, and the `.stdout` and `.stderr` files of the + failed tests. +- If a shard takes much more than a few minutes, increase the number of shards: change the `shard` list and + `SHARD_TOTAL` together. +- A pull request that changes only Markdown files in this directory does not start the workflow. + +## Bump the server version + +A bump of [`clickhouse-version`](clickhouse-version) is a pull request of its own. Try the new version with a +manual run first, find the cause of each new failure, and commit the new `ErrorCodes.g.cs` with the pin. The +steps are in [`AGENTS.md`](AGENTS.md#bump-the-server-version). diff --git a/tests/clickhouse-test-runner/allowlist.txt b/tests/clickhouse-test-runner/allowlist.txt new file mode 100644 index 000000000..1191a1cbc --- /dev/null +++ b/tests/clickhouse-test-runner/allowlist.txt @@ -0,0 +1,11253 @@ +# Upstream ClickHouse SQL tests (tests/queries/0_stateless) that run through +# ClickHouse.Driver. See README.md for the format and AGENTS.md for the rules. +# +# runs over both protocols (http, tcp) +# # only=: runs over that protocol only +# # known=: [] known failure of group over that +# protocol; runs over the other protocol +# # # [] known failure of group over both +# protocols; does not run +# +# The known failures are at the end of this file, one section per group. +# A known= line is in the section of its group. KNOWN_FAILURES= +# selects the tests of a group (see README.md). +# +# Running: http 10073, tcp 10414 (10010 over both protocols, +# 155 only=tcp, 1 only=http, 249 known=http, 62 known=tcp). +# Known failures: 655 tests (http 589, tcp 406) in 36 groups +# (29 client, 7 shim). + +00001_select_1 +00002_system_numbers +00003_reinterpret_as_string +00007_array +00008_array_join +00009_array_join_subquery +00010_big_array_join +00011_array_join_alias +00012_array_join_alias_2 +00013_create_table_with_arrays +00014_select_from_table_with_nested +00015_totals_having_constants # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +00016_totals_having_constants # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +00018_distinct_in_subquery +00020_sorting_arrays +00021_sorting_arrays +00022_func_higher_order_and_constants +00023_agg_select_agg_subquery +00024_unused_array_join_in_subquery +00025_implicitly_used_subquery_column +00027_argMinMax +00027_distinct_and_order_by +00027_simple_argMinArray +00030_alter_table +00031_parser_number +00032_fixed_string_to_string +00033_fixed_string_to_string +00034_fixed_string_to_number +00035_function_array_return_type +00036_array_element +00038_totals_limit # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +00040_array_enumerate_uniq +00041_aggregation_remap +00041_big_array_join +00042_set +00043_summing_empty_part +00044_sorting_by_string_descending +00045_sorting_by_fixed_string_descending +00046_stored_aggregates_simple +00047_stored_aggregates_complex +00048_a_stored_aggregates_merge +00048_b_stored_aggregates_merge +00049_any_left_join +00050_any_left_join +00051_any_inner_join +00052_all_left_join +00053_all_inner_join +00054_join_string +00055_join_two_numbers +00056_join_number_string +00057_join_aliases +00060_date_lut +00061_merge_tree_alter +00063_check_query +00064_negate_bug +00066_group_by_in +00067_replicate_segfault +00068_empty_tiny_log +00069_date_arithmetic +00071_insert_fewer_columns +00072_in_types +00073_merge_sorting_empty_array_joined +00076_ip_coding_functions +00077_set_keys_fit_128_bits_many_blocks +00078_string_concat +00079_defaulted_columns +00080_show_tables_and_system_tables # only=tcp: the test drops the current database; over HTTP each later request fails +00081_int_div_or_zero +00082_append_trailing_char_if_absent +00084_summing_merge_tree +00086_concat_nary_const_with_nonconst_segfault +00087_distinct_of_empty_arrays +00087_math_functions +00088_distinct_of_arrays_of_strings +00089_group_by_arrays_of_fixed +00096_aggregation_min_if +00098_1_union_all +00098_2_union_all +00098_3_union_all +00098_4_union_all +00098_5_union_all +00098_6_union_all +00098_7_union_all +00098_8_union_all +00098_9_union_all +00098_a_union_all +00098_b_union_all +00098_c_union_all +00098_d_union_all +00098_e_union_all +00098_f_union_all +00098_g_union_all +00098_h_union_all +00098_j_union_all +00098_l_union_all +00099_join_many_blocks_segfault +00101_materialized_views_and_insert_without_explicit_database +00102_insert_into_temporary_table +00103_ipv4_num_to_string_class_c +00104_totals_having_mode # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +00106_totals_after_having # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +00107_totals_after_having # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +00110_external_sort +00114_float_type_result_of_division +00116_storage_set +00117_parsing_arrays +00118_storage_join # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +00119_storage_join # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +00120_join_and_group_by +00122_join_with_subquery_with_subquery +00125_array_element_of_array_of_tuple +00126_buffer +00127_group_by_concat +00128_group_by_number_and_fixed_string +00129_quantile_timing_weighted +00131_set_hashed +00132_sets +00134_aggregation_by_fixed_string_of_size_1_2_4_8 +00135_duplicate_group_by_keys_segfault +00136_duplicate_order_by_elems +00137_in_constants +00138_table_aliases +00140_parse_unix_timestamp_as_datetime +00140_prewhere_column_order +00141_parse_timestamp_as_datetime +00142_parse_timestamp_as_datetime +00143_number_classification_functions +00144_empty_regexp +00145_empty_likes +00146_summing_merge_tree_nested_map +00147_alter_nested_default +00148_summing_merge_tree_aggregate_function +00148_summing_merge_tree_nested_map_multiple_values +00149_function_url_hash +00150_with_totals_and_join # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +00151_tuple_with_array +00152_totals_in_subquery # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +00153_transform +00156_array_map_to_constant +00156_max_execution_speed_sample_merge +00157_aliases_and_lambda_formal_parameters +00158_buffer_and_nonexistent_table +00159_whitespace_in_columns_list +00160_merge_and_index_in_in +00161_rounding_functions +00164_not_chain +00165_transform_non_const_default +00166_functions_of_aggregation_states +00167_settings_inside_query +00168_buffer_defaults +00169_join_constant_keys +00170_lower_upper_utf8 +00172_constexprs_in_set +00173_compare_date_time_with_constant_string +00174_compare_date_time_with_constant_string_in_in +00175_if_num_arrays +00176_if_string_arrays +00178_function_replicate +00178_query_datetime64_index +00179_lambdas_with_common_expressions_and_filter +00180_attach_materialized_view +00181_aggregate_functions_statistics +00181_aggregate_functions_statistics_stable +00182_functions_higher_order_and_consts +00185_array_literals +00187_like_regexp_prefix +00188_constants_as_arguments_of_aggregate_functions +00190_non_constant_array_of_constant_data +00191_aggregating_merge_tree_and_final +00192_least_greatest +00193_parallel_replicas +00194_identity +00196_float32_formatting +00197_if_fixed_string +00198_group_by_empty_arrays +00199_ternary_operator_type_check +00201_array_uniq +00202_cross_join +00203_full_join +00204_extract_url_parameter +00205_emptyscalar_subquery_type_mismatch_bug +00205_scalar_subqueries +00206_empty_array_to_single +00207_left_array_join +00208_agg_state_merge +00209_insert_select_extremes +00214_primary_key_order +00216_bit_test_function_family +00218_like_regexp_newline +00219_full_right_join_column_order +00222_sequence_aggregate_function_family +00225_join_duplicate_columns +00227_quantiles_timing_arbitrary_order +00229_prewhere_column_missing +00230_array_functions_has_count_equal_index_of_non_const_second_arg +00232_format_readable_decimal_size +00232_format_readable_size +00233_position_function_family +00233_position_function_sql_comparibilty +00234_disjunctive_equality_chains_optimization +00235_create_temporary_table_as +00237_group_by_arrays +00238_removal_of_temporary_columns +00239_type_conversion_in_in +00240_replace_substring_loop +00250_tuple_comparison +00251_has_types +00253_insert_recursive_defaults +00254_tuple_extremes # only=tcp: no extremes in the HTTP RowBinary output +00255_array_concat_string +00256_reverse +00258_materializing_tuples +00259_hashing_tuples +00261_storage_aliases_and_array_join +00262_alter_alias +00263_merge_aggregates_and_overflow +00264_uniq_many_args +00266_read_overflow_mode +00267_tuple_array_access_operators_priority +00268_aliases_without_as_keyword +00269_database_table_whitespace +00270_views_query_processing_stage +00271_agg_state_and_totals # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +00272_union_all_and_in_subquery +00273_quantiles +00276_sample +00277_array_filter +00278_insert_already_sorted +00279_quantiles_permuted_args +00280_hex_escape_sequence +00282_merging +00283_column_cut +00287_column_const_with_nan +00288_empty_stripelog +00291_array_reduce +00292_parser_tuple_element +00296_url_parameters +00299_stripe_log_multiple_inserts +00306_insert_values_and_expressions +00311_array_primary_key +00312_position_case_insensitive_utf8 +00314_sample_factor_virtual_column +00315_quantile_off_by_one +00316_rounding_functions_and_empty_block +00317_in_tuples_and_out_of_range_values +00318_pk_tuple_order +00319_index_for_like +00320_between +00321_pk_set +00323_quantiles_timing_bug +00324_hashing_enums +00327_summing_composite_nested +00330_view_subqueries +00331_final_and_prewhere +00331_final_and_prewhere_condition_ver_column +00332_quantile_timing_memory_leak +00333_parser_number_bug +00334_column_aggregate_function_limit +00338_replicate_array_of_strings +00340_squashing_insert_select +00341_squashing_insert_select2 +00342_escape_sequences +00343_array_element_generic +00344_row_number_in_all_blocks +00345_index_accurate_comparison +00346_if_tuple +00347_has_tuple +00348_tuples +00349_visible_width +00350_count_distinct +00351_select_distinct_arrays_tuples +00352_external_sorting_and_constants +00353_join_by_tuple +00355_array_of_non_const_convertible_types +00356_analyze_aggregations_and_union_all +00357_to_string_complex_types +00358_from_string_complex_types +00359_convert_or_zero_functions +00360_to_date_from_string_with_datetime +00361_shared_array_offsets_and_squash_blocks +00362_great_circle_distance +00363_defaults +00364_java_style_denormals +00369_int_div_of_float +00370_duplicate_columns_in_subqueries +00371_union_all +00373_group_by_tuple +00374_any_last_if_merge +00381_first_significant_subdomain +00384_column_aggregate_function_insert_from +00386_enum_in_pk +00386_has_column_in_table +00388_enum_with_totals # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +00389_concat_operator +00390_array_sort +00392_enum_nested_alter +00394_new_nested_column_keeps_offsets +00394_replaceall_vector_fixed +00395_nullable +00396_uuid +00396_uuid_v7 +00397_tsv_format_synonym +00398_url_functions +00399_group_uniq_array_date_datetime +00401_merge_and_stripelog +00402_nan_and_extremes # only=tcp: no extremes in the HTTP RowBinary output +00403_to_start_of_day +00404_null_literal +00410_aggregation_combinators_with_arenas +00411_merge_tree_where_const_in_set +00412_logical_expressions_optimizer +00413_distinct +00413_least_greatest_new_behavior +00414_time_zones_direct_conversion +00420_null_in_scalar_subqueries +00422_hash_function_constexpr +00423_storage_log_single_thread +00425_count_nullable +00426_nulls_sorting +00429_point_in_ellipses +00431_if_nulls +00432_aggregate_function_scalars_and_constants +00433_ifnull +00434_tonullable +00435_coalesce +00436_fixed_string_16_comparisons +00437_nulls_first_last +00438_bit_rotate +00439_fixed_string_filter +00440_nulls_merge_tree +00441_nulls_in +00442_filter_by_nullable +00444_join_use_nulls +00445_join_nullable_keys +00447_foreach_modifier +00448_replicate_nullable_tuple_generic +00448_to_string_cut_to_zero +00449_filter_array_nullable_tuple +00450_higher_order_and_nullable +00451_left_array_join_and_constants +00452_left_array_join_and_nullable +00453_cast_enum +00453_top_k +00456_alter_nullable +00457_log_tinylog_stripelog_nullable +00458_merge_type_cast +00459_group_array_insert_at +00461_default_value_of_argument_type +00462_json_true_false_literals +00464_array_element_out_of_range +00464_sort_all_constant_columns +00465_nullable_default +00466_comments_in_keyword +00467_qualified_names +00468_array_join_multiple_arrays_and_use_original_column +00469_comparison_of_strings_containing_null_char +00470_identifiers_in_double_quotes +00471_sql_style_quoting +00472_compare_uuid_with_constant_string +00472_create_view_if_not_exists +00475_in_join_db_table +00477_parsing_data_types +00479_date_and_datetime_to_number +00480_mac_addresses +00481_create_view_for_null +00481_reading_from_last_granula +00482_subqueries_and_aliases +00483_cast_syntax +00483_reading_from_array_structure +00484_preferred_max_column_in_block_size_bytes +00486_if_fixed_string +00487_if_array_fixed_string +00488_column_name_primary +00488_non_ascii_column_names +00489_pk_subexpression +00490_with_select +00492_drop_temporary_table +00495_reading_const_zero_column +00498_array_functions_concat_slice_push_pop +00498_bitwise_aggregate_functions +00499_json_enum_insert +00500_point_in_polygon +00500_point_in_polygon_2d_const +00500_point_in_polygon_3d_const +00500_point_in_polygon_bug +00500_point_in_polygon_bug_2 +00500_point_in_polygon_bug_3_linestring_rotation_precision +00500_point_in_polygon_empty_bound +00500_point_in_polygon_nan +00500_point_in_polygon_non_const_poly +00502_custom_partitioning_local +00502_string_concat_with_array +00502_sum_map +00503_cast_const_nullable +00504_mergetree_arrays_rw +00507_sumwithoverflow +00508_materialized_view_to +00511_get_size_of_enum +00513_fractional_time_zones +00515_enhanced_time_zones +00515_gcd_lcm +00516_is_inf_nan +00516_modulo +00517_date_parsing +00518_extract_all_and_empty_matches +00519_create_as_select_from_temporary_table +00520_tuple_values_interpreter +00521_multidimensional +00522_multidimensional +00523_aggregate_functions_in_group_array +00524_time_intervals_months_underflow +00525_aggregate_functions_of_nullable_that_return_non_nullable +00526_array_join_with_arrays_of_nullable +00527_totals_having_nullable # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +00528_const_of_nullable +00529_orantius +00530_arrays_of_nothing +00531_aggregate_over_nullable +00532_topk_generic +00533_uniq_array +00534_exp10 +00535_parse_float_scientific +00536_int_exp +00536_int_exp_overflow +00537_quarters +00538_datediff +00538_datediff_plural_units +00539_functions_for_working_with_json +00541_kahan_sum +00541_to_start_of_fifteen_minutes +00542_access_to_temporary_table_in_readonly_mode +00542_materialized_view_and_time_zone_tag +00543_null_and_prewhere +00544_agg_foreach_of_two_arg +00544_insert_with_select +00545_weird_aggregate_functions +00547_named_tuples +00548_slice_of_nested +00549_join_use_nulls +00551_parse_or_null +00552_logical_functions_simple +00552_logical_functions_ternary +00552_logical_functions_uint8_as_bool +00552_or_nullable +00553_buff_exists_materlized_column +00553_invalid_nested_name +00554_nested_and_table_engines +00555_hasAll_hasAny +00555_hasSubstr +00555_right_join_excessive_rows +00556_array_intersect +00556_remove_columns_from_subquery +00557_alter_null_storage_tables +00557_array_resize +00558_aggregate_merge_totals_with_arenas # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +00558_parse_floats +00559_filter_array_generic +00560_float_leading_plus_in_exponent +00561_storage_join +00562_in_subquery_merge_tree +00562_rewrite_select_expression_with_union +00563_complex_in_expression +00564_initial_column_values_with_default_expression +00564_temporary_table_management +00564_versioned_collapsing_merge_tree +00566_enum_min_max +00567_parse_datetime_as_unix_timestamp +00568_empty_function_with_fixed_string +00570_empty_array_is_const +00571_alter_nullable +00571_non_exist_database_when_create_materializ_view # only=tcp: the test drops the current database; over HTTP each later request fails +00572_aggregation_by_empty_set +00575_merge_and_index_with_function_in_in +00576_nested_and_prewhere +00577_full_join_segfault +00578_merge_table_and_table_virtual_column +00578_merge_table_sampling +00578_merge_table_shadow_virtual_column +00578_merge_trees_without_primary_key +00579_merge_tree_partition_and_primary_keys_using_same_expression +00579_virtual_column_and_lazy +00580_cast_nullable_to_non_nullable +00580_consistent_hashing_functions +00581_limit_on_result_and_subquery_and_insert +00582_not_aliasing_functions +00583_limit_by_expressions +00584_view_union_all +00587_union_all_type_conversions +00589_removal_unused_columns_aggregation +00590_limit_by_column_removal +00591_columns_removal_union_all +00592_union_all_different_aliases +00593_union_all_assert_columns_removed +00599_create_view_with_subquery +00600_create_temporary_table_if_not_exists +00603_system_parts_nonexistent_database +00604_show_create_database +00605_intersections_aggregate_functions +00606_quantiles_and_nans +00607_index_in_in +00608_uniq_array +00609_mv_index_in_in +00609_prewhere_and_default +00610_materialized_view_forward_alter_partition_statements +00612_count # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +00612_pk_in_tuple +00612_union_query_with_subquery +00614_array_nullable +00615_nullable_alter_optimize +00616_final_single_part +00617_array_in +00618_nullable_in +00619_extract +00619_union_highlite +00621_regression_for_in_operator +00622_select_in_parens +00623_in_partition_key +00623_truncate_all_tables +00623_truncate_table +00624_length_utf8 +00625_arrays_in_nested +00625_summing_merge_tree_merge +00626_in_syntax +00626_replace_partition_from_table +00627_recursive_alias +00628_in_lambda_on_merge_table_bug +00633_func_or_in +00634_rename_view +00639_startsWith +00640_endsWith +00642_cast +00644_different_expressions_with_same_alias +00645_date_time_input_format +00646_weird_mmx +00647_histogram +00647_histogram_negative +00647_multiply_aggregation_state +00647_select_numbers_with_offset +00648_replacing_empty_set_from_prewhere +00649_quantile_tdigest_negative +00650_array_enumerate_uniq_with_tuples +00653_monotonic_integer_cast +00653_running_difference +00660_optimize_final_without_partition +00661_array_has_silviucpp +00662_array_has_nullable +00662_has_nullable +00663_tiny_log_empty_insert +00664_cast_from_string_to_nullable +00665_alter_nullable_string_to_nullable_uint8 +00666_uniq_complex_types +00667_compare_arrays_of_different_types +00668_compare_arrays_silviucpp +00670_truncate_temporary_table +00671_max_intersections +00672_arrayDistinct +00673_subquery_prepared_set_performance +00674_has_array_enum +00676_group_by_in +00678_murmurhash +00679_replace_asterisk +00679_uuid_in_key +00680_duplicate_columns_inside_union_all +00681_duplicate_columns_inside_union_all_stas_sviridov +00687_insert_into_mv +00688_aggregation_retention +00688_case_without_else +00688_low_cardinality_alter_add_column +00688_low_cardinality_defaults +00688_low_cardinality_dictionary_deserialization +00688_low_cardinality_in +00688_low_cardinality_nullable_cast +00688_low_cardinality_prewhere +00688_low_cardinality_serialization +00688_low_cardinality_syntax +00689_join_table_function +00691_array_distinct +00692_if_exception_code +00693_max_block_size_system_tables_columns +00696_system_columns_limit +00698_validate_array_sizes_for_nested +00698_validate_array_sizes_for_nested_kshvakov +00700_decimal_aggregates +00700_decimal_arithm +00700_decimal_array_functions +00700_decimal_bounds +00700_decimal_casts +00700_decimal_casts_2 +00700_decimal_compare +00700_decimal_complex_types +00700_decimal_defaults +00700_decimal_empty_aggregates +00700_decimal_gathers +00700_decimal_in_keys +00700_decimal_math +00700_decimal_null +00700_decimal_round +00700_decimal_with_default_precision_and_scale +00700_to_decimal_or_something +00700_to_decimal_or_something_1 +00701_context_use_after_free +00701_join_default_strictness +00701_rollup # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +00702_join_on_dups +00702_join_with_using +00702_join_with_using_dups +00702_where_with_quailified_names +00703_join_crash +00704_arrayCumSumLimited_arrayDifference +00705_aggregate_states_addition +00706_iso_week_and_day_of_year +00707_float_csv_delimiter +00709_virtual_column_partition_id +00710_array_enumerate_dense +00711_array_enumerate_variants +00712_nan_comparison +00712_prewhere_with_alias +00712_prewhere_with_alias_and_virtual_column +00712_prewhere_with_alias_bug +00712_prewhere_with_alias_bug_2 +00712_prewhere_with_final +00712_prewhere_with_missing_columns +00712_prewhere_with_missing_columns_2 +00712_prewhere_with_sampling +00712_prewhere_with_sampling_and_alias +00713_collapsing_merge_tree +00714_alter_uuid +00714_create_temporary_table_with_in_clause +00715_bounding_ratio # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +00715_bounding_ratio_merge_empty +00716_allow_ddl +00717_default_join_type +00717_low_cardinaliry_group_by +00718_format_datetime +00718_format_datetime_1 +00718_low_cardinaliry_alter +00719_format_datetime_f_varsize_bug +00719_format_datetime_rand +00720_combinations_of_aggregate_combinators +00720_with_cube # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +00723_remerge_sort +00724_insert_values_datetime_conversion +00725_ipv4_ipv6_domains +00725_join_on_bug_1 +00725_join_on_bug_2 +00725_join_on_bug_3 +00725_join_on_bug_4 +00725_memory_tracking +00726_length_aliases +00726_materialized_view_concurrent +00726_modulo_for_date +00727_concat +00729_prewhere_array_join +00732_base64_functions +00732_decimal_summing_merge_tree +00733_if_datetime +00734_timeslot +00735_or_expr_optimize_bug +00736_disjunction_optimisation +00737_decimal_group_by +00738_nested_merge_multidimensional_array +00739_array_element_nullable_string_mattrobenolt +00740_database_in_nested_view +00740_optimize_predicate_expression +00741_client_comment_multiline +00742_require_join_strictness +00743_limit_by_not_found_column +00744_join_not_found_column +00745_compile_scalar_subquery +00746_compile_non_deterministic_function +00746_hashing_tuples +00747_contributors +00748_insert_array_with_null +00749_inner_join_of_unnamed_subqueries +00750_merge_tree_merge_with_o_direct +00751_default_databasename_for_view +00751_hashing_ints +00751_low_cardinality_nullable_group_by +00752_low_cardinality_array_result +00752_low_cardinality_lambda_argument +00752_low_cardinality_left_array_join +00752_low_cardinality_mv_1 +00752_low_cardinality_mv_2 +00752_low_cardinality_permute +00753_alter_destination_for_storage_buffer +00753_quantile_format +00753_with_with_single_alias +00754_alter_modify_column_partitions +00754_alter_modify_order_by +00754_first_significant_subdomain_more +00755_avg_value_size_hint_passing +00756_power_alias +00757_enum_defaults +00757_enum_defaults_const # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +00757_enum_defaults_const_analyzer # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +00758_array_reverse +00759_kodieg +00760_url_functions_overflow +00761_lower_utf8_bug +00762_date_comparsion +00765_locate +00765_sql_compatibility_aliases +00779_all_right_join_max_block_size +00780_unaligned_array_join +00794_materialized_view_with_column_defaults +00799_function_dry_run +00800_function_java_hash +00800_low_cardinality_array_group_by_arg +00800_low_cardinality_distinct_numeric +00800_low_cardinality_empty_array +00800_low_cardinality_join +00800_low_cardinality_merge_join +00800_versatile_storage_join +00801_daylight_saving_time_hour_underflow +00802_daylight_saving_time_shift_backwards_at_midnight +00803_xxhash +00804_rollup_with_having +00804_test_alter_compression_codecs +00804_test_custom_compression_codecs +00804_test_custom_compression_codes_log_storages +00804_test_delta_codec_compression +00804_test_delta_codec_no_type_alter +00805_round_down +00806_alter_update +00807_regexp_quote_meta +00808_array_enumerate_segfault +00808_not_optimize_predicate +00809_add_days_segfault +00810_in_operators_segfault +00811_garbage +00812_prewhere_alias_array +00814_parsing_ub +00815_left_join_on_stepanel +00816_join_column_names_sarg +00817_with_simple +00818_alias_bug_4110 +00818_join_bug_4271 +00819_ast_refactoring_bugs +00819_full_join_wrong_columns_in_block +00822_array_insert_default +00823_sequence_match_dfa +00824_filesystem +00826_cross_to_inner_join +00829_bitmap64_function +00829_bitmap_function +00830_join_overwrite +00831_quantile_weighted_parameter_check +00832_storage_file_lock +00833_sleep_overflow +00834_date_datetime_cmp +00834_limit_with_constant_expressions +00834_not_between +00835_if_generic_case +00836_indices_alter +00836_numbers_table_function_zero +00837_insert_select_and_read_prefix +00839_bitmask_negative +00840_top_k_weighted +00841_temporary_table_database +00842_array_with_constant_overflow +00843_optimize_predicate_and_rename_table +00844_join_lightee2 +00845_join_on_aliases +00846_join_using_tuple_crash +00848_join_use_nulls_segfault +00852_any_join_nulls +00853_join_with_nulls_crash +00854_multiple_join_asterisks +00855_join_with_array_join +00856_no_column_issue_4242 +00857_global_joinsavel_table_alias +00859_distinct_with_join +00860_unknown_identifier_bug +00861_decimal_quoted_csv +00862_decimal_in +00863_comma_join_in +00864_union_all_supertype +00870_t64_codec +00871_t64_codec_signed +00872_t64_bit_codec +00873_t64_codec_date +00874_issue_3495 +00875_join_right_nulls +00875_join_right_nulls_ors +00876_wrong_arraj_join_column +00877_memory_limit_for_new_delete +00878_join_unexpected_results +00879_cast_to_decimal_crash +00880_decimal_in_key +00881_unknown_identifier_in_in +00882_multiple_join_no_alias +00897_flatten +00898_quantile_timing_parameter_check +00901_joint_entropy +00902_entropy +00903_array_with_constant_function +00904_array_with_constant_2 +00905_compile_expressions_compare_big_dates +00905_field_with_aggregate_function_state +00906_low_cardinality_const_argument +00906_low_cardinality_rollup +00907_set_index_with_nullable_and_low_cardinality +00907_set_index_with_nullable_and_low_cardinality_bug +00908_analyze_query +00909_arrayEnumerateUniq +00909_ngram_distance +00910_buffer_prewhere +00910_buffer_prewhere_different_types +00910_decimal_group_array_crash_3783 +00911_tautological_compare +00912_string_comparison +00914_join_bgranvea +00914_replicate +00915_simple_aggregate_function +00915_simple_aggregate_function_summing_merge_tree +00915_tuple_orantius +00916_add_materialized_column_after +00916_create_or_replace_view +00916_join_using_duplicate_columns +00917_least_sqr +00917_multiple_joins_denny_crane +00918_has_unsufficient_type_check +00918_json_functions +00919_histogram_merge +00919_sum_aggregate_states_constants +00920_multiply_aggregate_states_constants +00921_datetime64_basic +00926_adaptive_index_granularity_collapsing_merge_tree +00926_adaptive_index_granularity_merge_tree +00926_adaptive_index_granularity_pk +00926_adaptive_index_granularity_replacing_merge_tree +00926_adaptive_index_granularity_versioned_collapsing_merge_tree +00926_geo_to_h3 +00926_multimatch +00927_asof_join_correct_bt +00927_asof_join_noninclusive +00927_asof_join_other_types +00927_asof_joins +00927_disable_hyperscan +00928_multi_match_constant_constant +00929_multi_match_edit_distance +00930_arrayIntersect +00930_max_partitions_per_insert_block +00931_low_cardinality_nullable_aggregate_function_type +00931_low_cardinality_read_with_empty_array +00931_low_cardinality_set_index_in_key_condition +00932_array_intersect_bug +00932_geohash_support +00933_alter_ttl +00933_reserved_word +00933_ttl_formatting +00933_ttl_simple +00933_ttl_with_default +00934_is_valid_utf8 +00935_to_iso_week_first_year +00936_crc_functions +00936_function_result_with_operator_in +00936_substring_utf8_non_const +00937_ipv4_cidr_range +00938_basename +00938_dataset_test +00938_ipv6_cidr_range +00938_test_retention_function +00939_limit_by_offset +00939_test_null_in +00940_max_parts_in_total +00940_order_by_read_in_order +00940_order_by_read_in_order_query_plan +00941_to_custom_week +00942_mv_rename_table +00943_mv_rename_without_inner_table +00944_minmax_nan +00944_minmax_null +00944_ml_test +00945_ml_test +00946_ml_test +00947_ml_test +00948_to_valid_utf8 +00948_values_interpreter_template +00949_format +00950_bad_alloc_when_truncate_join_storage +00950_default_prewhere +00950_test_double_delta_codec +00950_test_double_delta_codec_types +00950_test_gorilla_codec +00951_ngram_search +00952_part_frozen_info +00953_moving_functions +00954_resample_combinator +00955_test_final_mark +00956_join_use_nulls_with_array_column +00957_coalesce_const_nullable_crash +00957_delta_diff_bug +00957_neighbor +00960_eval_ml_method_const +00961_check_table +00961_checksums_in_system_parts_columns_table +00961_visit_param_buffer_underflow +00962_enumNotExect +00962_visit_param_various +00963_startsWith_force_primary_key +00964_os_thread_priority +00966_invalid_json_must_not_parse +00968_file_engine_in_subquery +00968_roundAge +00969_columns_clause +00969_roundDuration +00971_merge_tree_uniform_read_distribution_and_max_rows_to_read +00972_desc_table_virtual_columns +00972_geohashesInBox +00973_create_table_as_table_function +00973_uniq_non_associativity +00974_adaptive_granularity_secondary_index +00974_bitmapContains_with_primary_key +00974_final_predicate_push_down +00974_fix_join_on +00974_full_outer_join +00974_low_cardinality_cast +00975_json_hang +00975_move_partition_merge_tree +00975_recursive_materialized_view +00975_values_list +00976_asof_join_on +00976_max_execution_speed +00976_system_stop_ttl_merges +00976_ttl_with_old_parts +00977_int_div +00977_join_use_nulls_denny_crane +00978_ml_math +00978_sum_map_bugfix +00978_table_function_values_alias +00979_quantileExcatExclusive_and_Inclusive +00979_set_index_not +00979_toFloat_monotonicity +00979_yandex_consistent_hash_fpe +00980_crash_nullable_decimal +00980_full_join_crash_fancyqlx +00980_merge_alter_settings +00981_no_virtual_columns +00982_array_enumerate_uniq_ranked +00982_low_cardinality_setting_in_mv +00983_summing_merge_tree_not_an_identifier +00984_materialized_view_to_columns +00985_merge_stack_overflow +00986_materialized_view_stack_overflow +00988_expansion_aliases_limit +00989_parallel_parts_loading +00990_function_current_user +00990_hasToken_and_tokenbf +00990_request_splitting +00994_table_function_numbers_mt +00995_optimize_read_in_order_with_aggregation +00995_order_by_with_fill +00996_limit_with_ties +00996_neighbor +00997_extract_all_crash_6627 +00997_set_index_array +00997_trim +00998_constraints_all_tables +00999_full_join_dup_keys_crash +00999_join_not_nullable_types +00999_join_on_expression +00999_nullable_nested_types_4877 +00999_settings_no_extra_quotes +00999_test_skip_indices_with_alter_and_merge +01000_bad_size_of_marks_skip_idx +01000_subquery_requires_alias +01001_enums_in_in_section +01006_ttl_with_default_2 +01008_materialized_view_henyihanwobushi +01009_insert_select_data_loss +01009_insert_select_nicelulu +01010_partial_merge_join +01010_partial_merge_join_const_and_lc +01010_partial_merge_join_negative +01010_pm_join_all_join_bug +01010_pmj_on_disk +01010_pmj_one_row_blocks +01010_pmj_right_table_memory_limits +01010_pmj_skip_blocks +01011_group_uniq_array_memsan +01012_reset_running_accumulate +01012_select_limit_x_0 +01012_serialize_array_memory_usage +01012_show_tables_limit +01013_hex_decimal +01013_hex_float +01013_repeat_function +01013_totals_without_aggregation # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +01014_count_of_merges_metrics +01014_function_repeat_corner_cases +01015_array_split +01015_attach_part +01015_empty_in_inner_right_join +01015_random_constant +01016_index_tuple_field_type +01016_null_part_minmax +01016_simhash_minhash +01016_uniqCombined64 +01017_bithamming_distance +01017_in_unconvertible_complex_type +01017_tuplehamming_distance +01017_uniqCombined_memory_usage # only=tcp: HTTP request or response compression changes the query memory +01018_ddl_dictionaries_create +01018_ddl_dictionaries_select +01018_ddl_dictionaries_special +01018_empty_aggregation_filling +01018_optimize_read_in_order_with_in_subquery +01019_Buffer_and_max_memory_usage +01019_alter_materialized_view_query +01019_array_fill +01019_materialized_view_select_extra_columns +01020_function_array_compact +01020_function_char +01020_having_without_group_by +01021_create_as_select +01021_only_tuple_columns +01021_tuple_parser +01024__getScalar +01025_array_compact_generic +01026_char_utf8 +01029_early_constant_folding +01030_concatenate_equal_fixed_strings +01030_final_mark_empty_primary_key +01030_incorrect_count_summing_merge_tree +01030_storage_set_supports_read +01030_storage_url_syntax +01031_new_any_join +01031_pmj_new_any_semi_join +01031_semi_anti_join +01032_cityHash64_for_UUID +01032_cityHash64_for_decimal +01032_duplicate_column_insert_query +01033_dictionaries_lifetime +01033_function_substring +01033_storage_odbc_parsing_exception_check +01034_order_by_pk_prefix +01034_unknown_qualified_column_in_join +01034_with_fill_and_push_down_predicate +01035_avg +01035_prewhere_with_alias +01036_no_superfluous_dict_reload_on_create_database +01036_no_superfluous_dict_reload_on_create_database_2 +01036_union_different_columns +01038_array_of_unnamed_tuples +01039_mergetree_exec_time +01039_test_setting_parse +01040_h3_get_resolution +01041_create_dictionary_if_not_exists +01041_h3_is_valid +01042_check_query_and_last_granule_size +01042_h3_k_ring +01043_categorical_iv +01043_dictionary_attribute_properties_values +01043_geo_distance +01043_h3_edge_length_m +01044_great_circle_angle +01044_h3_edge_angle +01045_array_zip +01045_bloom_filter_null_array +01045_dictionaries_restrictions +01047_no_alias_columns_with_table_aliases +01047_nullable_rand +01047_simple_aggregate_sizes_of_columns_bug +01048_exists_query # only=tcp: the test drops the current database; over HTTP each later request fails +01049_join_low_card_crash +01050_clickhouse_dict_source_with_subquery +01050_engine_join_crash +01050_engine_join_view_crash +01050_group_array_sample +01051_aggregate_function_crash +01051_all_join_engine +01051_new_any_join_engine +01051_random_printable_ascii +01051_same_name_alias_with_joins +01051_scalar_optimization +01052_array_reduce_exception +01053_drop_database_mat_view # only=tcp: the test drops the current database; over HTTP each later request fails +01053_if_chain_check +01055_compact_parts +01055_compact_parts_1 +01055_prewhere_bugs +01056_create_table_as +01056_create_table_as_with_sorting_clauses +01056_negative_with_bloom_filter +01056_predicate_optimizer_bugs +01060_defaults_all_columns +01060_shutdown_table_after_detach +01061_alter_codec_with_type +01062_pm_all_join_with_block_continuation +01062_pm_multiple_all_join_same_value +01063_create_column_set +01064_arrayROCAUC +01064_incremental_streaming_from_2_src_with_feedback +01064_pm_all_join_const_and_nullable +01065_array_zip_mixed_const +01065_if_not_finite +01066_bit_count +01067_join_null +01068_parens +01069_database_memory +01069_insert_float_as_nullable_unit8 +01069_materialized_view_alter_target_table +01069_materialized_view_alter_target_table_with_default_expression +01069_set_in_group_by +01070_alter_with_ttl +01070_exception_code_in_query_log_table +01070_h3_get_base_cell +01070_h3_hex_area_m2 +01070_h3_indexes_are_neighbors +01070_h3_to_children +01070_h3_to_parent +01070_h3_to_string +01070_materialize_ttl +01070_modify_ttl +01070_modify_ttl_recalc_only +01070_mutations_with_dependencies +01070_string_to_h3 +01070_to_decimal_or_null_exception +01071_in_array +01071_prohibition_secondary_index_with_old_format_merge_tree +01072_drop_temporary_table_with_same_name +01072_json_each_row_data_in_square_brackets +01072_nullable_jit +01072_select_constant_limit +01073_attach_if_not_exists +01073_bad_alter_partition +01073_blockSerializedSize +01073_grant_and_revoke +01073_show_tables_not_like +01074_h3_range_check +01075_allowed_client_hosts +01075_in_arrays_enmk +01076_array_join_prewhere_const_folding +01076_predicate_optimizer_with_view +01076_range_reader_segfault +01077_yet_another_prewhere_test +01078_bloom_filter_operator_not_has +01078_merge_tree_read_one_thread +01079_bit_operations_using_bitset +01079_new_range_reader_segfault +01079_order_by_pk +01079_reinterpret_as_fixed_string +01080_check_for_error_incorrect_size_of_nested_column +01080_engine_merge_prewhere_tupleelement_error +01080_join_get_null +01081_PartialSortingTransform_full_column +01081_demangle +01081_keywords_formatting +01082_bit_test_out_of_bound +01083_aggregation_memory_efficient_bug +01083_cross_to_inner_with_in_bug +01083_cross_to_inner_with_like +01083_functional_index_in_mergetree +01083_log_first_column_alias +01083_match_zero_byte +01084_defaults_on_aliases +01084_regexp_empty +01085_datetime_arithmetic_preserve_timezone +01085_extract_all_empty +01085_simdjson_uint64 +01086_modulo_or_zero +01087_index_set_ubsan +01087_storage_generate +01087_table_function_generate +01089_alter_settings_old_format +01090_fixed_string_bit_ops +01091_insert_with_default_json +01091_num_threads # only=tcp: over HTTP the server uses other threads and processors (query logs) +01092_memory_profiler +01093_cyclic_defaults_filimonov +01095_tpch_like_smoke +01096_array_reduce_in_ranges +01096_block_serialized_state +01096_zeros +01097_cyclic_defaults +01097_one_more_range_reader_test +01097_one_more_range_reader_test_wide_part +01097_pre_limit +01098_sum +01100_split_by_string +01101_literal_column_clash # only=tcp: the server gives AMBIGUOUS_COLUMN_NAME over the native protocol only +01101_prewhere_after_alter +01104_fixed_string_like +01105_string_like +01106_const_fixed_string_like +01107_join_right_table_totals # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +01109_exchange_tables +01109_inflating_cross_join +01109_sc0rp10_string_hash_map_zero_bytes +01110_dictionary_layout_without_arguments +01112_check_table_with_index +01113_local_dictionary_type_conversion +01114_alter_modify_compact_parts +01114_clear_column_compact_parts +01114_materialize_clear_index_compact_parts +01114_mysql_database_engine_segfault +01115_join_with_dictionary +01115_prewhere_array_join +01116_asof_join_dolbyzerr +01116_cross_count_asterisks +01117_chain_finalize_bug +01117_comma_and_others_join_mix +01117_greatest_least_case +01118_is_constant +01119_optimize_trivial_insert_select +01119_weird_user_names +01120_join_constants +01121_remote_scalar_subquery +01122_totals_rollup_having_block_header +01123_parse_date_time_best_effort_even_more +01124_view_bad_types +01125_dict_ddl_cannot_add_column +01125_generate_random_qoega +01126_month_partitioning_consistent_code +01127_month_partitioning_consistency_select +01128_generate_random_nested +01129_dict_get_join_lose_constness +01131_max_rows_to_sort +01132_max_rows_to_read +01134_max_rows_to_group_by +01134_set_overflow_mode +01136_multiple_sets +01137_order_by_func_final +01137_sample_final +01139_asof_join_types +01140_select_from_storage_join_fix +01141_join_get_negative +01142_join_lc_and_nullable_in_key +01142_merge_join_lc_and_nullable_in_key +01142_with_ties_and_aliases +01143_trivial_count_with_join +01144_join_rewrite_with_ambiguous_column_and_view +01144_multiple_joins_rewriter_v2_and_lambdas +01144_multiword_data_types +01145_with_fill_const +01147_partial_merge_full_join +01151_storage_merge_filter_tables_by_virtual_column +01153_attach_mv_uuid +01159_combinators_with_parameters +01161_information_schema +01163_search_case_insensetive_utf8 +01177_group_array_moving +01178_int_field_to_decimal +01185_create_or_replace_table +01186_conversion_to_nullable +01188_attach_table_from_path +01189_create_as_table_as_table_function +01191_rename_dictionary +01197_summing_enum +01198_plus_inf +01199_url_functions_path_without_schema_yiurule +01202_arrayROCAUC_special +01210_drop_view +01212_empty_join_and_totals +01213_alter_rename_column +01213_alter_rename_compact_part +01213_alter_rename_nested +01213_alter_table_rename_nested +01213_point_in_Myanmar +01214_point_in_Mecca +01214_test_storage_merge_aliases_with_where +01220_scalar_optimization_in_alter +01221_system_settings +01222_system_codecs +01224_no_superfluous_dict_reload +01225_drop_dictionary_as_table +01225_show_create_table_from_dictionary +01230_join_get_truncate +01231_log_queries_min_type +01231_operator_null_in +01231_operator_null_in_2 +01232_untuple +01234_to_string_monotonic +01240_join_get_or_null +01245_limit_infinite_sources +01246_extractAllGroupsHorizontal +01246_extractAllGroupsVertical +01246_least_greatest_generic +01247_least_greatest_filimonov +01247_some_msan_crashs_from_22517 +01248_least_greatest_mixed_const +01249_bad_arguments_for_bloom_filter +01251_dict_is_in_infinite_loop +01251_string_comparison +01252_weird_time_zone +01254_array_of_unnamed_tuples +01254_dict_create_without_db +01254_dict_load_after_detach_attach # only=tcp: the test drops the current database; over HTTP each later request fails +01255_geo_types_livace +01256_misspell_layout_name_podshumok +01256_negative_generate_random +01257_dictionary_mismatch_types +01258_wrong_cast_filimonov +01259_combinator_distinct +01259_datetime64_ubsan +01259_dictionary_custom_settings_ddl +01260_ubsan_decimal_parse +01262_fractional_timezone_near_start_of_epoch +01262_low_cardinality_remove +01264_nested_baloo_bear +01265_datetime_string_comparison_felix_mueller +01266_default_prewhere_reqq +01268_DateTime64_in_WHERE +01268_data_numeric_parameters +01268_dictionary_direct_layout +01268_mergine_sorted_limit +01268_mv_scalars +01269_alias_type_differs +01269_create_with_null +01269_toStartOfSecond +01271_optimize_arithmetic_operations_in_aggr_func_with_alias +01271_show_privileges +01272_offset_without_limit +01272_suspicious_codecs +01272_totals_and_filter_bug # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +01273_extractGroups +01273_h3EdgeAngle_range_check +01273_lc_fixed_string_field +01275_alter_rename_column_default_expr +01275_extract_groups_check +01276_alter_rename_column_materialized_expr +01276_random_string +01276_system_licenses +01277_alter_rename_column_constraint +01277_buffer_column_order +01277_convert_field_to_type_logical_error +01277_large_tuples +01277_random_fixed_string +01278_alter_rename_combination +01278_random_string_utf8 +01278_variance_nonnegative +01279_dist_group_by +01280_min_map_max_map +01280_null_in +01280_opencl_bitonic_order_by +01280_ttl_where_group_by_negative +01280_unicode_whitespaces_lexer +01281_alter_rename_and_other_renames +01281_join_with_prewhere_fix +01281_sum_nullable +01281_unsucceeded_insert_select_queries_counter +01282_system_parts_ttl_info +01283_max_threads_simple_query_optimization +01283_strict_resize_bug +01284_escape_sequences_php_mysql_style +01284_fuzz_bits +01284_port +01284_view_and_extremes_bug +01285_data_skip_index_over_aggregation +01285_date_datetime_key_condition +01287_max_execution_speed +01289_min_execution_speed_not_too_early +01290_empty_array_index_analysis +01291_aggregation_in_order +01291_geo_types +01291_unsupported_conversion_from_decimal +01292_create_user +01292_optimize_data_skip_idx_order_by_expr +01292_quantile_array_bug +01293_create_role +01293_external_sorting_limit_bug +01294_create_settings_profile +01295_aggregation_bug_11413 +01295_create_row_policy +01296_codecs_bad_arguments +01296_create_row_policy_in_current_database +01296_pipeline_stuck +01298_alter_merge +01299_alter_merge_tree +01300_group_by_other_keys +01300_group_by_other_keys_having +01300_polygon_convex_hull +01300_read_wkt +01300_svg +01300_wkt +01301_polygons_within +01302_polygons_distance +01303_polygons_equals +01304_polygons_sym_difference +01305_array_join_prewhere_in_subquery +01305_buffer_final_bug +01305_nullable-prewhere_bug +01305_polygons_union +01306_polygons_intersection +01307_bloom_filter_index_string_multi_granulas +01307_polygon_perimeter +01308_polygon_area +01308_row_policy_and_trivial_count_query +01310_enum_comparison +01311_comparison_with_constant_string +01312_case_insensitive_regexp +01312_comparison_with_constant_string_in_index_analysis +01313_parse_date_time_best_effort_null_zero +01314_position_in_system_columns +01315_count_distinct_return_not_nullable +01318_alter_add_column_exists +01318_decrypt +01318_encrypt +01318_map_add_map_subtract +01318_map_add_map_subtract_on_map_type +01318_map_populate_series +01318_parallel_final_stuck +01319_query_formatting_in_server_log +01321_aggregate_functions_of_group_by_keys +01321_monotonous_functions_in_order_by_bug +01322_cast_keep_nullable +01323_add_scalars_in_time +01323_bad_arg_in_arithmetic_operations +01323_if_with_nulls +01323_redundant_functions_in_order_by +01323_too_many_threads_bug +01324_if_transform_strings_to_enum +01324_settings_documentation +01325_freeze_mutation_stuck +01326_build_id +01326_fixed_string_comparison_denny_crane +01326_hostname_alias +01327_decimal_cut_extra_digits_after_point +01328_bad_peephole_optimization +01329_compare_tuple_string_constant +01330_array_join_in_higher_order_function +01332_join_type_syntax_position +01333_select_abc_asterisk +01338_sha256_fixedstring +01338_uuid_without_separator +01340_datetime64_fpe +01341_datetime64_wrong_supertype +01343_min_bytes_to_use_mmap_io +01344_alter_enum_partition_key +01344_min_bytes_to_use_mmap_io_index +01345_array_join_LittleMaverick +01345_index_date_vs_datetime +01346_array_join_mrxotey +01347_partition_date_vs_datetime +01349_mutation_datetime_key +01350_intdiv_nontrivial_fpe +01351_geohash_assert +01352_add_datetime_bad_get +01352_generate_random_overflow +01353_low_cardinality_join_types +01353_neighbor_overflow +01353_nullable_tuple +01353_topk_enum +01354_order_by_tuple_collate_const +01354_tuple_low_cardinality_array_mapped_bug +01355_alter_column_with_order +01355_defaultValueOfArgumentType_bug +01355_if_fixed_string +01355_ilike +01356_initialize_aggregation +01356_state_resample +01356_view_threads +01356_wrong_filter-type_bug +01357_result_rows +01358_constexpr_constraint +01358_mutation_delete_null_rows +01358_union_threads_bug +01359_codeql +01359_geodistance_loop +01360_division_overflow +01360_materialized_view_with_join_on_query_log +01361_buffer_table_flush_with_materialized_view +01362_year_of_ISO8601_week_modificators_for_formatDateTime +01372_remote_table_function_empty_table +01372_wrong_order_by_removal +01373_is_zero_or_null +01373_summing_merge_tree_exclude_partition_key +01373_summing_merge_tree_explicit_columns_definition +01374_if_nullable_filimonov +01375_GROUP_BY_injective_elimination_dictGet_BAD_ARGUMENTS +01375_compact_parts_codecs +01375_null_issue_3767 +01375_storage_file_write_prefix_csv_with_names +01375_storage_file_write_prefix_tsv_with_names +01376_GROUP_BY_injective_elimination_dictGet +01376_array_fill_empty +01376_null_logical +01377_supertype_low_cardinality +01379_with_fill_several_columns +01380_coded_delta_exception_code +01380_nullable_state # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +01381_for_each_with_states # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +01384_bloom_filter_bad_arguments +01385_not_function +01386_negative_float_constant_key_condition +01387_clear_column_default_depends +01388_clear_all_columns +01388_multi_if_optimization +01389_filter_by_virtual_columns +01390_check_table_codec +01390_remove_injective_in_uniq +01391_join_on_dict_crash +01391_limit_overflow +01392_column_resolve +01396_low_cardinality_fixed_string_default +01396_negative_datetime_saturate_to_zero +01397_in_bad_arguments +01398_in_tuple_func +01400_join_get_with_multi_keys +01402_cast_nullable_string_to_enum +01403_datetime64_constant_arg +01404_roundUpToPowerOfTwoOrZero_safety +01407_lambda_arrayJoin +01408_range_overflow +01409_topK_merge +01410_full_join_and_null_predicates +01410_nullable_key_and_index +01410_nullable_key_and_index_negate_cond +01411_from_unixtime +01411_xor_itai_shirav +01412_mod_float +01412_optimize_deduplicate_bug +01412_row_from_totals # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +01413_allow_non_metadata_alters +01413_alter_update_supertype +01413_if_array_uuid +01413_rows_events +01413_truncate_without_table_keyword +01414_bloom_filter_index_with_const_column +01414_freeze_does_not_prevent_alters +01414_low_cardinality_nullable +01414_mutations_and_errors +01414_push_predicate_when_contains_with_clause +01415_inconsistent_merge_tree_settings +01415_overlimiting_threads_for_repica_bug +01415_table_function_view +01416_clear_column_pk +01416_join_totals_header_bug +01417_update_permutation_crash +01418_index_analysis_bug +01418_query_scope_constants_and_remote +01419_materialize_null +01419_merge_tree_settings_sanity_check +01419_skip_index_compact_parts +01420_format_row +01420_logical_functions_materialized_null +01421_array_nullable_element_nullable_index +01421_assert_in_in +01422_array_nullable_element_nullable_index +01422_map_skip_null +01423_if_nullable_cond +01424_parse_date_time_bad_date +01425_decimal_parse_big_negative_exponent +01425_default_value_of_type_name +01426_geohash_constants +01427_pk_and_expression_with_different_type +01428_h3_range_check +01428_hash_set_nan_key +01428_nullable_asof_join +01429_join_on_error_messages +01430_fix_any_rewrite_aliases +01430_moving_sum_empty_state +01431_finish_sorting_with_consts +01431_utf8_ubsan +01432_parse_date_time_best_effort_timestamp +01433_hex_float +01434_netloc_fuzz +01435_lcm_overflow +01440_big_int_arithm +01440_big_int_exotic_casts +01440_big_int_least_greatest +01440_big_int_shift +01440_to_date_monotonicity +01441_array_combinator +01441_low_cardinality_array_index +01442_date_time_with_params +01442_h3kring_range_check +01450_set_null_const +01451_detach_drop_part +01451_normalize_query +01452_normalized_query_hash +01453_fixsed_string_sort +01453_normalize_query_alias_uuid +01455_default_compression +01455_nullable_type_with_if_agg_combinator +01455_optimize_trivial_insert_select +01455_rank_correlation_spearman +01455_time_zones +01456_low_cardinality_sorting_bugfix +01456_min_negative_decimal_formatting +01456_modify_column_type_via_add_drop_update +01457_compile_expressions_fuzzer +01457_create_as_table_function_structure +01457_int256_hashing +01457_min_index_granularity_bytes_setting +01457_order_by_limit +01457_order_by_nulls_first +01458_count_digits +01458_is_decimal_overflow +01458_named_tuple_millin +01459_decimal_casts +01459_default_value_of_argument_type_nullptr_dereference +01460_allow_dollar_and_number_in_identifier +01460_mark_inclusion_search_crash +01461_alter_table_function +01461_query_start_time_microseconds +01462_test_codec_on_alias +01463_resample_overflow +01465_ttl_recompression +01470_columns_transformers +01470_columns_transformers2 +01470_show_databases_like +01470_test_insert_select_asterisk +01471_calculate_ttl_during_merge +01471_limit_by_format +01471_top_k_range_check +01471_with_format +01472_toBoundsOfInterval_disallow_empty_tz_field +01473_event_time_microseconds +01473_system_events_zeroes +01474_decimal_scale_bug +01475_fix_bigint_shift +01475_mutation_with_if +01475_read_subcolumns +01475_read_subcolumns_2 +01475_read_subcolumns_3 +01476_right_full_join_switch +01477_lc_in_merge_join_left_key +01478_not_equi-join_on +01479_cross_join_9855 +01480_binary_operator_monotonicity +01481_join_with_materialized +01482_move_to_prewhere_and_cast +01483_merge_table_join_and_group_by +01485_256_bit_multiply +01490_nullable_string_to_enum +01491_nested_multiline_comments +01492_array_join_crash_13829 +01492_format_readable_quantity +01493_alter_remove_properties +01493_alter_remove_wrong_default +01493_storage_set_persistency +01493_table_function_null +01494_storage_join_persistency +01495_subqueries_in_with_statement +01495_subqueries_in_with_statement_2 +01495_subqueries_in_with_statement_3 +01495_subqueries_in_with_statement_4 +01496_signedness_conversion_monotonicity +01497_alias_on_default_array +01497_extract_all_groups_empty_match +01497_mutation_support_for_storage_memory +01497_now_support_timezone +01498_alter_column_storage_memory +01501_cache_dictionary_all_fields +01502_bar_overflow +01503_fixed_string_primary_key +01503_if_const_optimization +01504_compression_multiple_streams +01504_rocksdb +01504_view_type_conversion +01505_trivial_count_with_partition_predicate +01506_buffer_table_alter_block_structure +01506_buffer_table_alter_block_structure_2 +01506_ttl_same_with_order_by +01507_multiversion_storage_for_storagememory +01507_transform_null_in +01508_explain_header +01511_alter_version_versioned_collapsing_merge_tree +01511_different_expression_with_same_alias +01511_format_readable_timedelta +01511_prewhere_with_virtuals +01512_create_replicate_merge_tree_one_arg +01513_defaults_on_defaults_no_column +01513_ilike_like_cache +01514_empty_buffer_different_types +01514_input_format_csv_enum_as_number_setting +01514_input_format_json_enum_as_number +01514_input_format_tsv_enum_as_number_setting +01514_parallel_formatting +01514_tid_function +01515_force_data_skipping_indices +01515_mv_and_array_join_optimisation_bag +01515_with_global_and_with_propagation +01516_create_table_primary_key +01516_date_time_output_format +01517_drop_mv_with_inner_table +01518_cast_nullable_virtual_system_column +01518_filtering_aliased_materialized_column +01518_nullable_aggregate_states1 +01518_nullable_aggregate_states2 +01518_select_in_null +01521_alter_enum_and_reverse_read +01521_format_readable_time_delta2 +01521_max_length_alias +01522_validate_alter_default +01523_date_time_compare_with_date_literal +01524_do_not_merge_across_partitions_select_final +01525_select_with_offset_fetch_clause +01526_complex_key_dict_direct_layout +01527_bad_aggregation_in_lambda +01527_materialized_view_stack_overflow +01528_setting_aggregate_functions_null_for_empty +01528_to_uuid_or_null_or_zero +01529_union_distinct_and_setting_union_default_mode +01531_query_log_query_comment +01532_collate_in_low_cardinality +01532_having_with_totals # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +01532_min_max_with_modifiers # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +01532_tuple_with_name_type +01533_collate_in_nullable +01533_distinct_depends_on_max_threads +01533_distinct_nullable_uuid +01533_multiple_nested +01533_optimize_skip_merged_partitions +01533_quantile_deterministic_assert +01533_sum_if_nullable_bug +01534_lambda_array_join +01535_decimal_round_scale_overflow_check +01536_fuzz_cast +01537_fuzz_count_equal +01538_fuzz_aggregate +01540_verbatim_partition_pruning +01542_collate_in_array +01543_collate_in_tuple +01543_parse_datetime_besteffort_or_null_empty_string +01543_toModifiedJulianDay +01544_errorCodeToName +01544_fromModifiedJulianDay +01545_url_file_format_settings +01546_log_queries_min_query_duration_ms # only=tcp: over HTTP the server uses other threads and processors (query logs) +01547_query_log_current_database # only=tcp: over HTTP the server uses other threads and processors (query logs) +01548_lzy305 +01548_uncomparable_columns_in_keys +01548_with_totals_having +01549_low_cardinality_materialized_view +01549_low_cardinality_mv_fuzz +01550_create_map_type +01550_mutation_subquery +01551_context_uaf +01552_alter_name_collision +01552_dict_fixedstring +01552_impl_aggfunc_cloneresize +01553_datetime64_comparison +01554_bloom_filter_index_big_integer_uuid +01554_interpreter_integer_float +01555_or_fill +01556_accurate_cast_or_null +01556_explain_select_with_union_query +01556_if_null +01557_max_parallel_replicas_no_sample +01558_enum_as_num_in_tsv_csv_input +01558_transform_null_in +01558_ttest +01559_aggregate_null_for_empty_fix +01559_misplaced_codec_diagnostics +01560_DateTime_and_DateTime64_comparision +01560_cancel_agg_func_combinator_native_name_constraint +01560_crash_in_agg_empty_arglist +01560_mann_whitney +01560_monotonicity_check_multiple_args_bug +01561_Date_and_DateTime64_comparision +01561_aggregate_functions_of_key_with_join +01562_agg_null_for_empty_ahead +01564_test_hint_woes +01566_negate_formatting +01567_system_processes_current_database +01570_aggregator_combinator_simple_state +01571_window_functions +01575_disable_detach_table_of_dictionary +01576_if_null_external_aggregation +01579_date_datetime_index_comparison +01580_column_const_comparision +01581_deduplicate_by_columns_local +01581_to_int_inf_nan +01582_any_join_supertype +01582_deterministic_function_with_predicate +01582_move_to_prewhere_compact_parts +01583_const_column_in_set_index +01585_fuzz_bits_with_bugfix +01586_columns_pruning +01586_storage_join_low_cardinality_key +01592_length_map +01592_toUnixTimestamp_Date +01592_window_functions +01593_functions_in_order_by +01593_insert_settings +01594_storage_join_uuid +01595_countMatches +01596_full_join_chertus +01596_null_as_default_nullable +01596_setting_limit_offset +01598_memory_limit_zeros +01600_encode_XML +01600_min_max_compress_block_size +01600_multiple_left_join_with_aliases +01600_remerge_sort_lowered_memory_bytes_ratio +01600_select_in_different_types +01601_accurate_cast +01602_array_aggregation +01602_modified_julian_day_msan +01602_runningConcurrency +01602_show_create_view +01602_temporary_table_in_system_tables +01603_decimal_mult_float +01603_insert_select_too_many_parts +01603_remove_column_ttl +01603_rename_overwrite_bug +01604_explain_ast_of_nonselect_query +01605_dictinct_two_level +01605_key_condition_enum_int +01605_skip_idx_compact_parts +01606_merge_from_wide_to_compact +01611_string_to_low_cardinality_key_alter +01614_with_fill_with_limit +01615_two_args_function_index_fix +01616_untuple_access_field +01620_fix_simple_state_arg_type +01621_bar_nan_arguments +01621_decode_XML +01621_sort_after_join_pipeline_stuck +01621_summap_check_types +01622_byte_size +01622_constraints_simple_optimization +01622_constraints_where_optimization +01622_defaults_for_file_engine +01622_multiple_ttls +01623_byte_size_const +01623_constraints_column_swap +01625_constraints_index_append +01626_cnf_test +01630_disallow_floating_point_as_partition_key +01630_simple_aggregate_all_functions_in_aggregating_merge_tree +01630_simple_aggregate_all_functions_in_summing_merge_tree +01630_simple_aggregate_function_in_summing_merge_tree +01631_date_overflow_as_partition_key +01632_group_array_msan +01632_max_partitions_to_read +01632_nullable_string_type_convert_to_decimal_type +01632_select_all_syntax +01634_sum_map_nulls +01634_summap_nullable +01634_uuid_fuzz +01635_nullable_fuzz +01635_sum_map_fuzz +01636_nullable_fuzz2 # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +01637_nullable_fuzz3 # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +01638_div_mod_ambiguities +01641_memory_tracking_insert_optimize +01642_if_nullable_regression +01643_merge_tree_fsync_smoke +01646_fix_window_funnel_inconistency +01646_rewrite_sum_if +01648_mutations_and_escaping +01648_normalize_query_keep_names +01649_with_alias_key_condition +01650_expressions_merge_bug +01651_group_uniq_array_enum +01651_lc_insert_tiny_log_1 +01651_lc_insert_tiny_log_2 +01651_lc_insert_tiny_log_3 +01651_map_functions +01652_ignore_and_low_cardinality +01652_ttl_old_syntax +01653_tuple_hamming_distance_2 +01654_bar_nan +01655_agg_if_nullable +01655_plan_optimizations_merge_filters +01655_quarter_modificator_for_formatDateTime +01655_sleep_infinite_float +01655_test_isnull_mysql_dialect +01655_window_functions_bug +01655_window_functions_null +01656_join_defaul_enum +01656_sequence_next_node_distinct # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +01656_test_hex_mysql_dialect +01656_test_query_log_factories_info # only=tcp: over HTTP the server runs FORMAT Null, so no MEMORY_LIMIT_EXCEEDED +01657_array_element_ubsan +01657_test_toHour_mysql_compatibility +01658_test_base64Encode_mysql_compatibility +01658_values_ubsan +01659_array_aggregation_ubsan +01659_h3_buffer_overflow +01659_test_base64Decode_mysql_compatibility +01660_join_or_all +01660_join_or_any +01660_join_or_inner +01660_join_or_subqueries +01660_sum_ubsan +01660_system_parts_smoke +01660_test_toDayOfYear_mysql_compatibility +01661_arraySlice_ubsan +01661_extract_all_groups_throw_fast +01661_join_complex +01661_test_toDayOfWeek_mysql_compatibility +01661_week_functions_string_args +01662_date_ubsan +01662_join_mixed +01662_test_toDayOfMonth_mysql_compatibility +01663_aes_msan +01663_quantile_weighted_overflow +01663_test_toDate_mysql_compatibility +01664_array_slice_ubsan +01664_decimal_ubsan +01664_ntoa_aton_mysql_compatibility +01665_merge_tree_min_for_concurrent_read +01665_running_difference_ubsan +01665_substring_ubsan +01666_date_lut_buffer_overflow +01666_gcd_ubsan +01666_great_circle_distance_ubsan +01666_lcm_ubsan +01667_aes_args_check +01668_avg_weighted_ubsan +01668_test_toMonth_mysql_dialect +01669_join_or_duplicates +01669_test_toYear_mysql_dialect +01670_dictionary_create_key_expression +01670_log_comment +01670_sign_function +01670_test_repeat_mysql_dialect +01671_aggregate_function_group_bitmap_data +01671_test_toQuarter_mysql_dialect +01672_actions_dag_merge_crash +01672_test_toSecond_mysql_dialect +01673_test_toMinute_mysql_dialect +01674_filter_by_uint8 +01674_htm_xml_coarse_parse +01674_unicode_asan +01674_where_prewhere_array_crash +01676_dictget_in_default_expression # only=tcp: the test drops the current database; over HTTP each later request fails +01676_range_hashed_dictionary +01676_reinterpret_as +01676_round_int_ubsan +01677_array_enumerate_bug +01677_bit_float +01678_great_circle_angle +01679_format_readable_time_delta_inf +01680_date_time_add_ubsan +01680_predicate_pushdown_union_distinct_subquery +01681_arg_min_max_if_fix +01681_bloom_filter_nullable_column +01681_cache_dictionary_simple_key +01682_cache_dictionary_complex_key +01682_gather_utils_ubsan +01683_flat_dictionary +01683_intdiv_ubsan +01684_geohash_ubsan +01685_json_extract_double_as_float +01686_rocksdb +01690_quantilesTiming_ubsan +01692_DateTime64_from_DateTime +01698_fix_toMinute +01698_map_populate_overflow +01699_timezoneOffset +01700_deltasum +01700_mod_negative_type_promotion +01700_point_in_polygon_ubsan +01701_clear_projection_and_part_remove +01701_if_tuple_segfault +01701_if_tuple_segfault_allow_tuple_element_aggregation +01702_bitmap_native_integers +01702_rewrite_avg_for_algebraic_optimization +01702_system_numbers_scientific_notation +01702_system_query_log +01703_rewrite_aggregate_function_case_insensitive +01704_transform_with_float_key +01705_normalize_case_insensitive_function_names +01706_optimize_normalize_count_variants +01707_join_use_nulls +01709_inactive_parts_to_throw_insert +01710_aggregate_projection_with_grouping_set # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +01710_aggregate_projection_with_hashing +01710_aggregate_projection_with_monotonic_key_expr +01710_force_use_projection +01710_minmax_count_projection +01710_minmax_count_projection_constant_query +01710_minmax_count_projection_count_nullable +01710_minmax_count_projection_modify_partition_key +01710_normal_projection_fix1 +01710_normal_projection_format +01710_normal_projection_join_plan_fix +01710_normal_projection_with_query_plan_optimization +01710_order_by_projections_complete +01710_order_by_projections_incomplete +01710_projection_additional_filters +01710_projection_aggregate_functions_null_for_empty +01710_projection_array_join +01710_projection_detach_part +01710_projection_drop_if_exists +01710_projection_external_aggregate +01710_projection_group_by_order_by +01710_projection_in_index +01710_projection_in_set +01710_projection_materialize_with_missing_columns +01710_projection_mutation +01710_projection_optimize_aggregators_of_group_by_keys +01710_projection_optimize_group_by_function_keys +01710_projection_optimize_materialize +01710_projection_part_check +01710_projection_pk_trivial_count +01710_projection_query_plan_optimization_misc +01710_projection_row_policy +01710_projection_with_alter_conversions +01710_projection_with_ast_rewrite_settings +01710_projection_with_column_transformers +01710_projection_with_joins +01710_projection_with_mixed_pipeline +01710_projection_with_nullable_keys +01710_projections +01710_projections_and_duplicate_columms +01710_projections_group_by_no_key +01710_projections_order_by_complete +01710_projections_order_by_incomplete +01710_query_log_with_projection_info +01711_cte_subquery_fix +01711_decimal_multiplication +01712_no_adaptive_granularity_vertical_merge +01713_table_ttl_old_syntax_zookeeper +01714_alter_drop_version +01715_table_function_view_fix +01715_tuple_insert_null_as_default +01716_array_difference_overflow +01716_decimal_comparison_ubsan +01716_drop_rename_sign_column +01717_int_div_float_too_large_ubsan +01718_subtract_seconds_date +01719_join_timezone +01720_constraints_complex_types +01720_dictionary_create_source_with_functions +01720_engine_file_empty_if_not_exists +01720_join_implicit_cast +01720_type_map_and_casts +01720_union_distinct_with_limit +01721_constraints_constant_expressions +01721_dictionary_decimal_p_s +01721_engine_file_truncate_on_insert +01732_alters_bad_conversions +01732_explain_syntax_union_query +01732_more_consistent_datetime64_parsing +01732_union_and_union_all +01733_transform_ubsan +01735_join_get_low_card_fix +01735_to_datetime64 +01736_null_as_default +01737_move_order_key_to_prewhere_select_final +01739_index_hint +01744_tuple_cast_to_map_bugfix +01745_alter_delete_view +01746_convert_type_with_default +01746_extract_text_from_html +01746_lc_values_format_bug +01746_test_for_tupleElement_must_be_constant_issue +01747_join_view_filter_dictionary +01747_transform_empty_arrays +01748_dictionary_table_dot +01748_partition_id_pruning +01753_direct_dictionary_simple_key +01753_mutate_table_predicated_with_table +01754_direct_dictionary_complex_key +01759_dictionary_unique_attribute_names +01760_ddl_dictionary_use_current_database_name +01760_modulo_negative +01760_polygon_dictionaries +01760_system_dictionaries +01761_cast_to_enum_nullable +01761_round_year_bounds +01762_datetime64_extended_parsing +01762_deltasumtimestamp +01763_filter_push_down_bugs +01763_support_map_lowcardinality_type +01764_collapsing_merge_adaptive_granularity +01764_prefer_column_name_to_alias +01764_table_function_dictionary +01765_hashed_dictionary_simple_key +01765_move_to_table_overlapping_block_number +01765_tehran_dst +01766_hashed_dictionary_complex_key +01766_todatetime64_no_timezone_arg +01768_array_product +01768_extended_range +01769_extended_range_2 +01770_add_months_ubsan +01770_extended_range_3 +01771_datetime64_no_time_part +01772_intdiv_minus_one_ubsan +01772_to_start_of_hour_align +01773_case_sensitive_revision +01773_case_sensitive_version +01773_datetime64_add_ubsan +01773_min_max_time_system_parts_datetime64 +01774_bar_with_illegal_value +01774_case_sensitive_connection_id +01774_ip_address_in_range +01774_ip_address_in_range_2 +01774_tuple_null_in +01776_decrypt_aead_size_check +01777_map_populate_series_ubsan +01778_hierarchical_dictionaries +01778_mmap_cache_infra +01778_test_LowCardinality_FixedString_pk +01778_where_with_column_name +01779_quantile_deterministic_msan +01780_clickhouse_dictionary_source_loop +01780_column_sparse +01780_column_sparse_alter +01780_column_sparse_distinct +01780_column_sparse_filter +01780_column_sparse_full # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +01780_column_sparse_materialize +01780_column_sparse_pk +01780_column_sparse_tuple +01780_dict_get_or_null +01780_range_msan +01781_map_op_ubsan +01781_merge_tree_deduplication +01781_token_extractor_buffer_overflow +01782_field_oom +01783_merge_engine_join_key_condition +01784_parallel_formatting_memory +01785_dictionary_element_count +01785_pmj_lc_bug +01786_group_by_pk_many_streams +01787_arena_assert_column_nothing +01787_map_remote +01788_update_nested_type_subcolumn_check +01795_TinyLog_rwlock_ub +01796_Log_rwlock_ub +01797_StripeLog_rwlock_ub +01798_uniq_theta_sketch +01798_uniq_theta_union_intersect_not +01800_log_nested +01801_approx_total_rows_mergetree_reverse +01801_dateDiff_DateTime64 +01802_formatDateTime_DateTime64_century +01802_rank_corr_mann_whitney_over_window +01802_toDateTime64_large_values +01803_const_nullable_map +01803_untuple_subquery +01804_dictionary_decimal256_type +01804_uniq_up_to_ubsan +01809_inactive_parts_to_delay_throw_insert +01811_datename +01811_filter_by_null +01812_has_generic +01813_quantileBfloat16_nans +01817_storage_buffer_parameters +01818_case_float_value_fangyc +01818_move_partition_simple +01820_unhex_case_insensitive +01821_dictionary_primary_key_wrong_order +01821_join_table_mutation +01821_table_comment +01822_short_circuit +01822_union_and_constans_error +01823_array_low_cardinality_KuliginStepan +01824_move_to_prewhere_many_columns +01825_json_type_9 +01825_replacing_vertical_merge +01831_max_streams +01832_memory_write_suffix +01833_test_collation_alvarotuso +01835_alias_to_primary_key_cyfdecyf +01836_date_time_keep_default_timezone_on_operations_den_crane +01837_cast_to_array_from_empty_array +01837_database_memory_ddl_dictionaries +01838_system_dictionaries_virtual_key_column +01839_join_to_subqueries_rewriter_columns_matcher +01840_tupleElement_formatting_fuzzer +01845_add_testcase_for_arrayElement +01846_alter_column_without_type_bugfix +01846_null_as_default_for_insert_select +01847_bad_like +01848_partition_value_column +01849_geoToS2 +01851_array_difference_decimal_overflow_ubsan +01851_clear_column_referenced_by_mv +01851_fix_row_policy_empty_result +01851_hedged_connections_external_tables +01851_s2_to_geo +01852_cast_operator +01852_cast_operator_2 +01852_cast_operator_3 +01852_cast_operator_4 +01852_jit_if +01852_map_combinator +01852_multiple_joins_with_union_join +01852_s2_get_neighbours +01853_s2_cells_intersect +01854_dictionary_range_hashed_min_max_attr +01854_s2_cap_contains +01854_s2_cap_union +01855_jit_comparison_constant_result +01856_create_function +01865_aggregator_overflow_row # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +01866_aggregate_function_interval_length_sum +01866_bit_positions_to_array +01866_datetime64_cmp_with_constant +01866_split_by_regexp +01866_view_persist_settings +01867_fix_storage_memory_mutation +01868_order_by_fill_with_datetime64 +01869_function_modulo_legacy +01869_reinterpret_as_fixed_string_uuid +01870_buffer_flush +01871_merge_tree_compile_expressions +01872_functions_to_subcolumns_analyzer +01880_remote_ipv6 +01881_aggregate_functions_versioning +01881_create_as_tuple +01881_join_on_conditions_hash +01881_join_on_conditions_merge +01881_join_on_conditions_merge_decimal +01881_negate_formatting +01881_to_week_monotonic_fix +01881_total_bytes_storage_buffer +01881_union_header_mismatch_bug +01882_check_max_parts_to_merge_at_once +01883_grouping_sets_crash +01888_bloom_filter_hasAny +01888_read_int_safe +01889_key_condition_function_chains +01889_sql_json_functions +01889_tokenize +01890_cross_join_explain_crash +01890_stem +01891_echo +01891_not_in_partition_prune +01891_not_like_partition_prune +01891_partition_by_uuid +01891_partition_hash +01902_dictionary_array_type +01902_self_aliases_in_columns +01902_table_function_merge_db_params +01902_table_function_merge_db_repr # only=tcp: the test drops the current database; over HTTP each later request fails +01904_dictionary_default_nullable_type +01906_bigint_accurate_cast_ubsan +01906_h3_to_geo +01906_lc_in_bug +01906_partition_by_multiply_by_zero +01907_multiple_aliases +01908_with_unknown_column +01909_mbtolou +01910_memory_tracking_topk +01910_view_dictionary +01911_logical_error_minus +01912_bad_cast_join_fuzz +01913_fix_column_transformer_replace_format +01913_if_int_decimal +01913_join_push_down_bug +01913_names_of_tuple_literal +01913_replace_dictionary +01913_summing_mt_and_simple_agg_function_with_lc +01914_exchange_dictionaries +01914_index_bgranvea +01914_ubsan_quantile_timing +01915_create_or_replace_dictionary +01915_for_each_crakjie +01915_json_extract_raw_string +01915_merge_prewhere_virtual_column_rand_chao_wang +01916_multiple_join_view_optimize_predicate_chertus +01917_distinct_on +01917_prewhere_column_type +01917_system_data_skipping_indices +01920_not_chain_format +01921_datatype_date32 +01921_not_chain +01921_with_fill_with_totals # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +01922_array_join_with_index +01922_sum_null_for_remote +01923_ttl_with_modify_column +01924_argmax_bitmap_state +01925_date_date_time_comparison +01925_join_materialized_columns +01925_json_as_string_data_in_square_brackets +01925_map_populate_series_on_map +01925_merge_prewhere_table +01925_test_group_by_const_consistency +01925_test_storage_merge_aliases +01925_test_storage_merge_aliases_analyzer +01926_bin_unbin +01926_date_date_time_supertype +01926_order_by_desc_limit +01926_union_all_schmak +01931_storage_merge_no_columns +01932_alter_index_with_order +01932_null_valid_identifier +01934_constexpr_aggregate_function_parameters +01936_empty_function_support_uuid +01936_quantiles_cannot_return_null +01936_three_parts_identifiers_in_wrong_places +01937_nested_chinese +01938_joins_identifiers +01940_pad_string +01940_point_in_polygon_ubsan +01940_totimezone_operator_monotonicity +01941_dict_get_has_complex_single_key +01942_create_table_with_sample +01942_untuple_transformers_msan +01943_log_column_sizes +01943_non_deterministic_order_key +01943_pmj_non_joined_stuck +01943_query_id_check +01944_insert_partition_by +01944_range_max_elements +01948_dictionary_quoted_database_name +01948_heredoc +01950_aliases_bad_cast +01960_lambda_precedence +01999_grant_with_replace +02000_default_from_default_empty_column +02000_join_on_const +02000_map_full_text_bloom_filter_index +02001_add_default_database_to_system_users +02001_join_on_const +02001_select_with_filter +02002_parse_map_int_key +02002_sampling_and_unknown_column_bug +02003_WithMergeableStateAfterAggregationAndLimit_LIMIT_BY_LIMIT_OFFSET +02003_bug_from_23515 +02004_intersect_except_const_column +02004_intersect_except_distinct_operators +02004_intersect_except_operators +02004_max_hyperscan_regex_length +02005_log_formatted_queries +02006_client_test_hint_error_name +02006_h3_to_geo_boundary +02006_test_positional_arguments +02006_todatetime64_from_string +02006_use_constants_in_with_and_select +02007_ipv4_and_ipv6_to_and_from_string +02007_join_use_nulls +02007_test_any_all_operators +02008_complex_key_range_hashed_dictionary +02008_materialize_column +02008_test_union_distinct_in_subquery +02008_tuple_to_name_value_pairs +02009_array_join_partition +02009_decimal_no_trailing_zeros +02010_array_index_bad_cast +02011_dictionary_empty_attribute_list +02011_normalize_utf8 +02011_tuple_vector_functions +02012_changed_enum_type_non_replicated +02012_get_server_port +02012_low_cardinality_uuid_with_extremes # only=tcp: no extremes in the HTTP RowBinary output +02012_sha512_fixedstring +02013_bloom_filter_hasAll +02013_emptystring_cast +02013_json_function_null_column +02013_lc_nullable_and_infinity # only=tcp: no extremes in the HTTP RowBinary output +02014_dict_get_nullable_key +02014_map_different_keys +02014_storage_merge_order_by +02015_column_default_dict_get_identifier +02015_division_by_nullable +02015_order_by_with_fill_misoptimization +02016_agg_empty_result_bug_28880 +02016_aggregation_spark_bar +02016_bit_shift_right_for_string_integer +02016_order_by_with_fill_monotonic_functions_removal +02016_summing_mt_aggregating_column +02017_bit_shift_left_for_string_integer +02017_columns_with_dot +02017_columns_with_dot_2 +02017_order_by_with_fill_redundant_functions +02018_multiple_with_fill_for_the_same_column +02019_multiple_weird_with_fill +02020_cast_integer_overflow +02020_exponential_smoothing +02020_exponential_smoothing_cross_block +02021_exponential_sum +02021_exponential_sum_shard +02021_h3_get_faces +02021_h3_is_pentagon +02021_h3_is_res_classIII +02021_map_bloom_filter_index +02021_map_has +02021_prewhere_always_true_where +02021_prewhere_column_optimization +02022_array_full_text_bloom_filter_index +02023_nullable_int_uint_where +02023_parser_number_binary_literal +02024_compile_expressions_with_short_circuit_evaluation +02024_create_dictionary_with_comment +02024_join_on_or_long +02024_merge_regexp_assert +02025_dictionary_array_nested_map +02025_dictionary_view_different_db +02025_having_filter_column +02025_nested_func_for_if_combinator +02025_subcolumns_compact_parts +02026_accurate_cast_or_default +02026_arrayDifference_const +02027_arrayCumSumNonNegative_const +02027_ngrams +02028_create_select_settings +02028_system_data_skipping_indices_size +02028_tokens +02029_quantile_sanitizer +02030_function_mapContainsKeyLike +02030_quantiles_underflow +02030_tuple_filter +02032_short_circuit_least_greatest_bug +02035_isNull_isNotNull_format +02036_jit_short_circuit +02039_group_by_with_totals_having # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +02041_conversion_between_date32_and_datetime64 +02041_openssl_hash_functions_test +02041_test_fuzzy_alter +02042_map_get_non_const_key +02044_exists_operator +02045_like_function +02047_alias_for_table_and_database_name +02049_lowcardinality_shortcircuit_crash +02053_INSERT_SELECT_MATERIALIZED +02070_join_on_disk +02095_function_get_os_kernel_version +02096_date_time_1970_saturation +02096_join_unusual_identifier_begin +02096_rename_atomic_hang # only=tcp: the test drops the current database; over HTTP each later request fails +02096_sample_by_tuple +02096_sql_user_defined_function_alias +02096_totals_global_in_bug # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +02097_default_dict_get_add_database +02097_initializeAggregationNullable +02097_polygon_dictionary_store_key +02098_date32_comparison +02098_hashed_array_dictionary_simple_key +02098_sql_user_defined_functions_aliases +02099_hashed_array_dictionary_complex_key +02099_sql_user_defined_functions_lambda +02100_alter_scalar_circular_deadlock +02100_limit_push_down_bug +02100_now64_types_bug +02100_replaceRegexpAll_bug +02101_sql_user_defined_functions_create_or_replace +02101_sql_user_defined_functions_drop_if_exists +02102_sql_user_defined_functions_create_if_not_exists +02103_sql_user_defined_functions_composition +02111_function_mapExtractKeyLike +02111_global_context_temporary_tables +02111_modify_table_comment +02111_with_fill_no_rows +02112_skip_index_set_and_or +02112_with_fill_interval +02113_base64encode_trailing_bytes +02113_base64encode_trailing_bytes_1 +02113_format_row +02113_format_row_bug +02113_untuple_func_alias +02115_map_contains_analyzer +02116_tuple_element_analyzer +02119_sumcount +02123_MySQLWire_regression +02124_comparison_betwwen_decimal_and_float +02124_empty_uuid +02124_encrypt_decrypt_nullable +02124_insert_deduplication_token +02124_uncompressed_cache +02125_constant_if_condition_and_not_existing_column +02125_dict_get_type_nullable_fix +02125_fix_storage_filelog +02125_low_cardinality_int256 +02125_recursive_sql_user_defined_functions +02125_transform_decimal_bug +02126_alter_table_alter_column +02126_dist_desc +02126_identity_user_defined_function +02126_lc_window_functions +02127_storage_join_settings_with_persistency +02128_apply_lambda_parsing +02128_cast_nullable +02128_hex_bin_on_uuid +02129_add_column_add_ttl +02129_window_functions_disable_optimizations +02131_materialize_column_cast +02131_mv_many_chunks_bug +02131_remove_columns_in_subquery +02131_row_policies_combination +02131_skip_index_not_materialized +02131_used_row_policies_in_query_log +02132_empty_mutation_livelock +02133_classification +02133_final_prewhere_where_lowcardinality_replacing +02133_issue_32458 +02136_scalar_subquery_metrics +02137_mv_into_join +02139_MV_with_scalar_subquery +02144_avg_ubsan +02146_mv_non_phys +02148_cast_type_parsing +02148_issue_32737 +02148_sql_user_defined_function_subquery +02150_replace_regexp_all_empty_match +02151_lc_prefetch +02151_replace_regexp_all_empty_match_alternative +02152_count_distinct_optimization +02152_csv_tuple +02152_dictionary_date32_type +02152_short_circuit_throw_if +02154_bit_slice_for_fixedstring +02154_bit_slice_for_string +02154_bitmap_contains +02154_default_keyword_insert +02155_binary_op_between_float_and_decimal +02155_create_table_w_timezone +02155_dictionary_comment +02155_h3_to_center_child +02155_multiple_inserts_for_formats_with_suffix +02155_nested_lc_defalut_bug +02155_parse_date_lowcard_default_throw +02155_read_in_order_max_rows_to_read +02156_minus_op_with_datatime64 +02156_storage_merge_prewhere_not_ready_set_bug +02158_contingency +02158_interval_length_sum +02158_proportions_ztest +02158_ztest +02159_left_right +02160_h3_cell_area_m2 +02160_h3_cell_area_rads2 +02160_h3_hex_area_Km2 +02160_monthname +02160_special_functions +02161_array_first_last +02162_array_first_last_index +02162_range_hashed_dictionary_ddl_expression +02163_operators +02163_shard_num +02164_materialized_view_support_virtual_column +02165_h3_edge_length_km +02165_h3_exact_edge_length_Km +02165_h3_exact_edge_length_m +02165_h3_exact_edge_length_rads +02165_h3_num_hexagons +02165_replicated_grouping_sets +02167_columns_with_dots_default_values +02168_avro_bug +02169_fix_view_offset_limit_setting +02169_map_functions +02174_cte_scalar_cache +02174_cte_scalar_cache_mv +02176_dict_get_has_implicit_key_cast +02176_optimize_aggregation_in_order_empty +02176_toStartOfWeek_overflow_pruning +02177_merge_optimize_aggregation_in_order +02177_sum_if_not_found +02178_column_function_insert_from +02179_bool_type +02179_degrees_radians +02179_key_condition_no_common_type +02179_map_cast_to_array +02179_range_hashed_dictionary_invalid_interval +02179_sparse_columns_detach +02180_insert_into_values_settings +02181_dictionary_attach_detach +02181_sql_user_defined_functions_invalid_lambda +02183_array_tuple_literals_remote +02183_combinator_if +02183_dictionary_date_types +02183_dictionary_no_attributes +02184_default_table_engine +02184_ipv6_cast_test +02184_ipv6_select_parsing +02184_range_hashed_dictionary_outside_range_values +02185_arraySlice_negative_offset_size +02185_range_hashed_dictionary_open_ranges +02185_split_by_char +02186_range_hashed_dictionary_intersecting_intervals +02187_insert_values_with_mv +02187_test_final_and_limit_modifier +02188_parser_dictionary_primary_key +02188_table_function_format +02189_join_type_conversion +02190_current_metrics_query +02191_nested_with_dots +02191_parse_date_time_best_effort_more_cases +02192_comment +02193_async_insert_tcp_client_1 +02200_use_skip_indexes +02201_use_skip_indexes_if_final +02202_use_skip_indexes_if_final +02205_ephemeral_1 +02205_map_populate_series_non_const +02205_postgresql_functions +02206_array_starts_ends_with +02206_information_schema_show_database +02206_minimum_sample_size +02207_key_condition_floats +02207_ttl_move_if_exists +02209_short_circuit_node_without_parents +02210_append_to_dev_dull +02210_toColumnTypeName_toLowCardinality_const +02211_jsonl_format_extension +02212_cte_and_table_alias +02212_h3_get_pentagon_indexes +02212_h3_get_res0_indexes +02212_h3_point_dist +02220_array_join_format +02222_allow_experimental_projection_optimization__enable_global_with_statement +02223_h3_test_const_columns +02223_insert_select_schema_inference +02224_s2_test_const_columns +02226_analyzer_or_like_combine +02226_async_insert_table_function +02226_in_untuple_issue_34810 +02226_low_cardinality_text_bloom_filter_index +02227_union_match_by_name +02230_create_table_as_ignore_ttl +02231_bloom_filter_sizing +02231_hierarchical_dictionaries_constant +02232_functions_to_subcolumns_alias +02232_partition_pruner_mixed_constant_type +02232_partition_pruner_single_point +02233_interpolate_1 +02233_optimize_aggregation_in_order_prefix_with_merge # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +02233_set_enable_with_statement_cte_perf +02233_with_total_empty_chunk +02234_column_function_short_circuit +02234_position_case_insensitive_utf8 +02235_add_part_offset_virtual_column +02235_check_table_sparse_serialization +02236_json_each_row_empty_map_schema_inference +02240_asof_join_biginteger +02240_get_type_serialization_streams +02241_array_first_last_or_null +02241_short_circuit_short_column +02242_if_then_else_null_bug +02242_join_rocksdb # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +02242_make_date +02242_make_date_mysql +02242_negative_datetime64 +02242_optimize_to_subcolumns_no_storage +02242_subcolumns_sizes +02242_throw_if_constant_argument +02243_in_ip_address +02243_ipv6_long_parsing +02244_casewithexpression_return_type +02244_column_names_in_shcmea_inference +02244_ip_address_invalid_insert +02244_lowcardinality_hash_join +02244_make_datetime +02245_format_string_stack_overflow +02245_join_with_nullable_lowcardinality_crash +02245_weird_partitions_pruning +02246_flatten_tuple +02247_fix_extract_parser +02248_nullable_custom_types_to_string +02249_parse_date_time_basic +02250_insert_select_from_file_schema_inference +02251_alter_enum_nested_struct +02251_last_day_of_month +02252_jit_profile_events +02252_reset_non_existing_setting +02260_alter_compact_part_drop_nested_column +02264_format_insert_compression +02264_format_insert_infile +02265_cross_join_empty_list +02265_limit_push_down_over_window_functions_bug +02265_per_table_ttl_mutation_on_change +02265_rename_join_ordinary_to_atomic +02266_auto_add_nullable +02267_empty_arrays_read_reverse +02267_join_dup_columns_issue36199 +02267_special_operator_parse_alias_check +02267_type_inference_for_insert_into_function_null +02268_json_wrong_root_type_in_schema_inference +02269_create_table_with_collation +02269_insert_select_with_format_without_schema_inference +02269_to_start_of_interval_overflow +02271_int_sql_compatibility +02271_temporary_table_show_rows_bytes +02276_full_sort_join_unsupported +02277_full_sort_join_misc +02280_add_query_level_settings +02281_limit_by_distributed +02282_array_distance +02283_array_norm +02285_hex_bin_support_more_types +02286_convert_decimal_type +02286_function_wyhash +02286_quantile_tdigest_infinity +02286_vertical_merges_missed_column +02287_ephemeral_format_crash +02287_legacy_column_name_of_tuple_literal_over_distributed +02291_dictionary_scalar_subquery_reload +02292_create_function_validate +02292_h3_unidirectional_funcs +02292_hash_array_tuples +02292_nested_not_flattened_detach +02293_arrow_dictionary_indexes +02293_compatibility_ignore_auto_increment_in_create_table +02293_grouping_function +02293_grouping_function_group_by # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +02293_h3_distance +02293_h3_hex_ring +02293_h3_line +02293_ilike_on_fixed_strings +02293_optimize_aggregation_in_order_Array_functions +02294_decimal_second_errors +02294_dictionaries_hierarchical_index +02294_fp_seconds_profile +02294_nothing_arguments_in_functions +02294_optimize_aggregation_in_order_prefix_Array_functions +02294_stringsearch_with_nonconst_needle +02294_system_certificates +02295_global_with_in_subquery +02296_nullable_arguments_in_array_filter +02302_clash_const_aggegate_join +02302_column_decl_null_before_defaul_value +02302_defaults_in_columnar_formats +02302_join_auto_lc_nullable_bug +02302_lc_nullable_string_insert_as_number +02302_projections_GROUP_BY_ORDERY_BY_optimize_aggregation_in_order +02303_cast_nullable_to_custom_types +02304_grouping_set_order_by +02304_grouping_sets_with_rollup_cube +02304_orc_arrow_parquet_string_as_string +02306_part_types_profile_events +02306_window_move_row_number_fix +02307_join_get_array_null +02310_generate_multi_columns_with_uuid +02310_uuid_v7 +02311_create_table_with_unknown_format +02311_hashed_array_dictionary_hierarchical_functions +02311_normalize_utf8_constant +02311_range_hashed_dictionary_range_cast +02312_is_not_null_prewhere +02312_parquet_orc_arrow_names_tuples +02313_avro_records_and_maps +02313_cross_join_dup_col_names +02313_dump_column_structure_low_cardinality +02313_group_by_modifiers_with_non_default_types +02313_multiple_limits +02313_negative_datetime64 +02313_test_fpc_codec +02314_csv_tsv_skip_first_lines +02315_grouping_constant_folding +02315_pmj_union_ubsan_35857 +02315_replace_multiif_to_if +02316_cast_to_ip_address_default_column +02316_const_string_intersact +02316_expressions_with_window_functions +02316_hierarchical_dictionaries_nullable_parent_key +02316_literal_no_octal +02316_values_table_func_bug +02317_distinct_in_order_optimization +02317_functions_with_nothing +02317_like_with_trailing_escape +02318_template_schema_inference_bug +02319_dict_get_check_arguments_size +02319_lightweight_delete_on_merge_tree +02319_lightweight_delete_on_merge_tree_compact_parts +02319_no_columns_in_row_level_filter +02319_quantile_interpolated_weighted +02319_timeslots_dt64 +02320_alter_columns_with_dots +02320_mapped_array_witn_const_nullable +02321_nested_short_circuit_functions +02323_null_modifier_in_table_function +02324_map_combinator_bug +02325_compatibility_setting_2 +02325_dates_schema_inference +02326_numbers_from_json_strings_schema_inference +02326_settings_changes_system_table +02327_try_infer_integers_schema_inference +02336_sort_optimization_with_fill +02337_analyzer_columns_basic +02337_base58 +02337_check_translate_qualified_names_matcher +02337_multiple_joins_original_names +02338_analyzer_constants_basic +02339_analyzer_matcher_basic +02340_analyzer_functions +02340_union_header +02341_analyzer_aliases_basics +02341_global_join_cte +02342_analyzer_compound_types +02343_analyzer_column_transformers_strict +02343_analyzer_lambdas +02343_analyzer_lambdas_issue_28083 +02343_analyzer_lambdas_issue_36677 +02343_create_empty_as_select +02343_group_by_use_nulls # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +02343_group_by_use_nulls_distributed +02344_analyzer_multiple_aliases_for_expression +02344_distinct_limit_distiributed +02345_analyzer_subqueries +02345_create_table_allow_trailing_comma +02345_partial_sort_transform_optimization +02345_striped_compact_parts +02346_exclude_materialize_skip_indexes_on_insert +02346_exclude_materialize_skip_indexes_on_merge +02346_function_hasPhrase +02346_non_negative_derivative +02346_position_countsubstrings_zero_byte +02346_system_tokenizers +02346_text_index_SplitByRegexp_tokenizer +02346_text_index_add_share_nested_offsets_disabled +02346_text_index_add_with_invalid_alter_command +02346_text_index_array_keyword_tokenizer_alias +02346_text_index_bug101913 +02346_text_index_bug102497 +02346_text_index_bug103812 +02346_text_index_bug106460 +02346_text_index_bug106809 +02346_text_index_bug108519_qcc_skip_index +02346_text_index_bug110038 +02346_text_index_bug110039 +02346_text_index_bug110092 +02346_text_index_bug110350 +02346_text_index_bug111422 +02346_text_index_bug111788 +02346_text_index_bug113320_shared_prewhere_where_column +02346_text_index_bug116476 +02346_text_index_bug47393 +02346_text_index_bug54541 +02346_text_index_bug59039 +02346_text_index_bug68649 +02346_text_index_bug84805 +02346_text_index_bug87887 +02346_text_index_bug88080 +02346_text_index_bug89605 +02346_text_index_bug90609 +02346_text_index_bug90778 +02346_text_index_bug92921 +02346_text_index_bug93432 +02346_text_index_byte_size_reporting +02346_text_index_coalescingmergetree +02346_text_index_collapsingmergetree +02346_text_index_creation +02346_text_index_creation_chinese +02346_text_index_default_granularity +02346_text_index_detach_attach +02346_text_index_dictionary_cache +02346_text_index_dictionary_frontcoding +02346_text_index_direct_read +02346_text_index_direct_read_crash +02346_text_index_direct_read_nullable +02346_text_index_direct_read_with_query_condition_cache +02346_text_index_direct_read_with_top_k +02346_text_index_drop_caches +02346_text_index_duplicate_tokens +02346_text_index_edge_cases +02346_text_index_empty_string_equals +02346_text_index_fallback_sparse_column +02346_text_index_function_hasAnyAllTokens_partially_materialized +02346_text_index_function_hasPhrase +02346_text_index_function_hasPhrase_positions +02346_text_index_function_hasPhrase_postprocessor +02346_text_index_function_ilike +02346_text_index_function_like +02346_text_index_function_like_affix +02346_text_index_function_like_array_patterns +02346_text_index_functions_select_expression +02346_text_index_functions_with_empty_needle +02346_text_index_has_any_tokens_sparse_grams +02346_text_index_hastoken_separator_needle +02346_text_index_header_cache +02346_text_index_hint +02346_text_index_hint_profileevents +02346_text_index_icu_tokenizer +02346_text_index_ilike_utf8_case_folding +02346_text_index_keyvaluepairs_in +02346_text_index_keyvaluepairs_map_contains_key_value +02346_text_index_keyvaluepairs_tokenizer +02346_text_index_like_unknown_backslash_escape +02346_text_index_lwd +02346_text_index_match_predicate +02346_text_index_materialization +02346_text_index_materialize_subcolumns +02346_text_index_mergeTreeTextIndex +02346_text_index_multiple_blocks +02346_text_index_nullable +02346_text_index_on_expressions +02346_text_index_on_lower_column +02346_text_index_on_subcolumns +02346_text_index_optimize_trivial_count +02346_text_index_part_format +02346_text_index_partially_materialized +02346_text_index_phrase_search +02346_text_index_positions_build_overflow +02346_text_index_posting_list_compression +02346_text_index_posting_list_compression_data_size_validation +02346_text_index_postings_cache +02346_text_index_postprocessor +02346_text_index_postprocessor_in_filter +02346_text_index_postprocessor_long_tokens +02346_text_index_postprocessor_materialization +02346_text_index_postprocessor_predicates +02346_text_index_postprocessor_stem +02346_text_index_postprocessor_tokenizers +02346_text_index_preprocessor +02346_text_index_preprocessor_all_positions +02346_text_index_preprocessor_lambda_collision +02346_text_index_preprocessor_partially_materialized +02346_text_index_qualify_filter_name_mismatch +02346_text_index_queries +02346_text_index_replacingmergetree1 +02346_text_index_replacingmergetree2 +02346_text_index_split_by_regexp_extract +02346_text_index_summingmergetree +02346_text_index_tokenizer_partially_materialized +02346_text_index_transform_access +02346_text_index_transform_data_access +02346_text_index_vertical_merge +02346_text_token_index_transform_null_in +02346_to_hour_monotonicity_fix +02346_to_hour_monotonicity_fix_2 +02347_rank_corr_nan +02347_rank_corr_size_overflow +02351_Map_combinator_dist +02352_grouby_shadows_arg +02352_lightweight_delete +02353_ascii +02353_explain_ast_optimize +02353_isnullable +02353_partition_prune_nullable_key +02353_simdjson_buffer_overflow +02353_translate +02354_array_lowcardinality +02354_numeric_literals_with_underscores +02354_parse_timedelta +02354_read_in_order_prewhere +02354_tuple_element_with_default +02354_tuple_lowcardinality +02354_vector_search_adaptive_index_granularity +02354_vector_search_and_other_skipping_indexes +02354_vector_search_array_join +02354_vector_search_assign_centroid +02354_vector_search_binary_quantization +02354_vector_search_bug100556 +02354_vector_search_bug110405 +02354_vector_search_bug112233 +02354_vector_search_choose_correct_index +02354_vector_search_default_granularity +02354_vector_search_detach_attach +02354_vector_search_different_array_sizes +02354_vector_search_dotted_search_column +02354_vector_search_drop_table_clear_cache +02354_vector_search_empty_arrays_or_default_values +02354_vector_search_final_prewhere +02354_vector_search_hierarchical_kmeans +02354_vector_search_incident1654 +02354_vector_search_index_creation_negative +02354_vector_search_l2distance +02354_vector_search_lazy_materialization +02354_vector_search_multi_dot_column_name +02354_vector_search_multiple_indexes +02354_vector_search_multiple_marks +02354_vector_search_nonindexed_columns +02354_vector_search_part_format +02354_vector_search_pre_and_post_filtering +02354_vector_search_quantize_codec +02354_vector_search_quantize_codec_const_array +02354_vector_search_quantize_codec_hartley_guard +02354_vector_search_quantize_codec_int8 +02354_vector_search_quantize_codec_invalid_params +02354_vector_search_quantize_codec_kronecker +02354_vector_search_quantize_codec_merge_variant +02354_vector_search_quantize_codec_mrl +02354_vector_search_quantize_codec_negative +02354_vector_search_quantize_codec_no_alter +02354_vector_search_quantize_codec_planner +02354_vector_search_quantize_codec_planner_edge_cases +02354_vector_search_quantize_codec_pq +02354_vector_search_quantize_codec_pq_invalid_params +02354_vector_search_quantize_codec_pq_merge +02354_vector_search_quantize_codec_pq_multigranule +02354_vector_search_quantize_codec_pq_part_type +02354_vector_search_quantize_codec_prewhere +02354_vector_search_quantize_codec_rabitq_simd +02354_vector_search_quantize_codec_shadowed_subcolumn +02354_vector_search_quantize_codec_subcolumn_read_bytes +02354_vector_search_quantize_codec_turboquant +02354_vector_search_quantized_codes_array_join +02354_vector_search_quantized_codes_multi_dot_column_name +02354_vector_search_queries +02354_vector_search_reference_vector_types +02354_vector_search_rescoring +02354_vector_search_rescoring_and_prewhere +02354_vector_search_rescoring_distance_in_select_list +02354_vector_search_row_policy +02354_vector_search_select_on_vector_column +02354_vector_search_subquery +02354_vector_search_undefined_behavior +02354_vector_search_unquoted_index_parameters +02354_vector_search_unrelated_dotted_column +02354_vector_search_vector_similarity_index_cache +02354_vector_search_where_on_vector_column +02354_vector_search_with_huge_dimension +02354_vector_search_with_second_index +02354_window_expression_with_aggregation_expression +02354_with_statement_non_exist_column +02355_column_type_name_lc +02355_control_block_size_in_aggregator +02355_control_block_size_in_array_join +02356_trivial_count_with_empty_set +02357_file_default_value +02360_small_notation_h_for_hour_interval +02362_part_log_merge_algorithm +02363_mapupdate_improve +02364_dictionary_datetime_64_attribute_crash +02364_multiSearch_function_family +02364_setting_cross_to_inner_rewrite +02364_window_case +02365_multisearch_random_tests +02366_asof_optimize_predicate_bug_37813 +02366_decimal_agg_state_conversion +02366_direct_dictionary_dict_has +02366_explain_query_tree +02366_kql_distinct +02366_kql_extend +02366_kql_func_binary +02366_kql_func_dynamic +02366_kql_func_iif +02366_kql_func_math +02366_kql_func_scalar +02366_kql_func_string +02366_kql_mvexpand +02366_kql_summarize +02366_kql_tabular +02366_normalize_aggregate_function_types_and_states +02366_window_function_order_by +02366_with_fill_date +02367_analyzer_table_alias_columns +02367_join_pushdown_column_not_found +02367_optimize_trivial_count_with_array_join +02368_analyzer_table_functions +02369_analyzer_array_join_function +02370_analyzer_in_function +02370_extractAll_regress +02371_analyzer_join_cross +02371_create_temporary_table_as_with_columns_list +02371_select_projection_normal_agg +02372_nowInBlock +02373_analyzer_join_use_nulls +02374_analyzer_array_join +02374_combine_multi_if_and_count_if_opt +02374_in_tuple_index +02374_regexp_replace +02375_analyzer_union +02375_scalar_lc_cte +02376_analyzer_in_function_subquery +02376_arrow_dict_with_string +02377_analyzer_in_function_set +02377_executable_function_settings +02377_fix_file_virtual_column +02377_modify_column_from_lc +02377_modify_column_from_nested +02377_optimize_sorting_by_input_stream_properties +02377_optimize_sorting_by_input_stream_properties_2 +02378_analyzer_projection_names +02379_analyzer_subquery_depth +02380_analyzer_join_sample +02381_analyzer_join_final +02381_compress_marks_and_primary_key +02381_join_dup_columns_in_plan +02381_parse_array_of_tuples +02381_setting_value_auto +02382_analyzer_matcher_join_using +02383_analyzer_merge_tree_self_join +02383_array_signed_const_positive_index +02383_schema_inference_hints +02384_analyzer_dict_get_join_get +02384_decrypt_bad_arguments +02385_analyzer_aliases_compound_expression +02386_analyzer_in_function_nested_subqueries +02386_set_columns_order +02387_analyzer_cte +02387_parse_date_as_datetime +02388_analyzer_recursive_lambda +02388_conversion_from_string_with_datetime64_to_date_and_date32 +02389_analyzer_nested_lambda +02391_hashed_dictionary_shards +02391_recursive_buffer +02392_every_setting_must_have_documentation +02393_every_metric_must_have_documentation +02394_every_profile_event_must_have_documentation +02395_every_merge_tree_setting_must_have_documentation +02398_subquery_where_pushdown_and_limit_offset +02399_merge_tree_mutate_in_partition +02401_merge_tree_old_tmp_dirs_cleanup +02402_merge_engine_with_view +02403_enable_extended_results_for_datetime_functions +02403_ttl_column_multiple_times +02404_lightweight_delete_vertical_merge +02404_schema_inference_cache_respect_format_settings +02405_avro_read_nested +02405_pmj_issue_40335 +02406_minmax_behaviour +02406_try_read_datetime64_bug +02407_array_element_from_map_wrong_type +02408_to_fixed_string_short_circuit +02409_url_format_detection +02410_csv_empty_fields_inference +02410_to_decimal_or_default +02414_all_new_table_functions_must_be_documented +02415_all_new_functions_must_be_documented +02416_grouping_function_compatibility +02416_in_set_same_ast_diff_columns +02416_input_json_formats +02416_json_tuple_to_array_schema_inference +02416_rocksdb_delete_update +02416_row_policy_always_false_index +02417_from_select_syntax +02417_null_variadic_behaviour +02418_tautological_if_index +02419_contingency_array_nullable +02420_final_setting_analyzer +02420_key_condition_actions_dag_bug_40599 +02421_decimal_in_precision_issue_41125 +02422_insert_different_granularity +02422_msgpack_uuid_wrong_column +02422_read_numbers_as_strings +02423_multidimensional_array_get_data_at +02424_pod_array_overflow +02425_categorical_information_value_properties +02426_create_suspicious_fixed_string +02426_pod_array_overflow_2 +02426_pod_array_overflow_3 +02426_to_string_nullable_fixedstring +02427_column_nullable_ubsan +02427_msan_group_array_resample +02428_decimal_in_floating_point_literal +02428_delete_with_settings +02428_index_analysis_with_null_literal +02428_parameterized_view_param_in_select_section +02428_partial_sort_optimization_bug +02429_groupBitmap_chain_state +02429_offset_pipeline_stuck_bug +02430_bitmap_transform_exception_code +02431_single_value_or_null_empty # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +02447_join_numeric_low_cardinality +02451_variadic_null_garbage_data +02452_check_low_cardinality +02453_check_path_in_errors_logger +02454_compressed_marks_in_compact_part +02454_disable_mergetree_with_lightweight_delete_column +02455_count_state_asterisk +02455_duplicate_column_names_in_schema_inference +02455_extract_fixed_string_from_nested_json +02455_improve_feedback_when_replacing_partition_with_different_primary_key +02456_BLAKE3_hash_function_test +02456_aggregate_state_conversion +02456_bloom_filter_assert +02456_datetime_schema_inference +02456_summing_mt_lc +02457_datediff_via_unix_epoch +02457_key_condition_with_types_that_cannot_be_nullable +02457_morton_coding_with_mask +02457_parse_date_time_best_effort +02458_datediff_date32 +02458_default_setting +02458_key_condition_not_like_prefix +02458_relax_too_many_parts +02459_group_by_all +02459_low_cardinality_uint128_aggregator +02459_materialized_view_default_value +02459_read_in_order_bufer +02460_prewhere_row_level_policy +02461_join_lc_issue_42380 +02461_mullable_pk_monotonicity_bug +02461_prewhere_row_level_policy_lightweight_delete +02461_welch_t_test_fuzz +02462_distributions +02462_match_regexp_pk +02462_number_to_datetype +02463_julian_day_ubsan +02464_decimal_scale_buffer_overflow +02465_limit_trivial_max_rows_to_read +02466_distributed_query_profiler +02467_cross_join_three_table_functions +02467_set_with_lowcardinality_type +02468_has_any_tuple +02469_fix_aliases_parser +02469_interval_msan +02469_obfuscate_table_function +02470_suspicious_low_cardinality_msan +02471_wrong_date_monotonicity +02472_segfault_expression_parser +02473_extract_low_cardinality_from_json +02473_map_element_nullable +02473_prewhere_with_bigint +02474_analyzer_subqueries_table_expression_modifiers +02474_create_user_query_fuzzer_bug +02474_extract_fixedstring_from_json +02474_fix_function_parser_bug +02474_timeDiff_UTCTimestamp +02474_unhex_in_fix_string +02475_analysis_of_variance +02475_analyzer_join_tree_subquery +02475_analyzer_subquery_compound_expression +02475_bad_cast_low_cardinality_to_string_bug +02475_date_time_schema_inference_bug +02475_join_bug_42832 +02475_or_function_alias_and_const_where +02475_packed_storage_for_parts +02475_positive_modulo +02475_precise_decimal_arithmetics +02475_split_with_max_substrings +02476_analyzer_join_with_unused_columns +02476_fix_cast_parser_bug +02476_fuse_sum_count +02476_query_parameters_insert +02476_query_parameters_without_serialisation +02477_age +02477_age_date32 +02477_age_datetime64 +02477_analyzer_array_join_with_join +02477_analyzer_ast_key_condition_crash +02477_exists_fuzz_43478 +02477_fuse_quantiles +02477_invalid_reads +02477_is_null_parser +02477_logical_expressions_optimizer_issue_89803 +02477_logical_expressions_optimizer_low_cardinality +02477_single_value_data_string_regression +02478_analyzer_table_expression_aliases +02478_factorial +02478_projection_and_alter_low_cardinality +02478_projection_with_group_by_alter +02478_window_frame_type_groups +02479_analyzer_aggregation_crash +02479_analyzer_aggregation_totals_rollup_crash_fix # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +02479_analyzer_join_with_constants +02479_if_with_null_and_cullable_const +02479_mysql_connect_to_self +02479_nullable_primary_key_non_first_column +02480_analyzer_alias_nullptr +02480_every_asynchronous_metric_must_have_documentation +02480_max_map_null_totals # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +02480_parse_date_time_best_effort_math_overflow +02480_suspicious_lowcard_in_key +02480_tlp_nan +02481_aggregation_in_order_plan +02481_analyzer_join_alias_unknown_identifier_crash +02481_analyzer_optimize_aggregation_arithmetics +02481_analyzer_optimize_grouping_sets_keys +02481_array_join_with_map +02481_default_value_used_in_row_level_filter +02481_fix_parameters_parsing +02481_i43247_ubsan_in_minmaxany +02481_inject_random_order_for_select_without_order_by +02481_low_cardinality_with_short_circuit_functins +02481_low_cardinality_with_short_circuit_functins_mutations +02481_merge_array_join_sample_by +02481_pk_analysis_with_enum_to_string +02481_prewhere_filtered_rows_div_by_zero +02481_xxh3_hash_function +02482_execute_functions_before_sorting_bug +02482_if_with_nothing_argument +02482_value_block_assert +02483_check_virtuals_shile_using_structure_from_insertion_table +02483_merge_projections +02483_substitute_udf_create +02484_substitute_udf_storage_args +02489_analyzer_indexes +02490_replacing_merge_tree_is_deleted_column_transform_opt +02493_analyzer_sum_if_to_count_if +02493_analyzer_table_functions_untuple +02493_analyzer_uniq_injective_functions_elimination +02493_do_not_assume_that_the_original_query_was_valid_when_transforming_joins +02493_numeric_literals_with_underscores +02494_analyzer_compound_expression_crash_fix +02494_analyzer_cte_resolution_in_subquery_fix +02494_array_function_range +02494_combinators_with_null_argument +02494_optimize_group_by_function_keys_and_alias_columns +02494_parser_string_binary_literal +02494_query_cache_case_agnostic_matching +02494_query_cache_compression +02494_query_cache_drop_cache +02494_query_cache_eligible_queries +02494_query_cache_empty_tuple +02494_query_cache_events +02494_query_cache_exception_handling +02494_query_cache_explain +02494_query_cache_key # only=tcp: the test drops the current database; over HTTP each later request fails +02494_query_cache_log_comment +02494_query_cache_metrics +02494_query_cache_min_query_duration +02494_query_cache_min_query_runs +02494_query_cache_nondeterministic_functions +02494_query_cache_normalize_ast +02494_query_cache_passive_usage +02494_query_cache_query_log +02494_query_cache_secrets +02494_query_cache_sparse_columns +02494_query_cache_squash_partial_results +02494_query_cache_system_clear_on_cluster +02494_query_cache_tag +02494_query_cache_totals_extremes # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +02494_query_cache_udf_sql +02494_query_cache_user_quotas +02494_query_cache_user_quotas_after_drop +02495_analyzer_storage_join +02495_concat_with_separator +02495_sum_if_to_count_if_bug +02496_format_datetime_in_joda_syntax +02496_from_unixtime_in_joda_syntax +02497_analyzer_sum_if_count_if_pass_crash_fix +02497_having_without_actual_aggregation_bug +02497_if_transform_strings_to_enum +02497_schema_inference_nulls +02497_storage_join_right_assert +02498_analyzer_aggregate_functions_arithmetic_operations_pass_fix +02498_analyzer_settings_push_down +02498_storage_join_key_positions +02499_analyzer_aggregate_function_lambda_crash_fix +02499_analyzer_set_index +02499_escaped_quote_schema_inference +02499_extract_key_value_pairs_multiple_input +02499_quantile_nan_ubsan_msan # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +02499_read_json_objects_as_strings +02500_analyzer_storage_view_crash_fix +02500_prevent_drop_nested_if_empty_part +02501_analyzer_expired_context_crash_fix +02502_analyzer_insert_select_crash_fix +02502_bad_values_schema_inference +02502_fuzz_bad_cast_to_ast_literal +02503_bad_compatibility_setting +02503_in_lc_const_args_bug +02503_join_switch_alias_fuzz +02503_mysql_compat_utc_timestamp +02504_bar_fractions +02504_disallow_arrayjoin_in_mutations +02504_explain_ast_insert +02504_parse_datetime_best_effort_calebeaires +02504_regexp_dictionary_table_source +02504_sparse_nullable_columns +02505_forbid_paths_in_datetime_timezone +02506_date_time64_floating_point_negative_value +02507_to_unix_timestamp_overflow +02508_index_analysis_to_date_timezone +02509_h3_arguments +02510_group_by_prewhere_null +02511_complex_literals_as_aggregate_function_parameters +02512_array_join_name_resolution +02513_analyzer_duplicate_alias_crash_fix +02513_analyzer_sort_msan +02513_broken_datetime64_init_on_mac +02513_date_string_comparison +02513_prewhere_combine_step_filters +02513_validate_data_types +02514_analyzer_drop_join_on +02514_bad_index_granularity +02514_if_with_lazy_low_cardinality +02514_null_dictionary_source +02514_tsv_zero_started_number +02515_aggregate_functions_statistics +02515_analyzer_null_for_empty +02515_and_or_if_multiif_not_return_lc +02515_distinct_zero_size_key_bug_44831 +02515_generate_ulid +02515_projections_with_totals # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +02515_tuple_lambda_parsing +02516_join_with_totals_and_subquery_bug # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +02516_projections_and_context +02516_projections_with_rollup +02517_executable_pool_bad_input_query +02517_union_columns_order +02517_uuid_parsing +02518_delete_on_materialized_view +02518_merge_engine_nullable_43324 +02518_qualified_asterisks_alias_table_name +02518_rewrite_aggregate_function_with_if +02519_monotonicity_fuzz +02521_analyzer_aggregation_without_column +02521_analyzer_array_join_crash +02521_cannot_find_column_in_projection +02521_grouping_sets_plus_memory_efficient_aggr +02521_lightweight_delete_and_ttl +02521_to_custom_day_of_week +02523_array_shuffle +02524_fuzz_and_fuss +02524_fuzz_and_fuss_2 +02525_analyzer_function_in_crash_fix +02525_different_engines_in_temporary_tables +02525_jit_logical_functions_nan +02525_range_hashed_dictionary_update_field +02526_merge_join_int_decimal # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +02527_storage_merge_prewhere_different_type +02530_ip_part_id +02531_ipv4_arithmetic +02531_semi_join_null_const_bug +02531_storage_join_null_44940 +02532_analyzer_aggregation_with_rollup +02532_profileevents_server_startup_time +02533_generate_random_schema_inference +02534_analyzer_grouping_function +02534_default_granularity +02534_join_prewhere_bug +02534_keyed_siphash +02535_analyzer_group_by_use_nulls # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +02535_analyzer_limit_offset +02535_ip_parser_not_whole +02536_date_from_number_inference_fix +02536_delta_gorilla_corruption +02536_replace_with_nonconst_needle_and_replacement +02536_system_sync_file_cache +02537_system_formats +02538_analyzer_create_table_as_select +02538_ngram_bf_index_with_null +02538_nullable_array_tuple_timeseries +02539_generate_random_ip +02539_generate_random_low_cardinality +02539_generate_random_map +02539_vertical_merge_compact_parts +02540_analyzer_matcher_alias_materialized_columns +02540_date_column_consistent_insert_behaviour +02540_duplicate_primary_key +02540_duplicate_primary_key2 +02541_analyzer_grouping_sets_crash_fix +02541_empty_function_support_ip +02541_multiple_ignore_with_nested_select +02541_tuple_element_with_null +02542_case_no_else +02542_table_function_format +02542_transform_new +02542_transform_old +02551_ipv4_implicit_uint64 +02552_analyzer_optimize_group_by_function_keys_crash +02552_check_referential_table_dependencies +02552_inner_join_with_where_true +02552_siphash128_reference +02552_sparse_columns_intersect +02554_invalid_create_view_syntax +02554_rewrite_count_distinct_if_with_count_distinct_implementation +02559_add_parts +02559_ip_types_bloom +02559_multiple_read_steps_in_prewhere +02559_multiple_read_steps_in_prewhere_fuzz +02559_multiple_read_steps_in_prewhere_missing_columns +02559_multiple_read_steps_in_prewhere_missing_columns_2 +02559_multiple_read_steps_in_prewhere_reuse_computation +02559_nested_multiple_levels_default +02560_agg_state_deserialization_hash_table_crash +02560_analyzer_materialized_view +02560_count_digits +02560_null_as_default +02560_quantile_min_max +02560_regexp_denial_of_service +02560_window_ntile +02560_with_fill_int256_int +02561_sorting_constants_and_distinct_crash +02561_with_fill_date_datetime_incompatible +02562_regexp_extract +02562_with_fill_nullable +02564_analyzer_cross_to_inner +02564_analyzer_ssb_cross_to_inner +02564_date_format +02564_read_in_order_final_desc +02565_analyzer_limit_settings +02565_update_empty_nested +02567_and_consistency +02568_and_consistency +02568_array_map_const_low_cardinality +02568_json_array_length +02569_order_by_aggregation_result +02572_max_intersections +02573_insert_null_as_default_null_as_empty_nested +02573_quantile_fuse_msan +02574_suspicious_low_cardinality_msan +02575_map_hashing_msan +02575_merge_prewhere_default_expression +02575_merge_prewhere_different_default_kind +02575_merge_prewhere_ephemeral +02575_merge_prewhere_materialized +02576_predicate_push_down_sorting_fix +02576_rewrite_array_exists_to_has +02577_analyzer_array_join_calc_twice +02578_ipv4_codec_t64 +02578_parameterized_rename_queries +02579_fill_empty_chunk +02579_fill_empty_chunk_analyzer +02579_parameterized_replace +02580_like_substring_search_bug +02581_share_big_sets_between_mutation_tasks +02581_share_big_sets_between_mutation_tasks_with_storage_set +02581_width_bucket +02582_analyzer_join_subquery_empty_column_list +02583_map_literal_cast +02584_range_ipv4 +02587_csv_big_numbers_inference +02589_bson_invalid_document_size +02590_bson_duplicate_column +02596_build_set_and_remote +02661_quantile_approx +02662_first_last_value +02662_sparse_columns_mutations_1 +02662_sparse_columns_mutations_2 +02662_sparse_columns_mutations_3 +02662_sparse_columns_mutations_4 +02662_sparse_columns_mutations_5 +02668_column_block_number +02668_column_block_number_vertical_merge +02668_column_block_number_with_projections +02668_logical_optimizer_removing_redundant_checks +02668_parse_datetime +02668_parse_datetime_in_joda_syntax +02668_ulid_decoding +02669_alter_modify_to_nullable +02670_constant_skip_index +02674_and_consistency +02674_date_int_string_json_inference +02674_null_default_structure +02674_trivial_count_analyzer +02675_is_ipv6_function_fix +02675_predicate_push_down_filled_join_fix +02675_sparse_columns_clear_column +02676_analyzer_limit_offset +02676_kafka_murmur_hash +02676_to_decimal_string +02676_trailing_commas +02677_analyzer_bitmap_has_any +02677_analyzer_compound_expressions +02677_decode_url_component +02677_get_subcolumn_array_of_tuples +02677_grace_hash_limit_race +02679_explain_merge_tree_prewhere_row_policy +02679_query_parameters_dangling_pointer +02680_datetime64_monotonic_check +02680_default_star +02680_illegal_type_of_filter_projection +02680_instr_alias_for_position_case_insensitive +02680_lc_null_as_default +02680_mysql_ast_logical_err +02681_aggregation_by_partitions_bug +02681_comparsion_tuple_elimination_ast +02681_group_array_too_large_size +02682_quantiles_too_large_size +02684_bson +02685_bson2 +02685_decimal256_various +02686_bson3 +02687_native_fuzz +02688_aggregate_states +02688_long_aggregate_function_names +02689_meaningless_data_types +02690_subquery_identifiers +02691_multiple_joins_backtick_identifiers +02692_multiple_joins_unicode +02693_multiple_joins_in +02694_wrong_identifier_shouldnt_be_accepted +02695_logical_optimizer_alias_bug +02695_storage_join_insert_select_deadlock +02696_ignore_inacc_tables_mat_view_attach +02697_alter_dependencies +02698_marked_dropped_tables +02699_polygons_sym_difference_rollup +02699_polygons_sym_difference_total # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +02699_polygons_sym_difference_total_analyzer # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +02700_regexp_operator +02701_invalid_having_NOT_AN_AGGREGATE +02701_non_parametric_function +02702_logical_optimizer_with_nulls +02705_grouping_keys_equal_keys +02705_projection_and_ast_optimizations_bug +02705_settings_check_changed_flag +02706_array_map_tuples +02706_kolmogorov_smirnov_test +02706_show_columns +02707_analyzer_nested_lambdas_types +02707_skip_index_with_in +02708_dotProduct +02708_parallel_replicas_not_found_column +02709_generate_random_valid_decimals_and_bools +02709_storage_memory_compressed +02710_aggregation_nested_map_ip_uuid +02710_allow_suspicious_indices +02710_date_diff_aliases +02710_show_table +02710_topk_with_empty_array +02711_soundex_function +02711_trim_aliases +02713_array_low_cardinality_string +02713_ip4_uint_compare +02714_date_date32_in +02714_read_bytes_aggregateFunction +02715_bit_operations_float +02715_or_null +02716_create_direct_dict_with_lifetime_throws +02716_drop_if_empty +02716_int256_arrayfunc +02718_array_fold +02719_aggregate_with_empty_string_key +02720_row_policy_column_with_dots +02722_log_profile_events +02722_matcher_join_use_nulls +02723_jit_aggregation_bug_48120 +02723_parallelize_output_setting +02724_function_in_left_table_clause_asof_join +02724_jit_logical_functions +02724_mutliple_storage_join +02724_show_indexes +02725_agg_projection_respect_PK +02725_alias_columns_should_not_allow_compression_codec +02725_alias_with_restricted_keywords +02725_any_join_single_row +02725_cnf_large_check +02725_memory-for-merges +02725_null_group_key_with_rollup # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +02725_sleep_max_time +02725_url_support_virtual_column +02726_async_insert_flush_queue +02730_dictionary_hashed_load_factor_element_count +02730_with_fill_by_sorting_prefix +02731_auto_convert_dictionary_layout_to_complex_by_complex_keys +02731_in_operator_with_one_size_tuple +02731_nothing_deserialization +02732_transform_fuzz +02733_distinct +02733_fix_distinct_in_order_bug_49622 +02733_sparse_columns_reload +02734_big_int_from_float_ubsan +02734_optimize_group_by +02734_sparse_columns_mutation +02734_sparse_columns_short_circuit +02735_array_map_array_of_tuples +02735_asof_join_right_null +02736_bit_count_big_int +02737_arrayJaccardIndex +02737_sql_auto_is_null +02740_hashed_dictionary_load_factor_smoke +02741_hashed_dictionary_load_factor +02746_index_analysis_binary_operator_with_null +02751_match_constant_needle +02751_multiif_to_if_crash +02751_query_log_test_partitions +02752_custom_separated_ignore_spaces_bug +02752_is_null_priority +02752_space_function +02762_replicated_database_no_args +02763_jit_compare_functions_nan +02763_mutate_compact_part_with_skip_indices_and_projections +02763_row_policy_storage_merge +02763_row_policy_storage_merge_alias +02764_index_analysis_fix +02765_parallel_replicas_final_modifier +02766_bitshift_with_const_arguments +02768_cse_nested_distributed +02769_array_pack_bits +02769_compare_functions_nan +02770_jit_aggregation_nullable_key_fix +02771_if_constant_folding +02771_ignore_data_skipping_indices +02771_jit_functions_comparison_crash +02771_log_faminy_truncate_count +02771_resolve_compound_identifier +02771_tsv_csv_custom_skip_trailing_empty_lines +02772_jit_date_time_add +02775_show_columns_called_from_clickhouse +02781_data_skipping_index_merge_tree_min_for_seek +02782_inconsistent_formatting_and_constant_folding +02782_values_null_to_lc_nullable +02783_date_predicate_optimizations +02783_max_bytes_to_read_in_schema_inference +02784_move_all_conditions_to_prewhere_analyzer_asan +02784_projections_read_in_order_bug +02784_schema_inference_null_as_default +02785_date_predicate_optimizations_ast_query_tree_rewrite +02785_left_anti_join_bug +02785_summing_merge_tree_datetime64 +02786_transform_float +02787_transform_null +02788_current_schemas_function +02789_functions_after_sorting_and_columns_with_same_names_bug +02789_functions_after_sorting_and_columns_with_same_names_bug_2 +02789_jit_cannot_convert_column +02789_set_index_nullable_condition_bug +02790_fix_coredump_when_compile_expression +02790_keyed_hash_bug +02790_url_multiple_tsv_files +02791_final_block_structure_mismatch_bug +02791_predicate_pushdown_different_types +02792_drop_projection_lwd +02794_pushdown_invalid_get +02795_full_join_assert_cast +02796_calculate_text_stack_trace # only=tcp: the HTTP handler writes the exception to text_log a second time +02796_projection_date_filter_on_view +02797_aggregator_huge_mem_usage_bug +02797_join_nested_lowcardinality_convert +02797_range_nullable +02797_transform_narrow_types +02798_generic_transform +02798_substring_index +02799_transform_empty_arrays +02800_transform_alter +02801_transform_nullable +02802_with_cube_with_totals # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +02804_intersect_bad_cast +02806_cte_block_cannot_be_empty +02806_system_parts_columns_modification_time +02807_default_date_time_nullable +02807_lower_utf8_msan +02807_math_unary_crash +02808_aliases_inside_case +02809_has_subsequence +02809_has_token +02809_prewhere_and_in +02809_storage_set_analysis_bug +02810_convert_uuid_to_uint128 +02810_fix_remove_dedundant_distinct_view +02810_initcap +02810_row_binary_with_defaults +02810_system_jemalloc_bins +02811_insert_schema_inference +02811_invalid_embedded_rocksdb_create +02811_ip_dict_attribute +02811_primary_key_in_columns +02811_read_in_order_and_array_join_bug +02812_bug_with_unused_join_columns +02812_csv_date_time_with_comma +02812_pointwise_array_operations +02812_subquery_operators +02813_any_value +02813_array_agg +02813_array_concat_agg +02813_create_index_noop +02813_float_parsing +02813_func_now_and_alias +02813_func_today_and_alias +02813_optimize_lazy_materialization +02813_seriesDecomposeSTL +02813_seriesOutliersDetectTukey +02813_series_period_detect +02813_starting_in_text_log +02814_ReplacingMergeTree_fix_select_final_on_single_partition +02814_age_datediff +02814_create_index_uniq_noop +02814_currentDatabase_for_table_functions +02814_order_by_tuple_window_function +02815_alias_to_length +02815_analyzer_aggregate_functions_of_group_by_keys +02815_empty_subquery_nullable_bug +02815_first_line +02815_fix_not_found_constants_col_in_block +02815_join_algorithm_setting +02815_logical_error_cannot_get_column_name_of_set +02815_range_dict_no_direct_join +02816_check_projection_metadata +02816_has_token_empty +02816_s2_invalid_point +02817_group_array_moving_zero_window_size +02818_parameterized_view_with_cte_multiple_usage +02828_create_as_table_function_rename +02830_insert_values_time_interval +02831_ast_fuzz_asan_join +02831_regexp_analyze_recursion +02831_trash +02832_alter_delete_indexes_projections +02832_integer_type_inference +02832_transform_fixed_string_no_default +02833_array_join_columns +02833_multiprewhere_extra_column +02833_sparse_columns_tuple_function +02833_starts_ends_with_utf8 +02833_std_alias +02833_window_func_range_offset +02834_add_sub_date_functions +02834_alter_exception +02834_analyzer_with_statement_references +02834_apache_arrow_abort +02834_array_exists_segfault +02834_formats_with_variable_number_of_columns +02834_nulls_first_sort +02834_sparse_columns_sort_with_limit +02834_timestamp_function +02835_fuzz_remove_redundant_sorting # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +02835_join_step_explain +02835_nested_array_lowcardinality +02840_grace_hash_join_structure_mismatch +02840_merge__table_or_filter +02841_group_array_sorted +02841_join_filter_set_sparse +02841_not_ready_set_constraints +02841_not_ready_set_join_on +02841_parallel_final_wrong_columns_order +02841_parquet_filter_pushdown +02841_tuple_modulo +02841_with_clause_resolve +02842_move_pk_to_end_of_prewhere +02842_truncate_database +02842_vertical_merge_after_add_drop_column +02843_context_has_expired +02843_date_predicate_optimizations_bugs +02844_subquery_timeout_with_break +02845_arrayShiftRotate +02845_group_by_constant_keys +02845_join_on_cond_sparse +02845_prewhere_preserve_column +02861_filter_pushdown_const_bug +02861_index_set_incorrect_args +02861_interpolate_alias_precedence +02861_join_on_nullsafe_compare +02861_replacing_merge_tree_with_cleanup +02862_uuid_reinterpret_as_numeric +02863_decode_html_component +02863_ignore_foreign_keys_in_tables_definition +02863_interpolate_subquery +02863_mutation_where_in_set_result_cache_pipeline_stuck_bug +02863_non_const_timezone_check +02864_filtered_url_with_globs +02864_profile_event_part_lock +02864_replace_regexp_string_fallback +02864_statistics_bug_67742 +02864_statistics_bug_69589 +02864_statistics_create_materialize_drop +02864_statistics_delayed_materialization_in_merge +02864_statistics_predicates +02864_statistics_usage +02864_test_ipv4_type_mismatch +02865_array_join_with_max_block_size +02866_size_of_marks_skip_idx_explain +02867_create_user_ssh +02867_null_lc_in_bug +02867_nullable_primary_key_final +02868_distinct_to_count_optimization +02868_operator_is_not_distinct_from_priority +02868_select_support_from_keywords +02869_insert_filenames_collisions +02869_unicode_minus +02871_join_on_system_errors +02871_multiple_joins_rewriter_v2_handle_last_table_columns +02872_gcd_codec +02872_prewhere_filter +02874_analysis_of_variance_overflow +02874_infer_objects_as_named_tuples +02874_json_merge_patch_function_test +02874_parse_json_as_json_each_row_on_no_metadata +02874_toDaysSinceYearZero +02875_final_invalid_read_ranges_bug +02875_fix_column_decimal_serialization +02875_json_array_as_string +02875_parallel_replicas_remote +02876_json_incomplete_types_as_strings_inference +02876_sort_union_of_sorted +02876_yyyymmddhhmmsstodatetime +02880_indexHint__partition_id +02881_system_detached_parts_modification_time +02882_formatQuery +02882_primary_key_index_in_function_different_types +02883_array_scalar_mult_div_modulo +02883_read_in_reverse_order_virtual_column +02884_duplicate_index_name +02884_parallel_window_functions_bug +02884_string_distance_function +02884_virtual_column_order_by +02885_arg_min_max_combinator +02886_binary_like +02887_byteswap +02887_format_readable_timedelta_subseconds +02887_tuple_element_distributed +02888_attach_partition_from_different_tables +02888_integer_type_inference_in_if_function +02888_obsolete_settings +02888_single_state_nullable_type +02888_system_tables_with_inaccessible_table_function # only=tcp: the test drops the current database; over HTTP each later request fails +02889_datetime64_from_string +02889_parts_columns_filenames +02889_print_pretty_type_names +02889_system_drop_format_schema +02890_named_tuple_functions +02890_partition_prune_in_extra_columns +02891_alter_update_adaptive_granularity +02891_array_shingles +02891_functions_over_sparse_columns +02891_rename_table_without_keyword # only=tcp: the test drops the current database; over HTTP each later request fails +02892_SummingMergeTree_Nested +02892_orc_filter_pushdown +02893_array_enum_has_hasAny +02893_bad_sample_view +02893_system_drop_schema_cache_format +02893_trash_optimization +02893_vertical_final_bugs +02895_cast_operator_bug +02896_cyclic_aliases_crash +02896_illegal_sampling +02896_leading_zeroes_no_octal +02896_max_execution_time_with_break_overflow_mode +02896_multiple_OR +02896_optimize_array_exists_to_has_with_date +02899_distributed_limit_by +02899_indexing_by_space_filling_curves +02900_date_time_check_overflow +02900_decimal_sort_with_multiple_columns +02900_issue_55858 +02900_window_function_with_sparse_column +02901_analyzer_recursive_window +02901_predicate_pushdown_cte_stateful +02901_remove_nullable_crash_analyzer +02902_add_scalar_in_all_case +02902_diable_apply_deleted_mask +02902_select_subcolumns_from_engine_null +02902_show_databases_limit +02903_bug_43644 +02903_parameterized_view_explain_ast +02905_show_setting_query +02905_system_logs_hostname +02906_flatten_only_true_nested +02906_force_optimize_projection_name +02906_interval_comparison +02906_orc_tuple_field_prune +02907_filter_pushdown_crash +02908_alter_column_alias +02908_enum_exact_cast +02910_nullable_enum_cast +02910_prefetch_unexpceted_exception +02910_rocksdb_optimize +02911_add_index_and_materialize_index +02911_analyzer_order_by_read_in_order_query_plan +02911_analyzer_remove_unused_projection_columns +02911_cte_invalid_query_analysis +02911_join_on_nullsafe_optimization +02911_support_alias_column_in_indices +02911_system_symbols +02912_group_array_sample +02913_sum_map_state +02915_analyzer_fuzz_1 +02915_analyzer_fuzz_2 +02915_analyzer_fuzz_5 +02915_analyzer_fuzz_6 +02915_sleep_large_uint +02916_addcolumn_nested +02916_analyzer_set_in_join +02916_csv_infer_numbers_from_strings +02916_date_text_parsing +02916_glogal_in_cancel +02917_transform_tsan +02918_alter_temporary_table +02918_analyzer_to_ast_crash +02918_join_pm_lc_crash # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +02918_optimize_count_for_merge_tables +02918_wrong_dictionary_source +02919_alter_temporary_table_with_nondefault_engine +02919_ddsketch_quantile +02919_segfault_nullable_materialized_update +02919_storage_fuzzjson +02920_alter_column_of_projections +02920_fix_json_merge_patch +02920_rename_column_of_skip_indices +02920_unary_operators_functions +02921_bit_hamming_distance_big_int +02921_database_filesystem_path_check +02921_fuzzbits_with_array_join +02921_parameterized_view_except_queries +02922_respect_nulls_Nullable +02922_respect_nulls_extensive +02922_respect_nulls_parser +02922_respect_nulls_states +02923_cte_equality_disjunction +02923_explain_expired_context +02923_join_use_nulls_modulo +02931_alter_materialized_view_query_inconsistent +02931_rewrite_sum_column_and_constant +02931_ubsan_error_arena_aligned_alloc +02932_analyzer_rewrite_sum_column_and_constant +02932_apply_deleted_mask +02932_group_by_null_fuzzer # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +02932_lwd_and_mutations +02932_materialized_view_with_dropped_target_table_no_exception +02932_non_ready_set_stuck # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +02932_query_settings_max_size_drop +02932_set_ttl_where +02933_compare_with_bool_as_string +02933_ephemeral_mv +02933_paste_join # only=tcp: the server gives AMBIGUOUS_COLUMN_NAME over the native protocol only +02933_sqid +02934_merge_tree_max_projections +02935_format_with_arbitrary_types +02935_ipv6_bit_operations +02935_ipv6_from_uint128_equality +02935_ipv6_from_uint128_one +02935_ipv6_from_uint128_two +02935_ipv6_from_uint128_with_bit_and +02935_ipv6_to_and_from_uint128 +02935_system_grants_wildcards +02940_json_array_of_unnamed_tuples_inference +02941_any_RESPECT_NULL_sparse_column +02941_projections_external_aggregation +02942_variant_cast +02943_create_query_interpreter_sample_block_fix +02943_exprs_order_in_group_by_with_rollup +02943_order_by_all +02943_positional_arguments_bugs +02943_tokenbf_and_ngrambf_indexes_support_match_function +02943_use_full_text_skip_index_with_has_any +02943_variant_element +02944_variant_as_common_type_analyzer +02945_blake3_msan +02946_literal_alias_misclassification +02946_materialize_column_must_not_override_past_values +02946_merge_tree_final_split_ranges_by_primary_key +02947_dropped_tables_parts +02947_parallel_replicas_remote +02949_ttl_group_by_bug +02950_dictionary_short_circuit +02950_part_offset_as_primary_key +02950_reading_array_tuple_subcolumns +02952_conjunction_optimization +02953_slow_create_view +02954_analyzer_fuzz_i57086 +02955_analyzer_using_functional_args +02955_avro_format_zstd_encode_support +02955_sparkBar_alias_sparkbar +02956_fix_to_start_of_milli_microsecond +02956_format_constexpr +02956_rocksdb_with_ttl +02958_transform_enum +02959_system_database_engines +02960_alter_table_part_query_parameter +02961_analyzer_low_cardinality_fuzzer +02961_higher_order_constant_expressions +02961_read_bool_as_string_json +02961_sumMapFiltered_keepKey +02962_analyzer_const_in_count_distinct +02962_analyzer_constant_set +02962_analyzer_resolve_group_by_on_shards +02962_indexHint_rpn_construction +02962_join_using_bug_57894 +02962_max_joined_block_rows +02962_parallel_window_functions_different_partitioning +02963_invalid_identifier +02963_msan_agg_addBatchLookupTable8 +02963_single_value_destructor +02965_projection_with_partition_pruning +02966_float32_promotion +02966_nested_offsets_subcolumn +02967_fuzz_bad_cast +02967_index_hint_crash +02968_adaptive_async_insert_timeout +02968_analyzer_join_column_not_found +02968_full_sorting_join_fuzz # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +02968_projection_merge +02968_sumMap_with_nan +02969_analyzer_eliminate_injective_functions # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +02969_functions_to_subcolumns_if_null +02970_generate_series +02970_visible_width_behavior +02971_functions_to_subcolumns_map +02971_functions_to_subcolumns_variant +02972_insert_deduplication_token_hierarchical_inserts +02972_insert_deduplication_token_hierarchical_inserts_views +02972_to_string_nullable_timezone +02973_analyzer_join_use_nulls_column_not_found +02973_dictionary_table_exception_fix +02974_analyzer_array_join_subcolumn +02974_if_with_map +02975_intdiv_with_decimal +02977_csv_format_support_tuple +02981_nested_bad_types +02981_translate_fixedstring +02981_variant_type_function +02982_dont_infer_exponent_floats +02982_minmax_nan_null_order +02982_unambiguous_alter_commands +02983_empty_map +02983_empty_map_hasToken +02984_topk_empty_merge +02985_if_over_big_int_decimal +02985_minmax_index_aggregate_function +02986_leftpad_fixedstring +02987_group_array_intersect +02987_logical_optimizer_pass_lowcardinality +02988_join_using_prewhere_pushdown +02988_ordinary_database_warning +02989_group_by_tuple +02989_variant_comparison +02990_arrayFold_nullable_lc +02990_format_not_precedence +02990_optimize_uniq_to_count_alias +02990_parts_splitter_invalid_ranges +02990_variant_where_cond +02991_count_rewrite_analyzer +02992_all_columns_should_have_comment +02992_analyzer_group_by_const +02992_settings_overflow +02994_cosineDistanceNullable +02995_bad_formatting_union_intersect +02995_preliminary_filters_duplicated_columns +02995_preliminary_filters_duplicated_columns_SimpleAggregateFunction +02995_ulid_short_circuit +02996_analyzer_prewhere_projection +02996_index_compaction_counterexample +02996_nullable_arrayReduce +02997_fix_datetime64_scale_conversion +02997_projections_formatting +02998_analyzer_prewhere_report +02998_attach_partition_not_allowed_if_structure_differs_due_to_materialized_column +02998_operator_respect_nulls +02998_primary_key_skip_columns +02998_projection_after_attach_partition +02999_analyzer_preimage_null +02999_scalar_subqueries_bug_1 +02999_scalar_subqueries_bug_2 +02999_ulid_short_circuit +02999_variant_suspicious_types +03000_minmax_index_first +03000_too_big_max_execution_time_setting +03000_virtual_columns_in_prewhere +03001_analyzer_nullable_nothing +03001_block_offset_column +03001_block_offset_column_2 +03001_consider_lwd_when_merge +03001_data_version_column +03002_analyzer_prewhere +03002_int_div_decimal_with_date_bug +03002_map_array_functions_with_low_cardinality +03002_modify_query_cte +03002_sample_factor_where +03003_arrayEnumerate_crash +03003_compatibility_setting_bad_value +03003_count_asterisk_filter +03003_enum_and_string_compatible +03003_functions_to_subcolumns_final +03003_sql_json_nonsense +03004_force_null_for_omitted +03004_json_named_tuples_inference_ambiguous_paths_as_string +03005_nullif_index_pruning +03006_analyzer_executable_table_function +03006_buffer_overflow_join +03006_join_on_inequal_expression_2 +03006_join_on_inequal_expression_3 +03006_join_on_inequal_expression_4 +03006_join_on_inequal_expression_fast_1 +03006_join_on_inequal_expression_fast_2 +03006_mv_deduplication_throw_if_async_insert +03006_parallel_replicas_cte_explain_syntax_crash +03007_column_nullable_uninitialzed_value # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +03008_deduplication_cases_from_docs +03008_deduplication_wrong_mv +03008_filter_projections_non_deterministoc_functions +03008_groupSortedArray_field +03008_index_small +03008_optimize_equal_ranges +03008_uniq_exact_equal_ranges +03009_consecutive_keys_nullable +03009_range_dict_get_or_default +03009_storage_memory_circ_buffer_usage +03010_file_log_large_poll_batch_size +03010_read_system_parts_table_test +03010_sum_to_to_count_if_nullable +03010_view_prewhere_in +03010_virtual_memory_mappings_asynchronous_metrics +03011_adaptative_timeout_compatibility +03013_addDays_with_timezone +03013_fuzz_arrayPartialReverseSort +03013_group_by_use_nulls_with_materialize_and_analyzer +03013_ignore_drop_queries_probability +03013_position_const_start_pos +03013_repeat_with_nonnative_integers +03013_test_part_level_is_reset_attach_from_disk_mt +03014_analyzer_group_by_use_nulls +03014_analyzer_groupby_fuzz_60317 # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +03014_group_by_use_nulls_injective_functions_and_analyzer +03014_msan_parse_date_time +03015_aggregator_empty_data_multiple_blocks +03015_analyzer_groupby_fuzz_60772 +03015_peder1001 +03015_with_fill_invalid_expression +03016_analyzer_groupby_fuzz_59796 +03017_analyzer_groupby_fuzz_61600 +03018_analyzer_distributed_query_with_positional_arguments +03018_analyzer_greater_null +03022_alter_materialized_view_query_has_inner_table +03023_analyzer_optimize_group_by_function_keys_with_nulls +03023_group_by_use_nulls_analyzer_crashes # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +03023_remove_unused_column_distinct +03031_filter_float64_logical_error +03031_input_format_allow_errors_num_bad_escape_sequence +03031_low_cardinality_logical_error # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +03031_read_in_order_optimization_with_virtual_row +03031_tuple_elimination_analyzer +03032_multi_search_const_low_cardinality +03032_numbers_zeros +03032_redundant_equals +03032_save_bad_json_escape_sequences +03032_scalars_create_as_select +03032_storage_memory_modify_settings +03032_string_to_variant_cast +03032_variant_bool_number_not_suspicious +03033_analyzer_merge_engine_filter_push_down +03033_analyzer_parametrized_view_alias +03033_analyzer_resolve_from_parent_scope +03033_create_as_copies_comment +03033_cte_numbers_memory +03033_distinct_transform_const_columns +03033_final_undefined_last_mark +03033_from_unixtimestamp_joda_by_int64 +03033_index_definition_sql_udf_bug +03033_lightweight_deletes_sync +03033_parts_splitter_bug_and_index_loading +03033_recursive_cte_basic +03033_scalars_context_data_race +03033_set_index_in +03033_tupleIntXYZ_and_tupleModulo +03033_virtual_column_override +03033_with_fill_interpolate +03034_ddls_and_merges_with_unusual_maps +03034_json_extract_variant +03034_recursive_cte_tree +03034_recursive_cte_tree_fuzz_crash_fix +03034_recursive_cte_tree_merge_tree +03035_internal_functions_direct_call +03035_materialized_primary_key +03035_morton_encode_no_rows +03035_recursive_cte_postgres_1 +03036_clamp +03036_dynamic_read_subcolumns_small +03036_prewhere_lambda_function +03036_recursive_cte_postgres_2 +03036_with_numbers +03037_dot_product_overflow +03037_dynamic_merges_small +03037_precent_rank +03037_recursive_cte_postgres_3 +03037_union_view +03037_zero_step_in_numbers_table_function +03038_ambiguous_column +03038_move_partition_to_oneself_deadlock +03038_nested_dynamic_merges_small +03038_recursive_cte_postgres_4 +03039_recursive_cte_postgres_5 +03039_unknown_identifier_window_function +03040_alias_column_join +03040_array_sum_and_join +03040_dynamic_type_alters_2_compact_merge_tree +03040_dynamic_type_alters_2_wide_merge_tree +03040_recursive_cte_postgres_6 +03041_analyzer_gigachad_join +03041_recursive_cte_postgres_7 +03041_select_with_query_result +03042_analyzer_alias_join +03042_not_found_column_c1 +03043_group_array_result_is_expected +03044_analyzer_alias_join +03044_array_join_columns_in_nested_table +03045_analyzer_alias_join_with_if +03045_unknown_identifier_alias_substitution +03046_column_in_block_array_join +03047_analyzer_alias_join +03047_group_by_field_identified_aggregation +03047_on_fly_mutations_multiple_updates +03047_on_fly_mutations_non_deterministic +03047_on_fly_mutations_non_deterministic_replace +03047_on_fly_mutations_prewhere +03048_not_found_column_xxx_in_block +03049_analyzer_group_by_alias +03049_unknown_identifier_materialized_column # only=tcp: the test drops the current database; over HTTP each later request fails +03050_select_one_one_one +03051_many_ctes +03052_query_hash_includes_aliases +03053_analyzer_join_alias # only=tcp: the test drops the current database; over HTTP each later request fails +03054_analyzer_join_alias +03055_analyzer_subquery_group_array +03057_analyzer_subquery_alias_join +03058_analyzer_ambiguous_columns +03059_analyzer_join_engine_missing_column +03060_analyzer_regular_view_alias +03061_analyzer_alias_as_right_key_in_join +03063_analyzer_multi_join_wrong_table_specifier +03064_analyzer_named_subqueries +03065_analyzer_cross_join_and_array_join +03066_analyzer_global_with_statement +03067_analyzer_complex_alias_join +03069_analyzer_with_alias_in_array_join +03070_analyzer_CTE_scalar_as_numbers +03071_analyzer_array_join_forbid_non_existing_columns +03071_fix_short_circuit_logic +03072_analyzer_missing_columns_from_subquery +03073_analyzer_alias_as_column_name +03074_analyzer_alias_column_in_view +03075_analyzer_subquery_alias +03076_analyzer_multiple_joins_alias +03077_analyzer_multi_scalar_subquery_aliases +03078_analyzer_multi_scalar_subquery_aliases +03079_analyzer_numeric_literals_as_column_names +03080_analyzer_prefer_column_name_to_alias__virtual_columns +03081_analyzer_agg_func_CTE +03082_analyzer_left_join_correct_column +03084_analyzer_join_column_alias +03085_analyzer_alias_column_group_by +03086_analyzer_window_func_part_of_group_by +03087_analyzer_subquery_with_alias +03088_analyzer_ambiguous_column_multi_call # only=tcp: the test drops the current database; over HTTP each later request fails +03089_analyzer_alias_replacement +03090_analyzer_multiple_using_statements +03091_analyzer_same_table_name_in_different_databases # only=tcp: the test drops the current database; over HTTP each later request fails +03092_analyzer_same_table_name_in_different_databases # only=tcp: the test drops the current database; over HTTP each later request fails +03093_analyzer_column_alias +03093_analyzer_miel_test +03093_bug37909_query_does_not_finish +03093_filter_push_down_crash +03093_special_column_errors +03093_virtual_column_override_group_by +03093_with_fill_support_constant_expression +03094_analyzer_fiddle_multiif +03094_grouparraysorted_memory +03094_named_tuple_bug24607 +03094_transform_return_first +03095_join_filter_push_down_right_stream_filled +03095_merge_and_buffer_tables +03095_window_functions_qualify +03096_largest_triangle_3b_crash +03096_order_by_system_tables +03096_update_non_indexed_columns +03097_query_log_join_processes +03098_prefer_column_to_alias_subquery +03099_analyzer_multi_join +03100_analyzer_constants_in_multiif +03100_lwu_05_basics +03100_lwu_07_merge_patches +03100_lwu_07_merge_patches_v1 +03100_lwu_08_multiple_blocks +03100_lwu_18_sequence +03100_lwu_18_sequence_v1 +03100_lwu_19_nullable +03100_lwu_20_different_structure +03100_lwu_32_on_fly_filter +03100_lwu_33_add_column +03100_lwu_34_multistep_prewhere +03100_lwu_37_update_all_columns +03100_lwu_38_replacing +03100_lwu_44_missing_default +03100_lwu_45_query_condition_cache +03100_lwu_46_deletes_skip_indexes +03100_lwu_47_apply_patches_after_drop_column +03100_lwu_48_text_index +03100_lwu_49_update_skip_indexes +03100_lwu_50_subcolumn_skip_index +03100_lwu_51_condition_evaluated_once +03100_lwu_51_replace_partition_pending_patch +03100_lwu_53_apply_patches_rebuild_indexes +03100_lwu_56_mutation_clone_keeps_invalidated_columns +03100_lwu_58_patch_on_const_column +03100_lwu_58_patch_on_const_column_combined +03100_lwu_deletes_1 +03100_lwu_deletes_2 +03100_lwu_deletes_5_vertical_merge +03101_analyzer_identifiers_1 # only=tcp: the test drops the current database; over HTTP each later request fails +03101_analyzer_identifiers_3 +03101_analyzer_identifiers_4 # only=tcp: the test drops the current database; over HTTP each later request fails +03101_analyzer_invalid_join_on +03102_prefer_column_name_to_alias +03103_positional_arguments +03104_create_view_join +03105_table_aliases_in_mv +03107_ill_formed_select_in_materialized_view +03108_describe_union_all +03109_ast_too_big +03110_unicode_alias +03111_inner_join_group_by +03112_analyzer_not_found_column_in_block +03113_analyzer_not_found_column_in_block_2 +03114_analyzer_cte_with_join +03115_alias_exists_column +03116_analyzer_explicit_alias_as_column_name +03117_analyzer_same_column_name_as_func +03118_analyzer_multi_join_prewhere +03119_analyzer_window_function_in_CTE_alias +03120_analyzer_param_in_CTE_alias +03121_analyzer_filed_redefenition_in_subquery +03122_analyzer_collate_in_window_function +03125_analyzer_CTE_two_joins +03126_column_not_under_group_by +03127_system_unload_primary_key_table +03127_window_functions_uint16 +03128_merge_tree_index_lazy_load +03128_system_unload_primary_key +03129_cte_with_final +03129_low_cardinality_nullable_non_first_primary_key +03129_update_nested_materialized_column_check +03130_abs_in_key_condition_bug +03130_analyzer_array_join_prefer_column +03130_analyzer_self_join_group_by +03130_convert_outer_join_to_inner_join +03130_generateSnowflakeId +03131_deprecated_functions +03131_hilbert_coding +03131_rewrite_sum_if_nullable +03132_jit_sort_description_crash_fix # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +03132_rewrite_aggregate_function_with_if_implicit_cast +03132_sqlancer_union_all +03141_wildcard_grants +03142_alter_comment_parameterized_view +03142_untuple_crash +03142_window_function_limit_by +03143_cte_scope +03143_join_filter_push_down_filled_join_fix +03143_ttl_in_system_parts_columns_table +03143_window_functions_qualify_validation +03144_aggregate_states_with_different_types +03144_alter_column_and_read +03144_asof_join_ddb_doubles +03144_fuzz_quoted_type_name +03144_invalid_filter +03145_asof_join_ddb_inequalities +03146_bug47862 +03146_create_index_compatibility +03146_parameterized_view_with_date +03146_tpc_ds_grouping +03147_asof_join_ddb_missing +03147_datetime64_constant_index_analysis +03147_parquet_memory_tracking +03147_table_function_loop +03147_table_function_loop_remote_storage +03148_asof_join_ddb_subquery +03148_mutations_virtual_columns +03148_query_log_used_dictionaries +03149_analyzer_window_redefinition +03149_asof_join_ddb_timestamps +03149_variant_pop_back_typo +03150_grouping_sets_use_nulls_pushdown +03150_trace_log_add_build_id +03150_url_hash_non_constant_level +03151_analyzer_view_read_only_necessary_columns +03151_external_cross_join +03151_pmj_join_non_procssed_clash +03151_redundant_distinct_with_window +03152_analyzer_columns_list +03152_join_filter_push_down_equivalent_columns +03152_trailing_comma_in_columns_list_in_insert +03153_dynamic_type_empty +03153_trailing_comma_in_values_list_in_insert +03155_analyzer_interpolate +03155_datasketches_ubsan +03155_explain_current_transaction +03155_in_nested_subselects +03156_analyzer_array_join_distributed +03156_group_concat +03156_tuple_map_low_cardinality +03157_negative_positional_arguments_ubsan +03160_dynamic_type_agg +03161_cnf_reduction +03161_create_table_as_mv +03161_decimal_binary_math +03161_ipv4_ipv6_equality +03161_lightweight_delete_projection +03164_adapting_parquet_reader_output_size +03164_analyzer_global_in_alias +03164_analyzer_rewrite_aggregate_function_with_if +03164_analyzer_validate_tree_size +03164_early_constant_folding_analyzer +03164_format_readable_timedelta_intervals +03164_linestring_geometry +03164_materialize_skip_index +03164_materialize_skip_index_on_merge +03164_optimize_read_in_order_nullable +03164_orc_signedness +03165_distinct_with_window_func_crash +03165_order_by_duplicate +03165_parseReadableSize +03165_round_scale_as_column +03165_string_functions_with_token_text_indexes +03166_mv_prewhere_duplicating_name_bug +03166_optimize_row_order_during_insert +03166_skip_indexes_vertical_merge_1 +03166_skip_indexes_vertical_merge_2 +03167_base64_url_functions +03167_boom_filter_index_with_map +03167_fancy_quotes_off_by_one +03167_parametrized_view_with_cte +03168_cld2_tsan +03168_column_modification_time_packed_part +03168_fuzz_multiIf_short_circuit +03168_inconsistent_ast_formatting +03168_loop_engine_with_parallel_replicas +03169_cache_complex_dict_short_circuit_bug +03169_modify_column_data_loss +03169_optimize_injective_functions_inside_uniq_crash +03170_part_offset_as_table_column +03171_condition_pushdown +03171_direct_dict_short_circuit_bug +03171_function_to_subcolumns_fuzzer +03171_hashed_dictionary_short_circuit_bug_fix +03172_format_settings_clauses +03172_system_detached_tables_no_loop +03173_check_cyclic_dependencies_on_create_and_rename +03173_distinct_combinator_alignment +03173_forbid_qualify +03174_least_greatest_ignore_null_input_values +03174_merge_join_bug +03174_multiple_authentication_methods_show_create +03174_projection_deduplicate +03175_sparse_and_skip_index +03176_check_timeout_in_index_analysis +03195_group_concat_deserialization_fix +03196_max_intersections_arena_crash +03197_fix_parse_mysql_iso_date +03197_storage_join_strictness_type_restriction +03198_bit_shift_throws_error_for_out_of_bounds +03198_dictionary_validate_primary_key_type +03198_dynamic_read_subcolumns +03198_group_array_intersect +03198_h3_polygon_to_cells +03198_json_extract_more_types +03198_table_function_directory_path +03199_fix_auc_tie_handling +03199_has_lc_fixed_string +03199_join_with_materialized_column +03199_merge_filters_bug +03199_queries_with_new_analyzer +03200_memory_engine_alter_dynamic +03200_reverse_by_separator +03200_subcolumns_join_use_nulls +03201_analyzer_resolve_in_parent_scope +03201_sumIf_to_countIf_return_type +03202_dynamic_null_map_subcolumn +03202_enum_json_cast +03202_system_load_primary_key +03202_sz3_codec +03203_count_with_non_deterministic_function +03203_drop_detached_partition_all +03203_fill_missed_subcolumns +03203_optimize_disjunctions_chain_to_in +03203_system_numbers_limit_and_offset_complex +03203_system_numbers_limit_and_offset_simple +03203_variant_convert_field_to_type_bug +03204_distributed_with_scalar_subquery +03204_index_hint_fuzzer +03204_storage_join_optimize +03205_column_type_check # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +03205_hashing_empty_tuples +03205_json_syntax +03205_overlay +03205_parallel_replicas_alter_select_ubsan +03205_parallel_window_finctions_and_column_sparse_bug +03205_system_sync_replica_format +03206_projection_merge_special_mergetree +03206_projection_merge_special_mergetree_ignore +03207_composite_expressions_lambda_consistent_formatting +03208_datetime_cast_losing_precision +03208_groupArrayIntersect_serialization +03208_multiple_joins_with_storage_join +03208_numbers_total_rows_approx +03208_uniq_with_empty_tuple +03209_functions_json_msan_fuzzer_issue +03209_parameterized_view_with_non_literal_params +03210_convert_outer_join_to_inner_join_any_join +03210_empty_tuple_lhs_of_in +03210_fix_single_value_data_assertion # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +03210_lag_lead_inframe_types +03210_nested_short_circuit_functions_bug +03210_optimize_rewrite_aggregate_function_with_if_return_type_bug +03210_variant_with_aggregate_function_type +03212_optimize_with_constraints_logical_error +03213_array_element_msan +03213_deep_json +03213_denseRank_percentRank_alias +03213_rand_dos +03214_bitslice_argument_evaluation +03214_count_distinct_null_key_memory_leak +03214_join_on_tuple_comparison_elimination_bug +03215_analyzer_materialized_constants_bug +03215_analyzer_replace_with_dummy_tables +03215_fix_get_index_in_tuple +03215_key_condition_bug +03215_multilinestring_geometry +03215_parquet_index +03215_partition_in_tuple +03215_toStartOfWeek_with_dateTime64_fix +03215_udf_with_union +03215_validate_type_in_alter_add_modify_column +03215_varian_as_common_type_integers +03215_varian_as_common_type_tuple_map +03215_view_with_recursive +03216_arrayWithConstant_limits +03217_fliter_pushdown_no_keys +03217_json_merge_patch_stack_overflow +03217_primary_index_memory_leak +03218_materialize_msan +03221_create_if_not_exists_setting +03221_key_condition_bug +03221_merge_profile_events +03221_refreshable_matview_progress +03222_create_timeseries_table +03222_date_time_inference +03222_ignore_nulls_query_tree_elimination +03222_json_empty_as_default +03222_parallel_replicas_final_in_subquery +03223_analyzer_with_cube_fuzz +03223_interval_data_type_comparison +03223_nested_json_in_shared_data_merges +03224_arrayUnion +03224_json_merges_new_type_in_shared_data +03224_nested_json_merges_new_type_in_shared_data +03224_tuple_element_identifier +03225_const_prewhere_non_ataptive +03227_dynamic_subcolumns_enumerate_streams +03227_implicit_select +03227_json_invalid_regexp +03227_proper_parsing_of_cast_operator +03227_test_sample_n +03228_async_insert_query_params_bad_type +03228_dynamic_serializations_uninitialized_value +03228_dynamic_subcolumns_from_subquery +03228_join_to_rerange_right_table +03228_param_view_metadata_columns +03228_url_engine_response_headers +03229_query_condition_cache_bug83262 +03229_query_condition_cache_cte_constant_folding +03229_query_condition_cache_final +03229_query_condition_cache_folded_constants +03229_query_condition_cache_in_operator +03229_query_condition_cache_join_runtime_filter +03229_query_condition_cache_nondeterministic_functions +03229_query_condition_cache_on_fly_mutations +03229_query_condition_cache_profile_events +03229_query_condition_cache_recursive_cte +03229_query_condition_cache_sample +03229_query_condition_cache_tables_without_uuid +03230_anyHeavy_merge +03230_array_zip_unaligned +03230_date_trunc_and_to_start_of_interval_on_date32 +03230_show_create_query_identifier_quoting_style +03230_subcolumns_mv +03230_system_projections +03231_alter_no_properties_before_remove_modify_reset +03231_csv_dont_infer_bool_from_string +03231_dynamic_incomplete_type_insert_bug +03231_dynamic_variant_in_order_by_group_by +03231_prewhere_conditions_order +03231_values_respect_format_settings_in_fields_conversion +03232_workload_create_and_drop +03232_workloads_and_resources +03234_enable_secure_identifiers +03234_evaluate_constant_analyzer +03235_groupArray_string_consistency +03236_create_query_ttl_where +03236_squashing_high_memory +03236_test_zero_field_decimal +03237_create_table_select_as_with_recursive +03237_get_subcolumn_low_cardinality_column +03238_analyzer_unknown_function +03239_if_constant_folding +03239_nan_with_fill +03240_array_element_or_null +03240_array_element_or_null_for_map +03240_cte_in_subquery +03240_quantile_exact_weighted_interpolated +03241_orc_dictionary_encode +03241_view_block_structure +03242_view_block_structure +03243_array_join_lambda +03243_check_for_nullable_nothing_in_alter +03243_compatibility_setting_with_alias +03243_create_or_replace_view_dependency_check +03243_lower_utf8_msan +03243_to_start_of_interval_aliases +03244_skip_index_in_final_query_part_of_pk +03244_skip_index_in_final_query_with_pk_rescan_basic +03244_skip_index_in_final_query_with_pk_rescan_extremes +03244_skip_index_in_final_query_with_pk_rescan_no_final_mark +03244_skip_index_in_final_query_with_pk_rescan_pk_subset +03245_ripemd160 +03245_views_and_filter_push_down_bug +03246_alter_update_dynamic_hung +03246_join_on_asterisk +03246_json_subcolumn_correct_type +03246_json_tuple_decompress_race +03246_range_literal_replacement_works +03246_toStartOfInterval_date_timezone_bug +03247_generic_arrayMin_arrayMax_fixes +03247_json_extract_lc_nullable +03247_materialized_view_select_intersect +03247_object_column_copy +03248_invalid_where +03248_max_parts_to_move +03248_with_fill_string_crash +03248_with_insert +03249_dynamic_alter_consistency +03250_ephemeral_comment +03251_unaligned_window_function_state +03252_check_number_of_arguments_for_dynamic +03252_fill_missed_arrays +03252_highlight +03252_merge_tree_min_bytes_to_seek +03253_getMaxTableNameLength +03253_group_by_cube_too_many_keys +03254_last_2_samples_aggregate_function_simple +03254_merge_source_parts +03254_part_log_partition_column_is_set +03254_prewarm_mark_cache_columns +03254_project_lwd_respects_row_exists +03254_test_alter_user_no_changes +03254_timeseries_functions_various_arguments +03254_timeseries_group_array +03254_timeseries_range +03254_timeseries_to_grid_aggregate_function +03254_uniq_exact_two_level_negative_zero +03255_fix_sbstrings_logical_error +03256_invalid_mutation_query +03257_reverse_sorting_key_simple +03257_scalar_in_format_table_expression +03257_setting_tiers +03258_dynamic_in_functions_weak_ptr_exception +03258_multiple_array_joins +03258_old_analyzer_const_expr_bug +03258_quantile_exact_weighted_issue +03259_grouping_sets_aliases +03259_join_condition_executed_block_bug +03259_negate_key_overflow +03259_orc_date_out_of_range +03260_dynamic_low_cardinality_dict_bug +03261_any_respect_camelCase_aliases +03261_json_hints_types_check +03261_low_cardinality_nullable_to_dynamic_cast +03261_minmax_indices_by_default +03261_minmax_indices_by_default_table_copy +03261_optimize_rewrite_array_exists_to_has_crash +03261_sort_cursor_crash +03261_variant_permutation_bug +03262_analyzer_materialized_view_in_with_cte +03262_column_sizes_with_dynamic_structure +03262_common_expression_optimization +03262_const_adaptive_index_granularity +03262_filter_push_down_view +03262_system_functions_should_not_fill_query_log_functions +03263_analyzer_materialized_view_cte_nested +03263_forbid_materialize_sort_key +03263_parquet_write_bloom_filter +03266_lowcardinality_string_monotonicity +03266_with_fill_staleness_cases +03266_with_fill_staleness_errors +03267_join_swap_bug +03267_materialized_view_keeps_security_context +03268_empty_tuple_update +03268_system_parts_index_granularity +03269_partition_key_not_in_set +03270_empty_tuple_in_array_intersect +03270_fix_column_modifier_write_order +03270_max_bytes_ratio_before_external_group_by +03271_date_to_datetime_saturation +03271_decimal_monotonic_day_of_week +03271_dynamic_variant_in_min_max +03271_max_bytes_ratio_before_external_order_by +03271_sqllancer_having_issue +03272_arrayAUCPR +03272_bad_aggregate_function +03272_bitmapTransform_error_counter +03272_partition_pruning_monotonic_func_bug +03272_prewarm_mark_cache_add_column +03273_better_json_subcolumns_parsing +03273_group_by_in_order_still_used_when_group_by_key_doesnt_match_order_by_key +03273_primary_index_cache +03273_primary_index_cache_low_cardinality +03273_select_from_explain_ast_non_select +03274_aliases_in_udf +03274_dynamic_column_data_race_with_concurrent_hj +03274_dynamic_column_sizes_vertical_merge +03274_grace_hash_max_joined_block_size_rows_bug +03274_philipzucker +03274_squashing_transform_sparse_bug +03274_with_fill_dup_sort_bug +03275_block_number_mutation +03275_block_number_update +03275_count_digits_argument_evaluation +03275_matview_with_union +03275_subcolumns_in_primary_key +03275_subcolumns_in_primary_key_bug +03276_empty_variant_type +03276_functions_to_subcolumns_lc +03276_index_empty_part +03276_index_of_assume_sorted +03276_merge_tree_index_lazy_load +03276_parquet_output_compression_level +03276_subcolumns_in_skipping_indexes +03277_dead_letter_queue_unsupported +03277_join_adaptive_spill +03277_join_adaptive_spill_oom +03277_logging_elapsed_ns +03278_dateTime64_in_dateTime64_bug +03278_enum_in_unknown_value +03278_enum_string_functions +03279_array_normalized_gini +03279_join_choose_build_table +03279_join_choose_build_table_auto_statistics +03279_join_choose_build_table_statistics +03279_subcolumns_in_primary_key_select_final +03280_aliases_for_selects_and_views +03280_dynamic_if_null +03281_dynamic_coalesce +03282_block_number_otehr_mutations +03282_dynamic_in_functions_convert +03282_materialized_views_ignore_errors +03282_parallel_join_with_additional_filter +03284_json_object_as_tuple_duplicate_keys +03285_analyzer_array_join_nested +03285_analyzer_extract_common_expr_bug +03285_analyzer_optimize_disjunctions +03285_default_engine_with_settings +03285_materialize_ttl_only_drop_parts +03286_backup_to_memory +03286_backup_to_null +03286_collation_locale_with_modifier +03286_format_datetime_timezones +03286_reverse_sorting_key_final2 +03286_serialization_hint_system_columns +03287_dynamic_and_json_squashing_fix +03287_format_datetime_mysqlfraction +03287_not_comparable_types_in_order_by_and_comparison_functions +03289_tuple_element_to_subcolumn +03290_alter_mv_dependency_check +03290_dictionary_assert_on_function +03290_final_collapsing +03290_final_replacing +03290_final_sample +03290_force_normal_projection +03290_formatReadable_other_numeric_types +03290_limit_by_segv +03290_mix_engine_and_query_settings +03290_partial_arrayROCAUC_and_arrayAUCPR +03290_pr_non_replicated_in_subquery +03291_collapsing_invalid_sign +03291_json_big_structure_deserialization +03291_low_cardinality_uuid +03292_format_tty_friendly +03296_bfloat16_ubsan +03298_analyzer_group_by_all_fix +03299_deep_nested_map_creation +03299_map_named_tuple +03300_generate_random_const_expr_params +03300_msan_nullable_serialized_aggregation +03301_is_ipv4_string +03301_subcolumns_in_mv +03302_analyzer_distributed_filter_push_down +03302_analyzer_join_filter_push_down_bug +03302_any_enum_aggregation +03302_merge_table_structure_unification +03303_alias_inverse_order +03303_dynamic_in_not_xor +03304_compare_substrings +03304_fill_virtual_columns +03305_compressed_memory_eng_crash_reading_subcolumn +03305_fix_kafka_table_with_kw_arguments +03305_log_unsupported_types +03305_parallel_with +03306_materialized_vew_prewhere_supported_columns +03306_optimize_table_force_keyword +03307_forbid_loop_table_function_as_engine +03307_parallel_hash_max_joined_rows +03310_aggregate_projection_count_nullable +03310_create_database_with_settings +03310_index_hints_read_columns +03310_materialized_view_with_bad_select +03311_issue_72265 +03311_min_max_count_projection_with_constant_partition_expr +03312_analyzer_unused_projection_fix +03312_explain_syntax_analyzer +03312_issue_74299 +03312_sparse_column_tuple +03312_squashing_with_low_card_mem_usage +03312_system_errors_last_error +03313_case_insensitive_json_type_declaration +03313_h3togeo_result_order +03313_unique_key_mutation_guard +03314_analyzer_resolve_in_parent_scope +03314_analyzer_resolve_in_parent_scope_2 +03314_analyzer_resolve_in_parent_scope_3 +03314_analyzer_resolve_in_parent_scope_4 +03314_analyzer_resolve_in_parent_scope_5 +03314_divide_decimal_short_circuit +03314_empty_tuple_in_protobuf_format +03314_grace_hash_join_buckets +03314_has_column_in_table_alias_column +03314_nullable_key_no_optimize_functions_to_subcolumns +03314_summing_merge_tree_final_not_found_column_in_block +03314_variant_rowbinary_file +03315_analyzer_correlated_subqueries +03315_array_join_scalar +03315_join_on_optimize_pass_alias +03315_quantile_bfloat16_ubsan +03315_trim_two_args +03316_analyzer_unique_table_aliases_dist +03317_index_hint_prewhere +03318_ubsan_resample_arguments_count +03319_concurrent_hash_join_double_preallocation_bug +03321_functions_to_subcolumns_skip_index +03321_inner_materialized_view_nested +03321_join_on_is_null_lowcardinality +03321_system_tables_parametrized_view_params +03322_bugfix_of_with_insert +03322_materialized_view_ignore_errors_url +03322_unused_interpolate_expressions +03322_view_over_parameterized_view +03323_bfloat16_least_supertype +03323_union_all_constants_bug +03324_aggregating_merge_tree_final_extremes # only=tcp: no extremes in the HTTP RowBinary output +03324_union_block_structure_mismatch +03325_alter_ast_format +03325_alter_modify_projection_primary_key_column +03325_count_summing_merge_tree_order_by_tuple +03326_parallel_replicas_out_of_range +03327_alias_column_constant +03328_formatting_assignment_expression +03328_normalized_query_hash +03334_aliases_function_infinite_loop +03340_transform_logical_error_fix +03350_json_parsing_quickly +03352_distinct_sorted_bug +03352_lazy_column_filter_by_uint8 +03353_codec_zstd_doubledelta_data_corruption +03354_translate_crap +03355_array_join_subcolumns +03355_issue_31183 +03355_issue_32743 +03355_join_to_in_optimization +03355_mergetree_table_disk +03356_analyzer_qualified_matcher_error +03356_analyzer_unused_scalar_subquery +03356_array_join_subcolumns_indexes +03356_postgresql_mysql_endpoint_parsing +03356_tables_with_binary_identifiers_invalid_utf8 +03356_threshold_for_parallel_hash +03357_analyzer_insert_view +03357_arraySymmetricDifference +03357_block_structure_union_step +03357_check_contraints_null_syntax +03357_jit_strikes_again +03357_recursive_cte_no_logical_error +03357_storage_join_mv_context +03357_with_cube_with_totals_assertion +03358_block_structure_match +03358_lambda_resolution_segfault_analyzer +03359_analyzer_rewrite_view_query +03359_point_in_polygon_index +03360_any_join_parallel_hash_bug +03360_bool_remote +03362_default_profiles_context +03362_filter_transform_profile_events +03362_join_on_filterpushdown +03362_join_where_false_76670 +03362_optimize_using_constraints_type_mismatch +03362_reverse_sorting_key_explicit_primary_key +03363_constant_nullable_key +03363_estimate_compression_bug91415 +03363_estimate_compression_ratio_validation +03363_function_keccak256 +03363_join_multiple_swap +03363_qbit_create_insert_select +03364_gorilla_codec_parameters +03364_qbit_negative +03364_s3_globbed_path_in_bucket_portion +03364_ttl_should_recalculate_minmax_index +03365_csv_time_deserialization_bug +03365_dynamic_column_datetime +03365_finish_sorting_crash +03365_if_time_time64 +03365_qbit_casts_as_from_array +03365_read_negative_time_implicitly +03365_time64_casts +03365_time_implicit_conversion +03365_time_in_json +03365_time_parsing_msan_issue +03365_time_prewhere_supertype_bug +03365_time_time64_aggregate_functions +03365_time_time64_as_primary_key +03365_time_time64_best_effort_parsing +03365_time_time64_cap_max_time +03365_time_time64_comparison +03365_time_time64_conversions +03365_time_time64_insertion_bug +03365_time_time64_supertype +03365_time_time64_without_timezone +03365_time_to_time64_conv_bug +03365_use_legacy_to_time +03365_variant_bool_parsing +03366_bfloat16_sorting +03366_qbit_array_map_populate +03366_with_fill_dag +03367_bfloat16_tuple_final +03367_l2_distance_transposed_1 +03367_l2_distance_transposed_2 +03368_bfloat16_merge_join +03368_qbit_subcolumns +03369_bfloat16_map +03369_function_arrayLevenshtein +03369_l2_distance_transposed_variadic +03369_predicate_pushdown_enforce_literal_type +03369_values_template_types_mismatch +03369_variant_escape_filename_merge_tree +03370_join_identifiers +03370_l2_distance_transposed_negative +03370_remove_redundant_sorting_assert +03370_rocks_db_engine_subcolumn_in_pk +03371_bfloat16_special_values +03371_nullable_tuple_string_comparison +03372_get_subcolumn_null +03372_qbit_mergetree_1 +03372_qbit_mergetree_2 +03373_qbit_dynamic +03374_date_trunc_with_negatives +03374_indexes_with_literals +03374_indexes_with_trivial_cast +03374_qbit_nullable +03375_bloom_filter_array_equals +03375_bloom_filter_has_hasAny_const_array +03375_bloom_filter_ngram_has_hasAny_const_array +03375_bloom_filter_token_has_hasAny_const_array +03375_bool_partition +03375_l2_distance_transposed_partial_reads_pass +03376_forbid_nan_inf_for_float_settings +03376_iceberg_truncate +03376_l2_distance_transposed_type_mismatch +03377_json_order_by_bug +03377_qbit_parameters +03378_cosine_distance_transposed +03379_qbit_equality +03380_accurate_cast_or_null_qbit +03380_in_tuple_subquery_column_count +03381_query_result_cache_cte_subqueries +03381_query_result_cache_eligible_queries +03381_query_result_cache_explicit_optin +03381_query_result_cache_in_where_subqueries +03381_query_result_cache_join_subqueries +03381_query_result_cache_nested_subqueries +03381_query_result_cache_scalar_subqueries +03381_query_result_cache_subqueries_exceptions_handling +03381_query_result_cache_subqueries_non_deterministic +03381_query_result_cache_subqueries_settings +03381_query_result_cache_subqueries_with_aliases +03381_query_result_cache_subquery_min_runs +03381_query_result_cache_subquery_settings_propagation +03381_query_result_cache_table_subqueries +03381_query_result_cache_union_subqueries +03389_regexp_rewrite_nullable_group_by +03390_non_constant_case +03391_logical_error_sort_column +03392_crash_group_by_use_nulls +03392_inconsistent_formatting_of_lambda +03393_ASTTableIdentifier_fuzzer +03393_join_bug_77848 +03393_max_read_buffer_size_non_zero +03393_non_constant_second_argument_for_in +03393_smallest_index_floating_point +03393_validate_storage_buffer_args +03394_fix_to_start_of_interval_for_zero_origin_argument +03394_naive_bayes_classifier_negative +03395_global_join_supported_kind +03397_information_schema_tables_index_length +03398_group_array_zero_max_elements +03399_analyzer_correlated_subquery +03399_decimal_to_interval_error +03399_divide_zero_or_null +03399_lc_nullable_mapfromarrays +03399_mapContains_functions +03399_sparse_grams +03400_alter_update_with_rename +03400_analyzer_correlated_subquery_unused_column +03400_auto_minmax_final_sign_bug +03400_datetime64_key_condition_with_number +03400_explain_distributed_bug +03400_get_server_setting +03401_get_merge_tree_setting +03401_normal_projection_with_part_offset +03401_normal_projection_with_part_offset_no_sorting +03401_remote_bool +03402_adding_projection_to_temporary_table +03402_concurrent_right_full_join +03402_cyclic_alter_dependencies +03402_has_low_cardinality_key_condition +03402_materialized_tuple_element +03402_secondary_indexes_analyzer_bugs +03403_chinese_tokens +03403_function_tokens +03403_function_tokens_for_like_pattern +03403_truncate_all_tables_like +03404_bfloat16_insert_values +03404_geotoh3_input_order +03404_json_tables +03404_tokens_bug93207 +03404_ubsan_distinct_join_const_column +03405_bool_array_to_fixed_strings +03405_join_using_alias_constant +03405_json_parsing_error_bug +03405_merge_filter_into_join +03405_naive_bayes_classifier_token +03405_non_zero_batch_mode +03405_ssd_cache_incorrect_min_max_lifetimes_and_block_size +03406_dictionary_incorrect_min_max_lifetimes +03406_reservoir_sample_self_merging +03407_csv_bad_date_time_parsing +03408_analyzer_correlated_subquery_simple +03408_cte_self_reference +03408_hash_functions_on_null +03408_implicit_table +03409_coalescing_merge_tree +03409_variant_type_values_format_field_conversion +03410_polygons_intersects +03411_analyzer_scalar_correlated_subquery +03411_iceberg_bucket +03411_summing_merge_tree_dynamic_values +03411_variant_basic_discriminators_deserialization_bug +03412_analyzer_correlated_subquery_bug +03412_merge_final_prewhere +03413_analyzer_correlated_subqueries_bug_2 +03413_dynamic_in_in +03413_experimental_settings_cannot_be_enabled_by_default +03414_analyzer_correlated_subqueries_in_function +03414_formatDateTime_compound_formatter_after_varsize_formatter +03435_json_has +03441_deltalake_clickhouse_public_datasets +03441_deltalake_clickhouse_virtual_columns +03442_detach_view # only=tcp: the test drops the current database; over HTTP each later request fails +03442_lightweight_deletes_on_fly +03442_string_bytes_functions +03443_alias_with_asterisk +03443_index_match_alternatives +03443_part_starting_offset +03443_projection_sparse +03444_analyzer_resolve_alias_columns +03444_drop_replica_empty_zkpath +03444_explain_asterisk +03444_lm_block_mismatch +03447_analyzer_correlated_subqueries_tpc_h +03447_float_nan_order +03447_function_reverse_for_tuple +03447_grouping_sets_analyzer_const_columns +03447_storage_join_unsupported_keys +03447_window_functions_distinct +03448_analyzer_array_join_alias_in_join_using_bug +03448_analyzer_correlated_subquery_in_projection +03448_analyzer_skip_index_and_lambdas +03448_in_select_tuple +03448_topk_merging +03449_join_using_allow_alias +03449_window_cannot_find_column +03450_parameterized_view_forward +03451_parameterized_views_without_alias +03453_group_by_all_grouping +03453_parameterized_view_array_of_points +03454_parameterized_view_constant_identifier +03454_parameterized_views_null +03456_match_index_prefix_extraction +03456_wide_integer_cross_platform_consistency +03457_bitmapContains_nullable +03457_bug79403_marks_compress_block_is_zero +03457_inconsistent_formatting_except +03457_move_global_in_to_prewhere +03457_numeric_indexed_vector_build +03457_wide_integer_double_conversion_edge_cases +03458_numeric_indexed_vector_operations_bit_promote +03458_numeric_indexed_vector_operations_i8f64 +03458_numeric_indexed_vector_operations_u16f64 +03458_numeric_indexed_vector_operations_u32f32 +03458_numeric_indexed_vector_operations_u32f64 +03458_numeric_indexed_vector_operations_u32i16 +03458_numeric_indexed_vector_operations_u32i32 +03458_numeric_indexed_vector_operations_u32i64 +03458_numeric_indexed_vector_operations_u32i8 +03458_numeric_indexed_vector_operations_u32u16 +03458_numeric_indexed_vector_operations_u32u32 +03458_numeric_indexed_vector_operations_u32u64 +03458_numeric_indexed_vector_operations_u32u8 +03458_wkb_function +03459-reverse-sorting-key-stable-result +03459_join_cannot_add_column +03459_numeric_indexed_vector_decode +03459_socket_asynchronous_metrics +03460_normal_projection_index +03460_normal_projection_index_bug_race_conditions +03460_numeric_indexed_vector_to_value_map +03460_projection_part_filtering_and_introspection +03461_numeric_indexed_vector_chain +03461_pk_prefix_trivial_count +03461_projection_index_multi_part +03461_string_to_date_time_cast_modes +03462_numeric_indexed_vector_serialization +03463_numeric_indexed_vector_overflow +03471_sum_map_bool_state_version_0 +03500_row_policy_storage_merge_bare_column +03505_fixed_string_try_parse_rollback +03509_stripe_log_compatible_types +03511_formatDateTime_e_space_padding +03512_bech32_functions +03512_join_using_parent_scope_matcher +03512_settings_max_block_size +03513_filter_push_down_rand_bug +03513_lazy_materialization_projections_fix +03513_nullsafe_join_storage +03513_read_in_order_nullable +03513_simple_aggregate_function_any_respect_nulls_in_aggregating_merge_tree +03513_simple_aggregate_function_any_respect_nulls_in_summing_merge_tree +03514_grace_hash_join_logical_error +03515_array_join_different_sizes +03516_comparison_pk_bug +03516_int_exp2_join +03517_logical_join_predicate_push_down_with_pre_expression_bug +03517_wrong_primary_key_analysis +03518_bad_sql_udf +03518_left_to_cross_incorrect +03518_table_function_remote_no_replicas +03519_analyzer_tuple_cast +03519_cte_allow_push_predicate_ast_for_distributed_subqueries_bug +03519_fulter_push_down_duplicate_column_name_bug +03519_left_to_cross_incorrect +03519_merge_engine_read_column_existing_in_subset_of_tables +03519_merge_tree_part_info_coverage +03519_merge_tree_part_info_unpack +03519_multiple_join_using +03519_zero_filesystem_prefetch_max_memory_usage +03520_analyzer_distributed_in_cte_bug +03520_left_to_cross_incorrect +03521_bitNot_String_NUL_terminated +03521_long_partition_column_name +03521_long_statistics_name +03521_system_unicode +03521_tuple_of_dynamic_with_string_comparison +03522_alter_modify_column_and_materialize_projection +03522_analyzer_check_correlated_columns +03522_function_first_non_default +03522_join_resolve_matcher_recursive_bug +03522_nullable_partition_key +03522_window_table_arg +03523_function_first_non_default_number_args +03524_nullable_extremes # only=tcp: no extremes in the HTTP RowBinary output +03524_sign_argument # only=tcp: the test drops the current database; over HTTP each later request fails +03525_timezoneof_illegal_type +03525_transform_null_in_subqeury_with_not_nullable_type +03526_columns_substreams_in_wide_parts +03530_insert_into_distributed_different_types_sparseness +03532_divideOrNull_jit_crash +03532_dynamic_column_inside_map_rollback +03532_redis_empty_variant_key +03533_analyzer_correlated_column_check +03533_named_tuple_supertype +03533_skip_index_on_data_reading +03533_xirr +03534_npy_output_to_url +03534_skip_index_bug89691 +03538_analyzer_correlated_query_collect_columns_fix +03538_analyzer_filter_analysis_alias_columns +03538_analyzer_scalar_correlated_subquery_fix +03538_array_except +03538_higher_order_functions_null_filter +03538_optimize_rewrite_regexp_functions +03538_validate_setting_merge_max_block_size +03540_date_trunc_old_behaviour +03541_table_without_insertable_columns +03542_TTL_dict +03545_analyzer_correlated_subqueries_use_equivalence_classes +03545_analyzer_correlated_subqueries_use_equivalence_classes_2 +03545_analyzer_correlated_subquery_exists_asterisk +03545_array_join_index_set_bug +03545_map_contains_bloom_index_bug +03545_number_of_rows_in_ttltransform +03545_union_allow_column_with_no_common_type +03546_03545_analyzer_correlated_subquery_exists_asterisk_crash +03546_join_key_value_storage_with_casted_key +03546_leftover_dependencies # only=tcp: the test drops the current database; over HTTP each later request fails +03546_merge_tree_projection_shared_snapshot +03546_multiple_join_use_nulls_matcher +03546_part_granule_offset +03547_analyzer_correlated_columns_check_bug +03547_analyzer_correlated_subqueries +03547_equals_optimizer_lowcardinality +03547_reinterpret_to_array +03548_analyzer_indentifier_resolution_invariant +03548_optimize_syntax_fuse_functions_clash +03549_aggregate_arithmetic_logical_error +03549_conv_function +03549_system_dimensional_metrics +03549_window_collation +03549_wkb_function +03550_analyzer_remote_view_columns +03550_projection_with_part_offset_ttl +03550_s3queue_no_settings +03550_union_intersect_except_default_mode_rewrite_exception_safety +03551_cast_decimal_to_float +03551_no_alter_for_columns_to_sum +03552_inconsistent_formatting_operator_as_table_function +03553_inconsistent_formatting_of_dictionary +03555_inconsistent_formatting_ttl +03557_parasitic_cse_in_formatter +03558_no_alias_in_single_expressions +03559_explain_ast_in_subquery +03560_low_cardinality_keys_filter +03560_new_analyzer_default_expression +03560_parallel_replicas_external_aggregation +03560_validate_max_insert_block_size +03561_analyzer_cte_cycle_resolve_bug +03561_colorSRGBToOKLCH +03561_two_mvs_bad_select +03562_colorOKLCHToSRGB +03562_geometry_type +03562_json_date_as_integer +03562_parallel_replicas_subquery_has_final +03562_short_circuit_for_and_or +03563_coarser_minmax_indexes_first +03565_clickhouse_smaller_indexes_first +03565_union_all_nullptr +03566_analyzer_single_with_scope +03566_inconsistent_formatting_functions_codecs +03566_low_cardinality_nan_unique +03566_one_row_summing_merge_tree +03567_analyzer_single_with_scope_cycle +03567_finalize_write_buffer_valid_utf8 +03567_join_using_projection_distributed +03567_json_extract_case_insensitive_edge_cases +03567_nowInBlock64 +03568_ddsketch_merge +03568_json_extract_case_insensitive +03568_mutation_affected_rows_counter +03569_max_joined_block_size_rows_bug +03570_dateTimeToUUIDv7 +03570_date_to_datetime64_overflow +03570_limit_by_all +03571_join_inequality_constants +03571_trying_to_get_name_of_not_a_column_asterisk +03572_empty_tuple_in_nested_type +03572_planner_merge_filter_into_join_bug +03573_concurrent_hash_scatter_bug +03573_create_query_parameters_in_to_in_materialized_view +03573_join_storage_not_change_kind +03573_linear_regression_timeseries_functions_various_arguments +03573_planner_merge_filter_into_join_bug_2 +03574_analyzer_merge_filter_into_join_bug +03574_parallel_replicas_last_right_join +03575_analyzer_merge_filter_into_join_bug_2 +03575_modify_column_null_to_default +03575_modify_column_null_to_default_cross_type +03576_analyzer_recursive_window +03577_server_constant_folding +03577_temporary_table_as +03577_ub_max_column_in_block_size_bytes +03577_vairant_lazy_materialization_bug +03578_parallel_replicas_formatting_tuple +03578_ttl_column_in_order_by_validation +03579_mergeTreeIndex_params +03579_multi_if_short_circuit +03579_system_columns_column_alias +03580_external_merge_sort_with_lazy_columns +03580_heredoc_ambiguity +03580_improve_prewhere +03580_join_runtime_filter_column_type +03580_join_runtime_filter_prewhere +03580_join_runtime_filter_pushdown +03581_bool_literal_column_name +03581_read_in_order_use_virtual_row_WHERE +03582_initcap_fixedstring +03582_normalize_utf8_empty +03583_rewrite_in_to_join +03588_multiple_root_workloads +03591_optimize_prewhere_row_policy +03592_dictionary_columns_trailing_comma +03593_allow_projection_with_parent_part_offset +03593_any_join_swap_tables +03593_backup_with_broken_projection +03593_remote_map_in +03594_alias_subcolumns +03594_coalescing_merge_tree_segfault +03594_constraint_subqery_logical_error +03594_is_valid_ascii +03594_is_valid_ascii_errors +03594_json_extract_decimal_precision +03594_like_perfect_affix_rewrite_pass +03594_push_more_filters_down_joins +03594_system_grants_parameters +03595_alter_drop_column_comment_if_exists +03595_alter_if_exists_mixed_commands +03595_alter_if_exists_runtime_check +03595_analyzer_lateral_join +03595_changes_timeseries_functions_various_arguments +03595_convert_any_join_to_semi_or_anti +03595_exists_as_scalar_subquery +03595_pread_threadpool_direct_io +03596_parquet_prewhere_page_skip_bug +03597_alter_column_with_subcolumn_in_key +03599_bad_date_and_datetimes_inference +03599_lightweight_delete_vertical_merge +03600_analyzer_setting_bool +03600_default_nullable_query_parameters +03600_replace_fixed_string_bug +03601_histogram_quantile +03601_inconsistent_table_names +03601_insert_squashing_remove_const +03601_replace_regex_fixedstring_empty_needle +03601_temporary_views +03602_alter_update_nullable_json +03602_embeddedrock_path +03602_query_system_tables_definer +03603_getSubcolumnType_msan +03603_ip_binary_operators +03604_and_join_use_nulls_bug_83977 +03604_dynamic_key_in_join +03604_functions_to_subcolumns_outer_join +03604_join_reorder_pinned_bug +03604_key_condition_set_tuple_bug +03604_parallel_with_query_lock +03604_plan_step_description_limit +03604_string_with_size_stream +03604_test_merge_tree_min_read_task_size_is_zero +03605_dynamic_to_nullable_low_cardinality_bug +03610_disjunctions_pushdown_optimization +03610_remote_queries_with_describe_compact_output +03611_cte_deterministic +03611_null_safe_comparison # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +03611_point_in_polygon_key_condition_bug +03611_uniqExact_bug # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +03611_window_definition_parsing +03612_explain_indexes_bugs +03613_empty_tuple_permute_with_limit +03620_analyzer_distributed_global_in +03620_json_advanced_shared_data_seek_bug +03620_mergeTreeAnalyzeIndexes +03620_mergeTreeAnalyzeIndexes_columns +03620_mergeTreeAnalyzeIndexes_regressions +03620_mergeTreeAnalyzeIndexes_sets +03620_mergeTreeAnalyzeIndexes_skip_indexes +03622_distributed_index_analysis_fallback_to_localhost +03622_generic_aggregate_functions__state_compatibility +03622_ttl_infos_where +03623_convert_any_join_to_semi_or_anti_2 +03623_datetime64_preepoch_fractional_precision +03623_lazy_materialization_array_sizes_bug +03623_parquet_bool +03623_setting_boolean_shorthand_err_test +03624_csv_empty_array_from_empty_string +03624_parquet_row_number +03624_pr_lefl_right_joins_chain +03624_resource_exhaustion_window_function +03625_auto_statistics +03625_auto_statistics_alter +03625_auto_statistics_validation +03625_case_without_condition_non_constant_branches +03625_prewhere-and-default-bug +03625_upper_lower_utf8_different_number_of_code_points +03626_case_function_with_dynamic_argument +03627_non_constant_replacement_in_replace_regexp +03628_named_tuple_element_in_order_by_key +03628_parse_date_time_short_circuit +03629_duplicate_partition_keys_crash +03629_starts_endswith_caseinsensitive +03630_any_join_to_semi_storage_join_guard +03630_hash_join_max_block_size +03630_join_blocks_with_different_constness +03630_parquet_bool_bug +03631_array_of_empty_tuples +03631_select_replace_comprehensive +03632_default_minmax_indices_alter +03632_join_logical_assert_85403 +03632_lowcard_join +03632_temporary_table_not_allowed_columns +03633_negative_limit_offset +03633_set_index_bulk_filtering +03635_in_function_different_types_many_columns +03636_empty_projection_block +03636_index_analysis_with_session_tz +03636_storage_alias_row_policy +03636_storage_alias_syntax +03638_merge_max_dynamic_subcolumns_in_compact_part +03638_merge_max_dynamic_subcolumns_in_wide_part +03639_hash_of_dynamic_column +03640_skip_indexes_data_types_with_or +03640_skip_indexes_with_or +03640_skip_indexes_with_or_and_not +03640_variant_array_null_map_subcolumn +03641_analyzer_issue_85834 +03641_group_by_injective_functoon_bad_arguments +03642_column_ttl_sparse +03642_system_instrument_symbols +03643_paste_join_disable_filter_pushdown +03643_system_instrumentation_no_suspicious_lowcardinality +03644_explain_indices +03644_join_order_mixed_comma_and_left +03644_min_level_for_wide_part +03646_array_join_empty +03647_morton_encode_empty_tuple +03651_merge_tree_compact_read_string_size_subcolumn +03651_positional_argument_agg_projection +03652_explain_input_header +03652_join_using_legacy_step +03652_union_columns_2 +03653_fractional_limit_offset +03653_updating_minmax_idx_after_mutation +03654_case_non_constant_null +03654_grouping_sets_any_min_max +03656_nan_comparison +03657_gby_overflow_any_sparse +03657_hash_vs_full_sorting_merge_join +03657_rollup_constant +03658_joined_block_split_single_row_bytes +03660_udf_subquery +03663_parameterized_views_formatting_of_substitutions_excessive_backticks +03664_parameterized_view_restart +03666_count_matches_complexity +03667_accurate_cast_datetime_overflow +03667_drop_inner_table_size_limits +03667_insert_columns_description +03667_pr_join_with_cross_join_on_left +03668_shard_join_in_reverse_order +03669_min_max_projection_with_reverse_order_key +03670_aggregate_projection_in_view +03671_dict_in_subquery_in_index_analysis_context_expired +03671_pk_in_subquery_context_expired +03672_columns_same_as_subcolumns +03672_nested_array_nested_tuple +03680_mergetree_shrink_const_from_prewhere +03681_lazy_materialization_with_read_in_order +03690_parameterized_view_array_subquery_param +03699_reverse_utf8 +03701_analyzer_correlated_subquery_plan_reference +03701_column_ttl_fully_expired +03701_create_or_replace_temporary_table +03701_distinct_but_no_group_by_projection_table_use_check +03701_optimize_inverse_dictionary_lookup_basic +03701_replicated_column_short_circuit_filter +03701_temporary_files_buffer_size +03702_alter_codec_index +03702_alter_codec_pk +03702_alter_column_modify_secondary_index_general +03702_alter_column_update_and_delete_secondary_index_general +03702_encode_decode_memory_usage +03702_geometry_functions +03702_inject_random_orderby_doesnt_change_limit +03702_optimize_inverse_dictionary_lookup_composite_and_layouts +03703_distinct_projection_type_mismatch +03703_function_dict_get_keys_large +03703_optimize_inverse_dictionary_lookup_dictget_family +03703_prelimit_explain_message +03703_primary_key_condition_boolean_column +03703_statistics_low_cardinality +03704_default_empty_order_by +03704_fractional_limit_with_ties +03704_function_dict_get_keys_cache_type +03705_count_if_asterisk +03705_fix_compression_T64_unaligned +03705_function_dict_get_keys_multiple_dict_and_no_caching +03707_analyzer_convert_outer_any_to_inner +03707_empty_parts_with_non_empty_projections_merge +03707_function_array_remove +03707_join_duplicate_columns +03707_set_index_bad_get_null_bug +03707_statistics_cache +03708_analyzer_convert_any_outer_to_inner_2 +03708_exact_rows_before_limit_in +03708_flush_async_insert_queue_for_table +03708_join_or_to_right_any_bug +03708_join_to_in_output_header +03708_low_cardinality_aggregate_state_compatibility +03708_statistics_estimator_cast_type +03709_anti_join_runtime_filters +03709_coalescing_final +03709_final_prewhere_special_columns +03709_remove_unused_columns_from_prewhere +03709_replicated_columns_right_join +03709_tuple_inside_nullable_basic +03710_analyzer_limit_by_aggregate_validation +03710_argAndMinMax +03710_array_join_in_map_bug +03710_midpoint +03710_midpoint_jit +03710_pr_join_with_mv +03710_tuple_inside_nullable_function_tuple_element +03711_contingency_window_function +03711_read_in_order_through_join +03711_top_k_by_skip_index +03711_top_k_by_skip_index_negative +03711_tuple_inside_nullable_least_supertype +03712_nested_loop_join_merge_tree +03712_tuple_inside_nullable_implicit_cast_for_in_function_1_1 +03712_tuple_inside_nullable_implicit_cast_for_in_function_1_2 +03712_tuple_inside_nullable_implicit_cast_for_in_function_2 +03713_data_types_binary_deserialization_stack_overflow +03713_optimize_inverse_dictionary_lookup_setting_rewrite_in_to_join +03713_replicated_columns_in_external_data_bug +03714_base32_base58_short_string +03714_queries_escaping_1 +03714_queries_escaping_2 +03715_projection_settings +03715_tuple_inside_nullable_in_qualified_expression +03716_anti_join_runtime_filters_2 +03716_bson_each_row_empty_tuple_column +03716_join_duplicate_columns_89411 +03716_join_right_side_sorting +03716_multiple_joins_using_top_level_identifier +03716_topk_bad_data +03717_msgpack_empty_tuple_column +03717_system_unicode_enums +03718_lambda_multiif_bool_uint8_type +03719_generic_hash_over_constant_and_non_constant +03719_ntile_no_partition_by_check +03720_datetime64_bad_inference +03720_file_engine_second_crash +03720_insert_mem_no_self_deduplication +03720_ntile_double_order_by_check +03720_numbers_table_function_with_step_edge_cases # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +03720_rocksdb_multicolumn_primary_key +03720_ubsan_dictionary_parameters +03721_aggregate_projection_actions_dag +03721_check_natural_sort_key +03721_concurrent_right_join_flags_per_row_bug +03721_insert_replicated_array_nested_sizes_check +03721_join_residual_condition_bug_88635 +03721_statistics_alter_type_bug +03722_function_trim_ltrim_rtrim_alias +03722_iceberg_hash_bug +03722_max_insert_block_size_bytes_client_row_format +03722_normal_projection_key_columns +03722_random_utf8_bug +03723_incorrect_implicit_projection +03724_filter_assume_not_null_materialize +03724_to_date_time_or_null_negative_arg_bug +03725_json_dynamic_subcolumn_prewhere_zero_index_granularity_bytes +03725_variant_element_null_map_subcolumn_prewhere_zero_index_granularity_bytes +03726_array_union_with_dynamic_argument +03726_distributed_alias_column_order +03727_alter_with_localhost_remote +03727_block_structure_mismatch_after_filter_push_down +03727_concat_with_separator_subquery +03727_ipv4_parsing_bug +03727_prewhere_intermediate_columns +03727_rename_nested_and_modify_in_one_later +03727_tolowcardinality_nullable_cast +03728_analyzer_identifier_resolution_join +03728_explain_column_structure +03730_qbit_in_order_by_and_comparison_functions +03732_join_on_exists_bug +03732_json_duplicated_path_in_dynamic_paths_and_shared_data_bug +03732_json_duplicated_path_in_dynamic_paths_and_shared_data_compact_part_bug +03732_toweek_partition_pruning +03733_anti_join_runtime_filter_3 +03733_base58_decode_bug +03733_has_function_key_condition +03733_has_function_key_condition_explain +03733_join_order_dp +03733_sparse_negative_zero +03733_summing_merge_tree_nested_low_cardinality +03734_has_function_key_condition_skip_index +03734_has_function_key_condition_skip_index_explain +03735_async_insert_mergetree_count +03735_excessive_buffer_flush +03736_table_stats_hint +03737_ttl_delete_vertical_merge +03738_aggregation_stats +03740_alter_modify_query_dict_name_in_cse +03741_adaptive_write_buffer_initial_size_zero +03741_insert_select_subquery_from_file +03741_subcolumns_of_materialized_columns_in_mutation +03742_apply_row_policy_after_final +03742_array_filter_is_null_empty_array +03742_array_join_empty_tuple +03742_lazy_materialization_of_array_after_alter_add_column +03742_test_flattened_crash +03743_alp_codec_aggregations +03743_alp_codec_basic_roundtrip +03743_alp_codec_block_sizes +03743_alp_codec_special_values +03743_apply_row_policy_after_final_safety +03743_fix_estimator_crash +03743_summing_and_aggregating_merge_tree_with_json_merge +03745_fix_dynamic_structure_in_compact_part +03747_float_parsing_subnormal +03747_optimize_functions_to_subcolumns_columns_as_substreams +03747_tuple_inside_nullable_untuple_function +03748_coalescing_merge_tree_tuple_low_cardinality_and_dynamic +03748_default_minmax_indices_alter +03748_tuple_inside_nullable_flatten_tuple_function +03748_tuple_of_sparse_elements_bug +03749_arrayROCAUC_variant_type +03749_cross_join_use_nulls_matcher +03749_dictionary_hierarchical_null +03749_implicit_index_ephemeral_alias +03749_in_function_rewrite_lambda_lhs_non_const_rhs +03749_table_function_argument_asterisk +03749_tuple_inside_nullable_tuple_names_function +03750_tuple_inside_nullable_tuple_to_name_value_pairs_function +03751_empty_constant_expression_fix +03751_if_uint64_int32_type_mismatch +03751_join_empty_string_nullable +03751_summing_coalescing_merge_tree_sparse_columns_in_header +03751_tuple_inside_nullable_tuple_functions +03752_constant_expression_with_untuple +03752_fractional_limit_offset_small_blocks +03752_join_part +03752_tuple_inside_nullable_binary_arithmetic +03753_anti_join_runtime_filter_4 +03753_fractional_limit_with_ties_small_blocks +03753_join_runtime_filter_dynamically_disable +03753_log_engine_shared_prefixes_bug +03753_negative_index_for_tuple +03753_replacing_empty_order_by +03753_segfault_with_empty_callback +03753_tuple_inside_nullable_experimental_setting +03754_fractional_limit_offset_multiple_streams +03754_h3_polygon_to_cells_const +03754_point_in_polygon_primary_key_index +03755_circular_dictionary +03755_concurrent_hash_join_dispatch_bug +03755_distinct_low_cardinality +03755_enable_sparse_nullable_consistently +03755_final_prewhere_duplicate_columns +03755_hive_partitioning_used_to_break_insert +03755_large_primary_key_explain +03755_nested_recursive_cte +03755_obfuscate_query +03756_capn_proto_message_size_limit +03756_high_cardinality_primary_key_set +03756_high_cardinality_primary_key_set_explain +03756_sparse_serialization_nullable_in_tuple +03756_time_series_wrong_tags_group +03756_update_query_formatting +03757_ast_not_formatting +03757_nothing_null_safe_comparison +03757_optimize_skip_unused_shards_with_type_cast +03758_positional_argument_agg_projection +03758_validate_ngram_length +03759_join_filterpushdown_granules_read +03760_consistent-in-formatting +03760_join_reorder_outer_inner_nulls +03760_primes +03760_split_join_filter +03761_convert_outer_to_inner_join_keeps_header +03761_count_distinct_optimization_window +03761_inconsistent_ast_formatting +03761_join_using_empty_list +03761_lazy_materialization_split_expr +03761_log_with_string_size +03762_analyzer_convert_any_outer_to_inner_with_injective_function +03762_count_distinct_optimization_multiple_columns +03762_has_in_function_key_condition_deterministic_function_chain_explain +03762_mutation_of_columns_in_wide_part_with_new_type_serialization_version +03763_column_conflicting_with_subcolumn +03763_no_new +03764_join_nothing_type_column_crash +03765_remote_loop_table_function +03766_subcolumns_resolution_in_aliases +03767_implicit_minmax_index_dynamic_variant +03768_rename_alias_column_implicit_index +03769_implicit_index_alias_simple_reference +03770_long_index_name_hash +03771_tokens_crash +03771_tuple_inconsistent_formatting +03772_key_condition_match_function_relaxed +03773_deserialise_malformed_aggregate_state +03773_deterministic_functions_key_condition +03773_deterministic_functions_key_condition_explain +03773_group_concat_overflow +03773_join_on_formatting +03773_key_condition_not_materialize_not_cast +03773_lightweight_update_index_subquery +03773_nullable_sparse_join +03773_parquet_roundtrip_bug +03773_semi_join_equivalent_sets +03774_join_pushdown_sharding_bug +03774_ttl_group_by_lowcardinality +03774_wide_part_mutation_sparse_ratio_setting_bug +03775_group_format +03775_join_on_disk_max_files_to_merge +03775_modulo_legacy_key_condition +03775_too_large_temporary_files_buffer_size +03776_text_index_covered_sparse_grams +03777_analyzer_unused_columns_removal_correlated_subquery +03777_join_precalculate_keys +03777_join_runtime_filter_duplicate_columns +03777_join_runtime_filter_empty_header +03777_join_runtime_filter_prepared_right_table +03777_join_runtime_filter_unsupported_type +03777_join_runtime_filter_with_consts +03777_join_runtime_filter_with_nulls +03777_join_runtime_filter_with_totals # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +03777_merge_engine_with_aliases_bug +03777_runtime_filter_and_merge_table +03777_top_k_dynamic_filtering_respect_header_bug +03778_bool_in_operator_casting +03778_mutation_bad_sparse_cration_with_altered_ration +03778_read_subcolumns_from_projection +03779_float_nan_key_condition +03779_lexer_pointer_overflow_ubsan +03779_missing_type_jit +03779_not_found_subcolumn_in_mv_query_during_alter_of_src_table +03779_time_series_tags_functions +03780_AST_formatting_inconsistencies_in_debug_check +03780_colorOKLABToSRGB +03780_colorSRGBToOKLAB +03780_function_variant_adaptor +03780_has_all_tokens_empty_array +03780_max_insert_block_size_settings_squashing_on_insert_select +03780_min_insert_block_size_settings_squashing_on_insert_select +03780_setting_use_primary_key +03781_json_max_dynamic_subcolumns_control_on_parsing +03781_merge_hostname_remote +03781_split_join_filter_bug +03781_tuple_inside_nullable_sparse_serialization +03781_variant_throw_on_type_mismatch +03782_contingency_window_functions_state_serialize_deserialize +03782_non_constant_in_array_func_negative +03782_parse_describe_select_without_parentheses_around_select +03784_correlated_subquery_from_storage +03784_functions_various_bugs +03784_h3_invalid_inputs +03784_materialize_index_subcolumns +03784_msan_token_iterator +03785_rebuild_projection_with_part_offset +03786_clear_column_with_alias_and_index +03786_empty_tuple_map_array +03786_outer_to_semi_or_anti +03786_storage_join_type_conversion +03787_optimize_inverse_dictionary_lookup_remote_shards +03787_storage_join_type_conversion_2 +03788_hash_join_with_empty_right_side_skip_left_side +03788_header_after_outer_to_semi_or_anti_conversion # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +03788_parquet_writer_bad_bool +03788_semi_join_filter_pushdown_bug +03788_statistics_part_pruning +03788_statistics_part_pruning_nan +03788_statistics_part_pruning_partial +03788_statistics_part_pruning_precision +03788_statistics_part_pruning_stale_null_count +03788_table_function_results_race +03788_window_function_lag_lead_remote +03789_read_in_order_constant_column_direction +03789_right_join_column_replicated +03789_skip_index_bad_utf8 +03789_to_year_week_monotonicity_key_condition +03789_tuple_inside_nullable_in_function_edge_cases +03790_materialized_postgresql_nullptr_dereference +03790_uniqTheta_error +03791_backup_engine_with_one_arg_must_not_crash +03791_decimal_string_zero +03791_function_to_subcolumns_optimization_on_subcolumns +03791_system_parts_files_column +03792_implicit_index_modify_column +03792_jit_date32 +03792_jit_time64 +03792_push_to_set_via_mv_with_an_error +03792_sparse_offsets_in_substreams_cache_compact_part +03793_alter_with_dependencies_scalar_subquery +03793_logical_expressions_optimizer_group_by_use_nulls +03793_with_fill_staleness_long_jump +03793_with_fill_staleness_overflow +03794_global_in_nullable_type_mismatch +03794_setting_use_lightweight_primary_key_index_analysis +03796_set_index_nested_indexhint_constant +03797_convert_field_to_type_decimal_overflow +03797_set_index_multiple_conditions_same_expression +03798_nullable_primary_key_logical_error +03799_array_autocorrelation +03799_parallel_right_join_flag_per_row +03799_row_order_optimize_duplicate_sorting_columns +03799_statistics_minmax_negative_max +03800_assume_not_null_coalesce_if_null_monotonicity_key_condition +03800_explain_syntax_operators_as_functions +03800_projection_row_policy_filter_column +03800_string_size_stream_in_nested_types +03800_use_const_adaptive_granularity_vertical_merge +03800_use_const_adaptive_granularity_vertical_merge_nested +03801_domain_empty_string_msan +03801_materialized_cte +03802_aggregating_agg_func_tuple_element +03802_aggregating_nested_tuple_element +03802_aggregating_simple_agg_func_tuple_element +03802_aggregating_unnamed_tuple_element +03802_coalescing_merge_tree_tuple_element +03802_ephemeral_enum_type +03802_float_to_enum_overflow +03802_positional_arg_in_view_distributed_query +03802_storage_alias_referential_check +03802_summing_merge_tree_tuple_element +03802_summing_merge_tree_tuple_sum_and_partition_keys +03802_tuple_inside_nullable_case +03803_const_string_comparison_cast_settings +03804_cast_keep_nullable_low_cardinality +03804_date_time_date32_pre_epoch +03804_insert_select_parentheses +03805_array_filter_nullable_lambda +03805_merge_table_filter_push_down_uninitialized_plan +03806_tuple_in_set_with_low_cardinality +03807_top_k_limit_zero +03808_correlated_subquery_with_totals # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +03808_inconsistent_formatting_index_ttl_alias +03808_with_duplicate_alias_nested_scopes +03809_inconsistent_formatting_constraint_alias +03809_virtual_row_with_sparse_primary_key_index +03810_inconsistent_formatting_column_default_alias +03811_contingency_window_functions_nested_combinators_merge +03811_inconsistent_formatting_storage_alias +03811_inconsistent_formatting_ttl_where_alias +03811_join_using_top_level_matcher_type +03811_sparse_column_aggregation_with_sum +03811_test_hint_after_comment +03812_column_function_prewhere_filter +03812_fuse_function_pass_nullable_argument +03812_join_order_ubsan_overflow +03812_quantile_timing_deserialization_bug +03812_reading_subcolumns_of_aliases +03813_max_query_size_overflow # only=tcp: server: max_query_size = 2^64-1 gives Empty query over HTTP +03813_size_subcolumn_of_dynamic_subcolumn +03813_subquery_column_aliases_in_join +03814_in_function_strict_conversion +03814_optimize_read_in_order_projection +03814_subquery_parser_partially +03814_system_unload_dictionaries +03814_system_unload_dictionary +03814_tuple_inside_nullable_schema_inference +03820_limit_after_until +03821_analyzer_group_by_use_nulls +03821_direct_join_empty_table +03821_materialized_cte_with_sets +03821_numbers_primes_filter_bound +03821_remote_grouping_set_aggregation_keys_assert +03821_uniq_speedup_boundaries +03822_alias_column_skip_index_no_merge +03822_insert_null_into_non_nullable_enum +03822_join_reorder_fix_expression_sources +03822_lttb_date32_negative +03822_lwu_patch_type_mismatch_crash +03822_map_json_dictionary +03822_numbers_table_function_edge_cases +03822_window_function_large_preceding_offset +03823_dictionary_circular_dep_deadlock +03823_drop_readd_column_stale_data +03823_gorilla_codec_mismatched_size +03823_lwu_patch_type_mismatch_dataloss +03823_optimize_dry_run +03823_optimize_dry_run_cleanup +03823_optimize_dry_run_patch_parts +03823_optimize_dry_run_projections +03823_optimize_dry_run_timeout +03823_prefetched_read_pool_priority_assertion +03823_skip_index_disjunction_oob +03823_table_disk_cache_key_collision +03824_index_reader_const_granularity_last_mark +03825_array_with_constant_fixed_string +03825_bitxor_if_mixed_types +03825_exists_constant_folded_action_name +03825_join_right_sorting_empty_maps +03825_xxh3_128_hash_function +03826_array_join_in_bloom_filter +03826_coalesce_reversed_args_key_condition +03826_right_outer_join_runtime_filters +03826_xxh3_128_types +03827_cross_join_no_right_columns +03827_right_any_join_runtime_filters +03828_multi_join_wrong_column_resolution +03829_distance_transposed_pass_nullable_nothing +03829_insert_deduplication_info_memory +03829_log_engine_ephemeral_subcolumn +03830_vertical_merge_inject_column_after_drop +03831_cast_nullable_source_nested_types +03831_index_of_assume_sorted_const_exception +03832_array_join_filter_push_down_cross_join # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +03832_log_engine_alias_subcolumn +03833_server_ast_fuzzer +03834_fuzz_query_function +03835_join_transitive_predicates +03835_join_transitive_predicates_dedup +03835_join_transitive_predicates_edge_cases +03835_join_transitive_predicates_outer +03835_todate_monotonicity_boundary +03836_array_join_in_filter_partial_evaluation +03836_tpch_join_order_plans +03837_negative_limit_by +03837_subquery_ndv_propagation_join_order +03838_right_join_using_nullable_type_mismatch +03844_point_in_polygon_variant_const_key_condition +03891_predicate_pushdown_union_in_join_on +03891_utc_timestamp_datetime64_overflow +03900_replace_one_byte_fast_path +03901_issue_70015_minus_type_mismatch +03902_format_datetime_fractional_msan +03902_jit_cast_to_bool +03903_cancellation_checker_large_timeout +03903_join_alias_dups +03904_fix_empty_statistics_load +03904_fuse_function_pass_lowcardinality_nullable_argument +03904_has_function_partition_pruning_key_condition +03905_grouping_sets_use_nulls_lowcardinality_in_tuple +03905_select_replace_where_same_column +03905_set_partition_pruning_key_condition +03905_skip_index_set_null +03905_window_function_constant_in_group_by +03906_group_by_lowcardinality_parallel_hash_join +03908_distributed_in_select_with_analyzer +03908_lazy_materialization_replacing_merge_tree +03909_union_all_remote_predicate_pushdown +03910_limit_always_read_till_end_with_constant_false_having +03910_skip_index_empty_expression +03911_to_low_cardinality_clone_nullable +03912_set_index_dynamic_type +03912_tuple_comparison_group_by_use_nulls # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +03913_data_type_function_null_arg_hash +03913_ipcrypt_functions +03913_jemalloc_cache_arena_metrics +03913_minmax_statistics_nan_ubsan_error +03913_multijoin_equivalent_sets +03913_partially_materialized_statistics +03913_runtime_filter_nullable_tuple # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +03913_semi_anti_join_column_access +03913_text_index_preprocessor_expression +03913_tuple_inside_nullable_subcolumns +03914_create_table_with_constraint_crash +03914_dynamic_illegal_subcolumn +03914_has_any_all_tokens_with_tokenizer +03914_ipcrypt_functions_errors +03914_join_using_projection_alias +03914_json_functions_with_object_type +03914_parquet_v3_prewhere_non_bool_filter +03915_auto_statistics_replacing_merge +03915_bech32_invalid_witness_version +03915_row_policy_should_respect_final_by_default +03915_spilling_hash_join +03915_tuple_inside_nullable_variant_dynamic_element +03916_coalescing_merge_tree_const_column_from_index +03916_contingency_state_variant_serialization_match +03916_except_intersect_all_multiset +03916_has_to_in +03916_ifnull_variant_group_by +03916_jit_datetime_to_datetime64_scale +03916_json_lazy_type_hints +03916_lazy_materialization_union_all +03916_merge_tree_order_by_subquery +03916_system_fault_injection_points +03916_system_log_indexes +03916_ttl_minmax_projection_epoch_bug +03916_tuple_inside_nullable_json_subcolumns +03916_window_functions_group_by_use_nulls # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +03917_arrayFold_lambda_as_accumulator +03917_json_lazy_type_hints_mixed_parts +03917_tuple_inside_nullable_tuple_subcolumns +03918_allow_nullable_tuple_in_extracted_subcolumns_not_changeable +03918_array_element_negate_int_min +03918_arrayjoin_function_with_join_and_where +03918_convert_join_to_in_arrayjoin_dangling +03918_if_transform_strings_to_enum_nullable +03918_insert_squashing_const_different_values +03918_json_lazy_type_hints_merge +03918_replace_table_clone_as_verbose_result +03918_variant_adaptor_nothing_type +03919_json_lazy_type_hints_incompatible +03919_startsWithUTF8_use_primary_key +03919_variant_adaptor_lowcardinality +03920_projection_empty_order_by_formatting +03921_internal_functions_have_internal_category +03921_ip_trie_nullable_key +03921_merge_tree_settings_readonly +03921_quoted_all_column_in_order_group_limit_by +03923_masking_policy_on_cluster_format +03923_union_all_cte_skip_index_prewhere +03924_constant_granularity_last_mark +03924_join_use_nulls_function_result_type +03924_sorting_step_stats +03924_table_readonly_setting +03925_exists_with_mutations_execute_on_initator +03925_fix_lambda_arrow_token_consumption +03925_grouping_function_constant_argument +03925_if_nullable_const_branch # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +03925_sparse_values_in_substreams_cache_bug +03925_tuple_comparison_nothing_type +03925_variant_adaptor_const_lowcardinality +03926_convert_to_full_recursive_tuple_sparse +03926_group_by_use_nulls_constant_type +03926_qbit_cast_from_nullable_array +03926_semi_join_swap_tables +03926_system_stemmers +03927_anti_join_swap_tables +03927_correlated_subquery_table_function_context +03927_except_all_ast_formatting_roundtrip +03927_formatting_consistency_tuple_on_clause +03927_join_use_nulls_subcolumn +03927_json_typed_path_tuple_element +03927_nested_columns_duplicate_identifier +03927_recursive_materialized_cte +03927_row_filter_in_read_in_order_optimization +03927_sumcount_compatibility +03928_aggregate_function_tuple_return_type_compatibility +03928_deferred_filters_after_final_in_explain +03928_full_join_swap_tables +03928_isNull_nullable_tuple_subcolumn +03928_materialized_cte_index +03928_merge_lambda_alias_columns +03929_index_hint_final_remove_unused_columns +03930_pr97672_validation_error_paths +03935_with_fill_by_sorting_prefix_collation +03950_identity_preserves_geometry_type +03960_join_order_dphyp_algo_combo +03960_join_order_dphyp_basic +03960_join_order_dphyp_bridge +03960_join_order_dphyp_chain10 +03960_join_order_dphyp_clique +03960_join_order_dphyp_cycle +03960_join_order_dphyp_fallback +03960_join_order_dphyp_hyperedge +03960_join_order_dphyp_limits +03960_join_order_dphyp_merge_filter_fallback +03960_join_order_dphyp_multi_predicate +03960_join_order_dphyp_null_safe +03960_join_order_dphyp_over_limit +03960_join_order_dphyp_search_budget +03960_join_order_dphyp_single_table_predicates +03960_join_order_dphyp_star +03960_join_order_dphyp_transitive_predicates +03960_join_order_dphyp_tree +03960_join_order_dphyp_triangle +03960_materialized_view_insert_wider_target_enum_107635 +03970_quantile_exact_exclusive_overflow_ubsan +03976_geometry_functions_accept_subtypes +03977_pr_expected_join +03977_rollup_lowcardinality_nullable_in_tuple +03978_alter_table_execute_expire_snapshots_parse +03979_datetime64_preepoch_partition_pruning +03980_datetime64_preepoch_partition_pruning_explain +03984_in_single_column_reference +03984_table_function_arg_in_remote_with_join_using +03985_lateral_join +03985_parenthesized_from_join +03987_concat_variant_low_cardinality +03987_not_operator_precedence +03988_concat_with_separator_format_variant_low_cardinality +03988_grace_hash_join_leftover_blocks +03988_lazy_final_replacing_merge_tree +03988_map_contains_key_like_tokenbf +03988_map_with_buckets_create_and_write +03988_mutations_with_analyzer +03988_setting_use_partition_pruning +03989_codec_ignore_nulls_formatting +03989_map_subcolumn_function_to_subcolumns +03989_set_low_cardinality_in_tuple +03990_alter_rename_column_swap_different_types +03990_map_subcolumn_skip_index +03990_set_dynamic_low_cardinality_join_runtime_filter +03991_json_single_bucket_empty_shared_data +03991_set_variant_low_cardinality_in_global_in +03992_join_using_remote_table_function_with_alias +03992_map_subcolumns_small_memory +03993_join_no_overlapping_columns_85622 +03993_map_subcolumns_small_compact +03994_map_subcolumns_small_wide +03996_create_user_ssh_key_marker_reserved +03997_map_subcolumns_key_types +03999_alter_modify_constraint +03999_empty_to_equals_rewrite_for_nullable +03999_key_condition_multi_atom +03999_lwd_combined_mutation_with_index +04000_anti_join_runtime_filter_multi_key +04000_map_subcolumns_prewhere +04000_nullable_tuple_null_subcolumn_ambiguity +04001_attach_clone_part_level_reset +04001_clone_as_part_level_reset +04001_inconsistent_ast_formatting_confusing_array_with_subquery +04001_join_reorder_through_expression +04001_logical_error_with_cube +04001_parquet_prewhere_missing_column +04001_virtual_row_conversions_join_column_names +04002_cast_nullable_read_in_order +04002_deterministic_filter_chain_partition_pruning_key_condition +04002_join_using_top_level_array_join +04002_sign_jit_miscompilation +04003_array_join_in_filter_outer_to_inner_join +04003_cast_nullable_read_in_order_explain +04003_deterministic_filter_chain_partition_pruning_key_condition_explain +04003_geojson_input_format +04003_grace_hash_join_with_totals # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +04003_interpolate_element_with_alias_formatting +04003_join_lazy_indexing +04003_text_index_search_mode +04003_tuple_combinator +04004_alter_modify_column_ttl_without_type +04004_cast_nullable_monotonicity_key_condition +04004_const_column_get_extremes # only=tcp: no extremes in the HTTP RowBinary output +04004_finalize_projection_parts_synchronously +04004_insert_compound_select_formatting +04004_integral_col_comparison_with_float_key_condition +04004_log_alias_subcolumn +04005_case_with_expression_nullable_nothing +04005_correlated_column_in_lambda +04005_ddsketch_corrupted_data +04005_empty_part_name +04005_merge_table_virtual_column_filter_bad_cast +04005_primes_numbers_system_table_float_literal +04005_share_nested_offsets +04005_window_single_line_formatting +04005_with_fill_limit_by +04006_convert_join_to_in_dummy_column +04006_correlated_columns_collector_scope +04006_materialize_index_race_with_drop +04006_not_subquery_not_like_formatting +04006_nullable_partition_minmax_merge +04006_parquet_bool_to_fixedstring +04006_parquet_date_to_enum_insert +04006_skip_empty_columns_on_insert +04006_table_function_in_expression_context +04007_low_cardinality_in_column +04007_pipeline_stuck_ping_pong_deadlock +04007_remove_unused_columns_join_header_mismatch +04007_skip_empty_columns_mutations +04008_count_distinct_optimization_with_qualify +04008_log_engine_nested_subcolumn_cache +04008_skip_empty_columns_lifecycle +04009_cross_join_inner_join_using +04009_dict_get_or_default_nullable_key_short_circuit +04009_join_using_cross_join_projection_alias +04009_log_nested_null_subcolumn +04009_projection_aggregate_empty_block_from_ttl +04010_column_replicated_handling_in_partial_sorting_transform +04010_create_or_replace_table_clone_as +04010_empty_database_name_parameter +04010_explain_actions_pretty_and_verbose +04010_filter_pushdown_non_boolean_output +04010_lift_up_functions_missing_sort_column +04010_negate_nullable_from_join_use_nulls +04010_null_safe_cmp_dynamic_const +04010_prewhere_in_subquery_merge_tree +04010_subquery_in_order_key +04010_text_index_incompelete_granules +04011_compress_per_column_in_compact_parts +04011_detach_rename_attach_column +04011_explain_pretty_join +04012_explain_pretty_output +04012_versioned_collapsing_final_filter +04013_loop_function_output_columns +04014_json_compact_each_row_null_string +04015_json_compact_each_row_int128_parsing +04016_exists_group_by_resolution +04017_column_alias_set_operations +04018_insert_with_scopes_disabled +04019_formats_nullable_empty_tuple_roundtrip +04019_pipeline_stuck_sort_overflow +04020_lc_null_full_join +04021_join_on_false_chunk_rows +04022_triple_join_using_bad_cast +04023_rollup_totals_memory_limit +04024_create_table_empty_comment_as_select_formatting +04024_drop_column_alias_dependency +04024_fold_utf8 +04024_jit_multiif_mixed_types +04024_json_least_supertype_merge +04024_json_skip_index_bloom_filter +04024_json_skip_index_larger_granularity +04024_json_skip_index_text +04024_json_skip_index_token_ngram +04024_parse_datetime_best_effort_invalid_words +04024_prewhere_parquet_keycondition +04025_ip_trie_nullable_key +04026_prewhere_qualify_text_index +04027_base58_optimized +04027_final_prewhere_constant_where_remove_unused_columns +04027_json_input_format +04027_redundant_equals_variant_type +04027_redundant_trailing_bytes_aggregate_function_deserialization +04027_reverseUTF8_invalid_utf8 +04027_set_index_or_non_indexed_column +04028_recursive_cte_remote_view_segfault +04028_squashing_with_strict_bounds_bytes_underestimation +04029_join_convert_to_fixed_hash_table +04029_json_columns_input_format +04029_msgpack_nullable_empty_tuple_roundtrip +04029_multiply_monotonicity +04029_read_in_order_expression_virtual_row +04029_ttl_delete_filter_vertical_merge_subquery +04030_array_fold_memory_peak_guard +04030_correlated_subquery_untuple +04030_text_index_condition_logical_error +04031_financial_functions_bfloat16 +04031_nan_in_pk_index_binary_search +04031_patch_parts_without_part_offset +04032_alter_version_column_nonexistent +04032_and_comparison_filter_optimization_1 +04032_and_comparison_filter_optimization_2 +04032_and_comparison_filter_type_conversion +04032_commit_order_projection +04032_filter_push_down_const_having +04032_fixedstring_prefix_key_condition +04032_naive_bayes_dictionary +04032_nested_function_preserves_lowcardinality +04032_query_tree_pass_order +04033_commit_order_projection_replacing_merge +04033_dynamic_disk_allow_from_env +04033_empty_string_pk_monotonicity +04033_ephemeral_column_conflicts_with_virtual +04033_except_transformer_with_alias +04033_exists_with_limit_offset +04033_issue_94659 +04033_naive_bayes_dictionary_negative +04033_text_index_empty_block_during_merge +04033_top_k_dynamic_filter_nullable_string +04034_any_left_join_in_subquery_default_value +04034_buffer_sample_no_sampling_key +04034_commit_order_projection_validation +04034_h3_functions_default_if_invalid +04034_patch_parts_column_order_mismatch +04034_top_k_skip_index_nullable_guard +04035_alp_auto_codec_basic_roundtrip +04035_alp_rd_codec_basic_roundtrip +04035_alp_rd_codec_special_values +04035_bech32_bip173_raw_encoding +04035_buffer_sample_with_sampling_key +04035_cast_keep_nullable_dynamic +04035_commit_order_projection_mutation +04035_create_as_select_intersect_settings +04035_highlight_too_many_needles +04035_materialized_cte_lazy_analysis +04035_normalize_utf8_nfkc_casefold +04035_text_index_map_values_in +04035_toDaysInMonth +04036_columns_replicated_with_unreferenced_rows +04036_commit_order_projection_index +04036_regex_primary_key_optimization +04036_text_index_map_keys_values_in +04037_cast_nullable_fixedstring_too_large +04037_commit_order_projection_deferred +04037_map_key_subcolumn_tuple_value_mergetree +04037_text_index_map_empty_values_in +04037_time_datetime64_comparison +04038_ascii_cjk_tokenizer +04038_check_table_sparse_tuple_dynamic +04038_printf_dynamic_format +04038_text_index_no_negated_functions +04038_text_index_preprocessor_type_validation +04039_commit_order_projection_materialize_level0 +04039_count_nullable_tuple_subcolumn +04039_explain_union_settings_formatting_roundtrip +04039_intersect_except_duplicate_column_names +04039_jemalloc_fragmentation_validation +04039_limit_after_until_regression +04039_materialize_projections_on_insert +04039_prune_array_join_columns +04039_statistics_in_single_param +04039_text_index_direct_read_select_alias +04039_text_index_map_values_subcolumn +04039_ttl_where_in_subquery_vertical_merge +04040_alter_drop_part_non_literal +04040_alter_ephemeral_column_conflicts_with_virtual +04040_cascades_semi_join_broadcast_correctness +04040_clear_column_with_projection_index +04040_commit_order_projection_merge_levels +04040_defaults_dependency_order +04040_like_escape +04040_limit_after_until_subquery +04040_map_subcolumn_having_bug +04040_materialize_projections_on_merge +04040_union_block_structure_prewhere_projection +04040_vertical_merge_cancel_rows_sources +04040_window_funnel_strict_deduplication +04041_attach_table_no_partition_key_metadata_cache +04041_cascades_anti_outer_join_broadcast_correctness +04041_format_create_as_select_with_output_options +04041_limit_after_until_subquery_combinations +04041_parquet_use_filter_in_decoder_with_offset_index +04041_text_index_direct_read_or_multi_column +04041_vertical_merge_stop_start_race +04042_drop_detached_part_non_literal +04042_hash_join_allocated_size_tracking +04042_limit_after_until_nullable +04042_materialized_cte_union +04042_nan_pk_multi_row_granule +04042_some_keyword +04042_text_index_lightweight_delete +04042_text_index_prewhere_alias_select +04042_time_datetime_supertype +04042_time_series_range_overflow +04043_limit_after_all +04043_natural_join +04043_support_set_time_zone +04043_text_index_in_with_preprocessor +04043_time_datetime_tz_comparison +04044_limit_after_until_errors +04044_mutation_ephemeral_materialized +04044_recursive_cte_remote_view_actual_recursion +04044_text_index_hash_token_boundaries +04045_aggregate_functions_null_for_empty_non_nullable_result +04045_ambiguous_column_alias_values +04045_crc32_fixed_string_empty_column +04045_limit_after_until_chunk_boundary +04045_merge_function_missing_columns_remote +04045_reverse_order_virtual_row +04046_alter_modify_query_settings_formatting +04046_detach_attach_secondary_index_metadata_cache +04046_filling_step_overflow +04046_format_alter_modify_query_with_settings +04046_midpoint_mixed_types +04046_rollup_cube_with_external_group_by +04046_sipHash128Keyed_map_with_empty_arrays +04047_arrow_uuid_nested_reader +04047_grouping_sets_with_external_group_by +04047_join_filter_pushdown_equivalent_using_types +04047_kill_query_const_column +04048_correlated_exists_limit_offset +04048_projection_alias_column_order_by +04048_sumcountif_nullable_backward_compat +04049_aggregate_function_numeric_indexed_vector_self_merge +04049_arrayRemove_nullable_tuple +04049_clear_column_projection_compact_merge +04049_explain_ast_parenthesized_access_queries +04049_inject_required_columns_dangling_reference +04049_is_true_false_unknown +04049_negative_limit_with_ties_basic +04049_remote_subquery_in_unresolved_table_function_argument +04049_statistics_enum_invalid_value +04049_timeseries_aggregate_function_parallel_replicas +04049_tuple_inside_nullable_nullable_subcolumn +04049_values_clause_standard_sql +04049_virtual_row_overlap +04049_with_func_alias_in_view +04050_accurateCastOrDefault_const +04050_explain_ast_insert_with_output_options +04050_iceberg_virtual_columns_return_bug +04050_join_merge_table_duplicate_columns +04050_lc_nullable_query_parameters +04050_mark_cache_compact_part_mutation +04050_profile_events_skip_indexes_on_data_read +04050_prune_array_join_numeric_index +04050_text_index_lazy_extreme_selectivity +04050_text_index_map_keys_in_subquery +04050_text_index_starts_ends_with +04050_time64_cast_uint64_no_wrap +04050_truncate_order_by_after_group_by_keys +04050_with_fill_step_abs_int64_min +04051_array_first_last_variant +04051_clear_column_rebuild_dependencies +04051_optimize_dictget_tuple_element +04051_pk_analysis_stats +04051_runtime_filter_variant_type +04051_similar_to +04051_toStartOfInterval_overflow +04051_top_k_dynamic_filter_read_in_order +04051_variant_filter_shared_columns_bug +04052_extract_postgres_units +04053_alter_add_rename_column_in_single_query +04053_alter_command_segments_validation +04053_correlated_subquery_group_by_use_nulls # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +04053_create_view_asterisk_with_aliases +04053_describe_subquery_alias +04053_estimate_compression_ratio_huge_block_size +04053_final_prewhere_window_remove_unused_columns +04053_fuzz_issues_from_obsolete_version +04053_group_by_cube_with_rollup_ast_formatting +04053_h3_validate_cells_and_edges +04053_in_subquery_prewhere_not_ready_set +04053_merge_tree_analyze_indexes_union_all +04053_mv_bool_filter_with_optimizations_disabled +04053_negative_limit_with_ties_offset_fetch +04053_prewhere_statistics_decimal_overflow +04053_render_tab_as_spaces_regression +04053_totals_having_const_mismatch # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +04054_ast_json_serialization +04054_block_mismatch +04054_caseWithExpression_nullable_when +04054_create_or_replace_materialized_view +04054_hash_join_with_row_store +04054_join_optimizer_overlapping_column_names +04054_limit_with_ties_offset_syntax +04054_merge_after_alter_to_tuple +04054_parse_datetime_best_effort_overflow +04054_readwkb_bounds_checking +04054_remove_unused_columns_duplicated_column_names +04054_sample_offset_formatting_ambiguity +04054_sumcount_combinator_compatibility +04054_transform_const_default_column +04054_view_union_intersect_precedence +04055_aggregate_function_tuple_return_type_combinator_compatibility +04055_block_mismatch_mv +04055_min_max_nan_consistent_with_order_by +04055_negative_limit_offset_aggregation +04055_optimize_prewhere_final_and_unused_columns +04055_rand_distribution_parameter_limits +04055_storage_alias_bake_currentDatabase +04056_ast_json_limits +04056_highlight_null_terminator +04056_jit_sort_string_columns +04056_negative_limit_with_ties_large_mt +04056_nullable_named_tuple_in_set +04056_parquet_bloom_filter_empty_in +04056_statistics_i128 +04056_tuple_inside_nullable_casting +04056_ulid_non_ascii_validation +04057_aggregate_function_nothing_with_parameters +04057_explain_pretty_expressions +04057_map_buckets_coefficient_validation +04057_materialized_cte_with_totals +04057_negative_limit_with_ties_edge_cases +04057_rand_distribution_settings +04057_ulid_non_ascii_input +04057_virtual_row_many_parts +04058_constraint_subst_correlated_subquery_crash +04058_explain_pretty_aggregation_sorting +04058_positive_modulo_ubsan +04058_statistics_bad_cast +04059_alias_column_correlated_subquery +04059_explain_pretty_filters +04059_has_lowcardinality_tuple_key_crash +04059_toStartOfInterval_weeks_overflow +04060_coalescing_merge_tree_array_tuple_with_column_param +04060_explain_pretty_joins_sets +04060_with_fill_scale_int64_overflow +04061_array_dot_product_empty_arrays +04061_explain_pretty_child_plans +04061_intdiv_array_tuple_type_mismatch +04061_row_policy_query_log_subqueries +04061_spilling_hash_join_overflow_limits +04061_storage_generate_args_order +04061_trivial_count_aggregate_function_argument_types +04062_analyzer_inline_view_type_conversion +04062_explain_pretty_nested_merge_child_plans +04062_join_order_optimizer_outer_join +04062_use_partition_pruning_disable_minmax_count_projection +04063_analyzer_inline_view_row_policy +04063_columns_cache_edge_cases +04063_in_subquery_lowcardinality_tuple_key +04063_lazy_materialization_projection_prewhere_crash +04063_parse_datetime_best_effort_many_fractional_digits +04063_polygon_dict_simple +04063_text_index_in_tuple +04063_ttl_sparse_column +04064_additional_result_filter_union_column_identifier +04064_alias_datetime_timezone_cast +04064_columns_cache_metrics +04064_distributed_cast_constant_in_where +04064_duplicate_alias_error_message +04064_format_cte_column_aliases +04064_generate_series_negative_step +04064_join_on_or_is_not_distinct_from +04064_join_use_nulls_apply_lambda_multiple_joins +04064_minmax_index_null_inf_ordering +04064_parameterized_view_scalar_subquery +04064_planner_duplicate_column_identifier +04064_recursive_cte_multiple_subqueries +04064_tokenize_and_highlight_query +04064_tuple_inside_nullable_arrow_orc_roundtrip +04064_unused_interpolate_columns_without_wrapper +04064_with_select_identifier +04065_columns_cache_composite_types +04065_count_exact_ranges_max_rows_to_read +04065_direct_join_column_const_mismatch +04065_join_shard_by_pk_with_qcc +04065_negative_limit_fractional_limit_explain_pipeline +04065_tuple_inside_nullable_parquet_roundtrip +04066_columns_cache_partial_ranges +04066_json_value_tuple_array +04066_parseReadableSize_near_uint64_max +04066_smallest_column_subquery_projection +04066_union_all_column_identifier_collision +04067_group_by_use_nulls_apply_aggregate +04067_regexp_invalid_pattern +04068_aggregate_null_for_empty_with_null_combinator +04068_arrayTranspose +04068_columns_cache_range_intersections +04068_geo_wkt_wkb_uppercase_aliases +04068_lazy_materialization_map_nested_alter_add +04068_lwd_minmax_projection_recovery +04068_multi_text_idx_lwd_vertical +04068_projection_index_settings +04068_recursive_cte_type_inference +04068_window_function_type_mismatch_with_rollup_and_group_by_use_nulls # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +04069_index_type_with_settings +04070_array_exists_to_has_null +04070_columns_cache_read_write_settings +04070_date_time_best_effort_default +04070_decimal_min_max_jit_signedness +04070_exact_count_max_rows_to_read +04070_global_in_subquery_prewhere +04070_join_using_type_coercion_round +04070_mergetree_analyze_indexes_optimizations_no_crash +04070_no_crash_extreme_compress_block_size +04070_pad_string_asan_overflow +04070_rename_ephemeral_to_virtual_column +04070_staleness_sorting_prefix_cross_chunk +04070_subnormal_float_literal +04070_summing_mt_final_partition_pruning +04070_truncate_all_tables_skip_views +04070_view_with_projection_not_found_column +04070_with_trailing_comma +04071_columns_cache_json +04071_insert_values_string_to_complex_type +04071_jit_decimal_aggregates +04071_materialize_projections_on_merge_different_sets +04072_jit_decimal_expressions +04073_backup_from_snapshot_ast_format +04073_columns_cache +04073_divide_intdivide_monotonicity_key_condition +04073_float_itoa_fast_path +04073_lc_cast_key_condition_crash +04073_rocksdb_virtual_columns +04073_row_policy_subquery_crash +04074_columns_cache_correctness +04074_map_dynamic_substreams_cache +04074_where_large_int_boolean_predicate +04075_analyzer_inline_view_subcolumns +04075_array_join_using_compatibility_setting +04075_buffer_virtual_column_table +04075_delta_lake_snapshot_version_without_kernel +04075_float_to_string_format +04075_join_reorder_outer_join_filter_pushdown +04075_memory_userspace_pagecache_metrics +04075_right_any_join_incorrect +04075_statistics_selectivity_overflow +04075_text_index_apply_mode +04075_text_index_apply_mode_lazy +04075_text_index_apply_mode_lazy_segment_advance +04075_text_index_correctness +04075_text_index_linear_scan_block_skip +04075_text_index_posting_list_format +04076_allow_statistics_blocks_add_drop +04076_array_symmetric_difference_nullable_tuple +04076_json_in_min_max_index_bug +04076_map_key_value_subcolumn_cache_bug +04076_materialized_cte_dependency_ordering +04076_overlay_sql_standard_syntax +04076_planner_merge_filter_into_join_bug_3 +04076_tuple_json_dotted_subcolumn_bug +04076_virtual_row_preliminary_merge +04077_datetime32_overflow +04077_formatdatetime_w_is_a_variable_length_formatter +04077_in_strict_decimal_inside_composites +04077_lazy_materialization_array_join +04077_lwd_materialized_ephemeral +04077_lwd_multiple_cycles +04077_lwd_optimizer_flag +04077_lwd_qualified_column +04077_lwd_read_in_order +04077_lwd_row_exists_hidden +04077_lwd_trivial_count +04077_materialized_cte_union +04077_range_hashed_dictionary_validate_max_attribute +04077_vector_similarity_cosine_msan +04077_virtual_column_table_log_stripelog +04077_wide_part_writer_cancel_on_exception +04078_error_hint_parsing_exception +04078_grace_hash_join_read_in_order +04078_key_condition_todatetime_date_monotonicity +04078_truncate_tables_like_format_space +04078_virtual_column_alias_log_stripelog +04079_crosstab_window_state_variant_cast +04079_memory_engine_table_virtual_column +04080_contingency_negative +04080_sort_key_encoding_correctness +04081_comparison_constant_folding_null_variant_lc +04082_materialize_skip_indexes_text_index +04082_workload_negative_float64_settings +04084_system_completions_no_duplicates +04086_03711_positive_modulo_tuple +04089_decimal_datetime64_minmax_if +04090_indexof_assume_sorted_low_cardinality +04092_cast_empty_tuple_unexpected_data +04092_delta_iceberg_metadata_log_hostname +04092_format_unlock_snapshot +04092_geometry_cast_custom_type_name +04092_hash_join_shrink_replicated_columns +04092_in_function_empty_set_key_condition +04092_kafka_named_tuple_dot_access +04092_pretty_print_json +04092_text_index_like_large_postings +04092_truncate_order_by_group_by_array_join +04092_ttl_sparse_column_source_fix +04092_view_filter_type_mismatch_crash +04093_best_effort_datetime_timezone_boundary_range_check +04093_case_with_expression_dynamic +04093_json_enum_null_whole_object +04093_merge_function_custom_defaults_remote +04093_negative_time_datetime_comparison +04093_projection_virtuals_in_normal_projection +04093_text_index_like_overflow_fallback +04093_text_index_separate_analysis +04094_ast_formatting_keyword_function_names +04094_asterisk_include_virtual_columns_memory +04094_foreach_combinator_alignment +04094_groupConcat_invalid_data_size +04094_json_extract_time_numeric +04094_kql_conformance_pql +04094_lazy_materialization_final +04094_printf_trailing_percent +04094_projection_with_where +04094_sz_find_null_needle_oob +04094_text_index_like_large_postings +04095_aggregation_in_order_merge_wrong_column_order +04095_join_reorder_type_changes +04095_text_index_like_overflow_fallback +04097_buffer_subcolumn_virtual_column_crash +04097_prewhere_in_subquery_primary_key_analysis +04097_system_parts_default_compression_codec +04097_tuple_inside_nullable_subcolumn_descendants +04098_grant_format_no_duplicate_backward_compat +04098_row_policy_disjunction_optimization +04098_text_index_read_once +04098_tuple_inside_nullable_subcolumn_cache_reads +04099_04103_is_distinct_from_array_map_null +04099_assume_not_null_key_condition +04099_distinct_aggregate_projection_partial_projection_data +04099_time64_csv_trailing_garbage +04099_tuple_inside_nullable_subcolumn_across_blocks +04100_bloom_filter_low_cardinality +04100_collect_sets_crash_with_unresolved_in_function +04100_summing_merge_tree_sort_order_float_nan +04100_system_table_no_auto_statistics +04101_any_right_join_bug +04101_common_expression_single_arg_collapse +04101_crosstab_window_state_serialization_pool +04101_null_representation_with_special_serializations +04101_parseDateTime64BestEffort_double_dot_fractional +04101_schema_inference_length_error_no_crash +04101_variant_adaptor_propagate_exceptions # only=tcp: over HTTP the server runs FORMAT Null, so no MEMORY_LIMIT_EXCEEDED +04101_variant_dynamic_type_mismatch_settings +04101_volume_reducing_function_push_down +04102_lazy_materialization_with_patch_parts +04102_lightweight_update_v2_smoke +04102_storage_alias_insert_dedup_token +04102_text_index_alias_direct_read +04102_text_index_hasAny_hasAll +04103_cast_string_to_date_time_mode_nullable +04103_deltalake_parquet_metadata_cache +04103_fuse_quantiles_distributed_alias_clash +04103_lightweight_update_v2_parallel_read_sort_check +04103_obfuscate_table_function_settings +04103_randomStringUTF8_null_terminators +04103_text_index_alias_direct_read_map +04104_103049_nullable_and_overflow_filter +04104_any_join_semi_anti_not_ready_set +04104_functions_context_lifetime_in_defaults +04104_lightweight_update_v2_eager_patch_discard +04104_parquet_null_as_default_non_nullable +04104_qbit_writeslice_structure_equals +04105_array_top_k_bottom_k +04105_explain_syntax_parameterized_view +04105_in_non_constant_tuple_type_promotion +04105_key_condition_nested_lc_variant +04105_lazy_final_unordered_expand_pipeline +04106_assert_type_equality_column_replicated +04106_limit_by_into_sort +04107_array_distance_const_full_chunk +04107_count_digits_int_min_ubsan +04107_negative_limit_by_large_mt +04107_parallel_hash_join_partition_correctness +04108_chunk_buffer_reader_writer_race +04108_jsonhas_native_json +04108_lambda_column_name_collision_bug +04108_negative_limit_by_edge_cases +04108_replicated_and_non_replicated_columns_merge +04109_jsonextractbool_native_json +04109_read_in_order_with_normal_projection +04109_sort_propagation_apply_order +04109_timeseries_aggregate_function_parameter_type_mismatch +04109_todate32_monotonicity_boundary +04109_tuple_inside_nullable_functions +04110_chunk_buffer_max_threads_1 +04111_array_fill_empty_strings +04111_rocksdb_alter_setting_validation +04112_bson_nullable_array_read_rollback +04113_compact_part_writer_cancel_on_exception +04113_flame_graph_string_traces +04113_function_timeslots_combinations +04113_has_subsequence_empty_haystack +04113_system_sync_filesystem_cache_format +04114_aggregate_function_flamegraph +04114_coalesce_two_column_index_pruning +04115_coalesce_n_column_index_pruning +04115_function_time_window_errors +04116_coalesce_partial_constant_index_pruning +04116_function_formatdatetime_edges +04117_aggregate_state_multiply_self_merge_uaf +04117_lightweight_delete_nonadaptive_granularity +04117_mappopulateseries_int8_overflow +04117_parser_system_query_variants +04117_top_k_optimization_with_final +04119_object_storage_bad_arg_count_no_logical_error +04119_parser_snapshot_query_ast_format +04120_parseDateTime_format_specifiers +04123_kql_operators +04123_spilling_hash_join_peak_under_cap +04124_parser_system_query_extra +04125_array_levenshtein_types +04126_parser_alter_query_variants +04127_bitmap_functions_int_types +04128_sequence_next_node_directions +04129_distinct_json_paths_aggregator +04130_column_variant_operations +04131_prometheus_query_parser +04132_column_sparse_ops +04133_group_array_variants +04134_single_value_data_complex_types +04136_window_functions_frame_bounds +04137_conversion_functions_edges +04138_higher_order_lambda_functions +04139_aggregate_function_states +04141_array_lowcard_arithmetic_monotonicity +04141_divide_by_zero_constant_monotonicity +04141_fuzz_query_max_query_length +04141_generate_random_engine_argument_order +04141_h3_polygon_to_cells_with_containment +04141_kql_floor_single_arg +04141_system_instrument_remove_no_args +04141_system_sync_replica_if_exists_missing_db +04141_text_index_alias_lambda_with_constants +04141_variant_low_cardinality_version_only_keys +04142_array_low_cardinality_version_only_keys +04142_executable_storage_settings_coverage +04142_position_huge_start_pos +04143_if_decimal_int_literal_jit +04143_skip_index_after_alter_modify_column +04143_ub_parsing_datetime +04144_filter_union_all_no_group_by +04144_low_cardinality_map_wrong_value_nonadaptive +04145_consistent_lambda_alias_paren_round_trip +04145_extract_plain_ranges_relaxed_not_in +04145_h3_polygon_to_cells_invalid_type +04145_minmax_block_number_offset_part_pruning +04145_system_commands_coverage +04145_vertical_merge_wide_rows_small_block_size +04146_analyzer_group_by_const_grouping_sets_struct +04146_array_fold_lowcardinality_nonconst +04146_hashed_array_dictionary_shards_update_field +04146_ipv6_hashing_distinct_values +04146_max_bytes_ratio_before_external_join +04146_merge_tree_mutations_cleanup_truncate_drop_partition +04146_merge_tree_optimize_row_order_if_no_order_by +04146_minmax_block_number_upgrade +04146_obfuscate_query_known_identifiers +04146_parser_system_query_lightweight_from_and_filesystem_cache_offset +04146_settings_float_overflow +04146_short_circuit_evaluation_for_nulls +04146_spilling_hash_join_low_threshold +04146_system_instrument_add_invalid_argument +04146_timeseries_attach_detach +04146_to_hour_monotonicity_dt64_timezone +04146_to_millisecond_negative_datetime64 +04146_tuple_duplicate_element_names +04146_validate_nested_types_setting_bypass +04147_alias_table_engine_non_experimental +04147_minmax_block_columns_require_enable_settings +04147_sparse_column_coverage +04147_system_instrument_add_argument_out_of_range +04148_key_condition_safe_cast_coverage +04148_minmax_block_number_offset_in_index_table +04148_stid_3520_3e11_materialized_cte_outer_alias +04149_minmax_block_number_partition_filtering +04149_msan_join_optimizer_non_deterministic_filter +04150_generate_random_types_coverage +04158_unique_key_optimize_rejected +04159_unique_key_ttl_rejected +04160_unique_key_backup_rejected +04161_geometry_constant_folding_variant_discriminator +04161_null_subcolumn_after_metadata_only_nullable_alter +04161_unique_key_insert_duplicate +04201_action_name_lowcardinality_args +04201_alter_materialized_view_modify_sql_security_invoker_error +04201_analyzer_self_join_group_by_expr +04201_argMinMax_nullable_wide_numeric +04201_array_index_of_count_equal_nullable_value +04201_array_shift_insert_many_from_specializations +04201_attach_table_missing_database +04201_columns_cache_rename_column +04201_consecutive_keys_nullable_findkey +04201_consistent_format_aliased_tuple_and_window_offset +04201_direct_join_type_mismatch_rocksdb +04201_dot_product_const_nonconst_size_mismatch +04201_force_null_for_omitted_jsoncolumns +04201_hashed_array_dictionary_invalid_backlog +04201_int_div_or_zero_decimal_with_date +04201_inverse_dictionary_lookup_edge_cases +04201_is_prime +04201_join_runtime_filter_min_probe_rows +04201_json_extract_keys_and_values_low_cardinality_input +04201_low_cardinality_multiple_dicts_single_mark +04201_merge_tree_part_info_legacy_max_level +04201_minmax_index_for_pointinpolygon_with_holes +04201_morton_encode_zero_rows_branch +04201_read_in_order_limit_with_filter +04201_refreshable_mv_to_inner_uuid_rejected +04201_rocksdb_direct_join_using_type_mismatch +04201_set_index_in_subquery_disabled_fallback +04201_stid_3760_nested_coalesce_skip_index_disjunction_oob +04201_storage_join_restore_order_after_attach +04201_summing_merge_tree_block_offset +04201_time_series_selector_join_stateful +04201_to_millisecond_negative_datetime64 +04201_too_many_optimizations_window_array_join +04201_too_negative_max_execution_time_setting +04201_virtual_column_override_where_filter +04202_analyzer_identifier_cache_literal_in +04202_array_dot_product_combine_overflow +04202_clamp_multirow_mixed_branches +04202_cte_with_sample +04202_inverse_dictionary_lookup_pruning_key_condition +04202_jemalloc_jit_arena_metrics +04202_linestring_multirow_wkt +04202_move_partition_to_non_mergetree +04202_move_partition_to_table_too_many_parts +04202_offset_with_scalar_subquery +04202_parsedatetime_or_null_zero_post_instruction_errors +04202_percent_rank_invalid_frame +04202_projection_prewhere_materialize +04202_prometheus_query_datetime64_nanosecond_modern_timestamp +04202_regexp_position +04202_reserved_user_name_jwt_marker +04202_set_default_preserves_max_threads_auto +04202_storage_fuzzquery_engine +04202_variant_adaptor_all_incompatible +04202_variant_basic_mode_only_nulls +04203_analyzer_having_non_aggregate_compat +04203_gcd_codec_real_compression_path +04203_jemalloc_mergetree_arena_metrics +04204_crosstab_variant_merge +04204_distinct_outside_cte_103785 +04204_empty_unicode_quoted_identifier_syntax_error +04204_lower_upper_utf8_large_buffer +04204_mergetree_arena_routes_writes +04204_polygon_dict_bytes_allocated +04204_rocksdb_optimize_unsupported_modifiers +04205_field_visitor_convert_to_number_ubsan_103817 +04205_jit_decimal_cast_branches_parity +04205_top_k_dynamic_filtering_variable_length +04206_direct_join_merge_tree_column_order +04206_tuple_string_compare_nested_nullable_inference +04207_alias_map_arrayelement_subcolumn +04207_cld2_msan_oob_read +04207_cross_join_starts_with_memory +04207_drop_partition_integer_overflow_date +04207_lazy_final_prewhere_is_deleted_null_deref +04207_parquet_metadata_cache_local_file +04207_schedule_merge_basic +04207_top_k_through_join +04208_schedule_merge_disabled +04208_top_k_through_join_safety +04209_column_name_matching_mode_default +04209_extractAll_nullable +04209_rank_dense_rank_no_arguments_49526 +04209_statistics_retry_load +04209_top_k_through_join_read_in_order_gate +04209_values_keyword_column_subscript +04210_alter_clear_column_nested_tuple_89537 +04210_consistent_format_subquery_paren_round_trip +04210_dict_get_or_null_nullable_key_no_corruption +04210_intdiv_array_nullable +04210_show_remote_databases_in_system_tables +04210_skip_index_on_data_read_leaf_limit +04210_top_k_through_join_right_join_deferral +04211_uuid_parser_strict_validation_86714 +04212_aggregate_projection_sumif_in_set +04212_cast_datetime_keep_timezone +04212_file_table_function_array_argument +04212_internal_async_flush_counters +04212_settings_bool_out_of_range_float +04212_system_functions_arity_determinism +04213_array_join_low_cardinality_unaligned +04213_optimize_trivial_group_by_limit_query +04214_create_function_normalized_union_query +04214_trivial_group_by_limit_threads +04215_91595_uniq_theta_intersect_empty_state +04215_trivial_count_with_sparsity_filter +04216_materialized_view_reused_target_name_dependency +04216_skip_index_disjunction_nested_coalesce +04217_array_concat_json_extract_keys_index +04217_arrayjoin_set_index_lowcardinality_70058 +04217_create_table_as_with_settings +04218_avro_confluent_extra_coverage +04218_format_readable_precision +04218_partition_pk_pruning_constants_folding +04218_running_accumulate_state_uaf +04219_explain_plan_pretty_default +04219_partition_minmax_skip_index_constants_folding +04220_arrayjoin_after_sort_with_limit +04220_partition_id_constants_folding +04221_dictgetordefault_arrayjoin_80703 +04221_optimize_use_normal_projection_with_sorting +04221_partition_id_with_minmax_constants_folding +04222_prewhere_final_replacing_86268 +04223_text_index_direct_read_like_90802 +04224_special_columns_prewhere_final_91849 +04225_row_policy_groupby_final_91946 +04226_rls_projection_filter_not_in_select_94789 +04227_case_with_expression_array_result_78352 +04227_create_or_replace_refresh_mv +04227_inconsistent_ast_function_lambda_after_comma_104605 +04227_materialized_cte_reused_with_in_subquery +04227_prewhere_parameterized_view_join_102074 +04228_materialized_cte_nested_in_subquery_pk +04228_row_policy_view_join_analyzer_102651 +04229_anyheavy_sparse_defaults +04229_attach_partition_implicit_primary_key +04229_bit_rotate_determinism +04229_defer_partition_pruning_after_final +04229_implicit_minmax_block_number_offset_basic +04229_lazy_concurrency_control_insert_with_mv +04229_lower_utf8_turkish_expansion +04229_memory_mutation_timeout_break +04229_numeric_indexed_vector_scalar_uint64_overflow +04229_row_order_optimize_unsupported_nested_types +04229_top_k_through_join_collation +04229_trivial_group_by_limit_profile_events +04229_untracked_memory_async_metric +04230_columns_cache_rename_and_add_same_statement +04230_implicit_minmax_block_number_offset_mutations +04230_length_nullable_fixed_string +04230_top_k_through_join_join_swap_gate +04231_concat_with_separator_nullable_lc +04232_round_down_nan_determinism +04234_aggregation_in_order_limit_pushdown # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +04234_check_table_json_wide +04234_direct_join_nullable_left_rocksdb +04234_filter_push_down_const_null_union +04234_format_query_from_json_identifier_case +04234_non_constant_rhs_in +04234_partitioned_group_by +04234_set_alias_compatibility_tracking +04234_top_k_through_join_final_desc_gate +04234_transform_const_default_cast +04234_where_and_low_cardinality_nullable_constant_104393 +04235_create_or_replace_source_table_view_dependencies +04235_format_query_from_json_string_array_validation +04235_moving_impl_multiply_self_merge_uaf_0988_2212 +04235_streaming_queries_distinct_in_order +04235_streaming_queries_sparsity_stream_skips_trivial_count +04235_streaming_queries_text_index_direct_read +04235_string_vs_const_fixedstring_comparison +04236_format_query_from_json_use_assignment_validation +04236_ifnull_if_fixedstring_string_trim +04236_merge_with_alias_missing_target_104740 +04238_attach_timeseries_external_metrics +04238_clone_as_select_rejected +04238_columns_cache_rename_and_add_same_signature +04238_group_concat_second_arg_preserves_limit +04238_md5_multi_buffer +04238_storage_alias_missing_target_merge +04239_consistent_format_in_alias_nested_1941_1bfa +04240_bfloat16_string_compare +04240_clear_column_special_merge_required_columns +04240_consistent_hash_bigint +04240_exchange_tables_drops_mv_source_dependencies +04240_intexp2_jit_overflow +04240_jit_float_to_big_int_libcalls +04240_json_extract_invalid_time_string +04240_statistics_countmin_numeric_types +04241_alias_array_to_string +04241_alias_cardinality +04241_alias_regexp_substr +04241_alias_stddev +04241_alias_string_agg +04241_alias_unnest +04241_any_all_on_arrays +04241_date32_week_overflow +04241_date_part_as_extract +04241_format_query_from_json_required_fields +04241_get_server_setting_live_values +04241_inconsistent_ast_codec_tuple_paren_round_trip_1941_1bfa +04241_join_runtime_filter_shared_fixed_hash_table +04241_parameterized_view_used_twice +04241_rename_table_mv_source_dependencies +04242_dict_clickhouse_source_backslash_key +04242_enum_contains_numeric_name +04242_projection_implicit_minmax_via_settings +04242_query_condition_cache_topk_collate +04242_space_filling_curve_encode_non_const_mask +04244_loop_remote_group_by_chunk_info_104863 +04247_attach_table_storage_clauses_without_engine_error +04248_97771_lazy_materialization_alias_invalid_chunk +04249_packed_skip_indices_round_trip +04249_query_condition_cache_fine_grained_granules +04249_text_index_lazy_all_duplicate_tokens +04251_packed_skip_indices_weird_names +04251_stid_2635_empty_pipe_reverse_order +04252_packed_skip_indices_setting_change +04252_storage_alias_query_log_views +04253_global_in_tuple_duplicate_columns +04253_packed_skip_indices_drop_name_prefix +04254_memory_apply_patches_no_op +04254_packed_skip_indices_setting_expansion_mutation +04255_packed_skip_indices_contraction_mutation +04255_stringsearcher_utf8_invalid_needle +04256_105207_detach_dictionary_permanently_dep_check +04256_99959_left_anti_join_right_key_default +04256_arrayRemove_variant_no_throw_on_mismatch +04256_extremes_transform_partial_populate_on_exception +04256_min_max_mapped_arrays_nan_consistent +04256_packed_skip_indices_layout_transitions +04256_reinterpret_array_lowcardinality +04256_system_tables_materialized_view_target +04256_text_index_lazy_apply_with_patterns +04257_aggregation_in_order_mismatch +04257_intersect_empty_input +04257_packed_skip_indices_text_excluded +04257_replace_temporary_table_must_exist_102924 +04257_system_constraints +04257_text_index_lazy_profile_events +04258_except_empty_left_input +04258_packed_skip_indices_long_name_prewarm +04258_set_skip_index_float_where_issue_105355 +04258_text_index_lazy_intersect_heap +04259_case_with_expression_null_equals_null_101262 +04259_count_distinct_optimization_nullable +04259_cte_subquery_dot_column_leak +04259_dictgetordefault_nullable_default_short_circuit +04259_interpolate_with_fill_limit_by +04259_limit_by_array_join_replicated +04259_materialized_cte_fuzzer_bug +04259_prewhere_after_pushdown +04259_range_signed_overflow +04259_skip_index_set_ngrambf_or +04259_window_partition_by_dynamic_variant_validation +04260_case_with_expression_lowcardinality_nullable_105556 +04260_cast_keep_nullable_dynamic +04260_detach_permanently_referential_dep_check +04260_dynamic_subcolumn_compressed_memory +04260_json_empty_as_default_yield_strings +04260_variant_null_insert_values_format +04261_nested_dynamic_variant_in_minmax_aggregate +04261_text_index_partial_mark_read +04262_uniq_state_or_null_with_rollup +04263_single_value_or_null_merge_state +04264_variant_throw_on_type_mismatch_execute +04264_variant_throw_on_type_mismatch_value_error +04265_histogram_unsorted_input +04265_to_string_nullable_timezone_null_value +04266_datetime_out_of_range_clamping +04266_decimal_parsing_ubsan_stid_0937_2022 +04266_min_max_by_aliases +04266_partition_by_function_of_subcolumn +04266_quantile_fuse_name_mapping_complete +04266_statistics_basic_prewhere +04266_ttl_with_subcolumn_expression +04267_alias_create_query_without_columns +04267_array_distance_mixed_types +04267_clear_column_explicit_summing_columns_to_sum_105782 +04267_estimate_compression_ratio_window_accumulation +04267_flamegraph_int64_min +04267_limit_by_in_order_sparse_serialization +04267_mergeTreeCodecBlockCounts_basic +04267_mongodb_empty_collection_crash +04267_on_fly_mutation_lc_passthrough_conversion +04267_orc_in_subquery +04267_parquet_in_subquery +04267_values_template_tuple_size_mismatch +04268_array_distance_simd_coverage +04268_bool_partition_alter +04268_cast_keep_nullable_variant +04268_json_extract_typed_path_default_values +04268_mergeTreeCodecBlockCounts_alter +04268_mongodb_dictionary_empty_collection +04268_on_fly_mutation_delete_modify_chain +04268_time_series_tags_to_map +04269_bitmap_contains_type_range +04269_mergeTreeCodecBlockCounts_compact +04269_nullable_json_null_subcolumn +04269_time_series_metric_type_to_suffixes +04270_mergeTreeCodecBlockCounts_per_substream +04272_89802_set_index_mv_nullable_column_type +04272_create_table_to_inner_uuid_without_engine +04273_uniq_state_or_null_rollup_consumers +04274_105649_if_partial_result_canUnsignedBeSigned_variant +04274_105650_isNotDistinctFrom_string_group_by +04275_104781_qcc_prewhere_skip_index_attribution +04275_105738_left_anti_join_where_projection +04275_aggregator_const_keys_prefetch_msan +04276_create_view_param_db_with_param_select +04276_function_dict_get_keys_edge_cases +04277_distr_in_negative_array +04277_iceberg_hash_unsupported_wide_types +04277_merge_read_in_order_with_prewhere +04277_text_index_function_like_escape +04278_105827_left_join_on_false_null_filtering +04278_codec_t64_estimate_compression_ratio +04278_distributed_filter_pushdown_table_function +04278_function_session_user +04278_interpolate_empty_with_sorting_prefix +04278_parallel_replicas_coordinator_mode_collision +04278_sparsity_nullable_correctness +04279_array_join_nested_prefix_with_alias_column +04279_fold_filter_through_materialize +04279_projection_zero_row_rebuild_no_orphan +04279_sparsity_persist_exact_num_defaults +04280_udf_normalizer_dangling_source_columns +04285_sparsity_decimal_lossy_constant +04290_set_index_is_true_false_unknown +04292_primary_key_like_escape_bug105885 +04295_04278_materialized_cte_in_union_runtime_set +04295_105912_modify_column_to_nullable_with_statistics +04295_105916_intersect_except_format_union_parens +04295_set_skip_index_or_lc_nullable_issue_105938 +04295_system_instrument_format_arguments +04296_part_level_min_max_in_partitioned_projection +04296_system_instrument_sleep_invalid_arguments +04299_alter_column_null_modifier +04299_analyzer_identifier_cache_scalar_in_node_reuse +04299_at_time_zone +04299_constraint_subst_correlated_subquery_root +04299_key_condition_not_positive_monotonicity +04299_limit_by_collation +04299_localtime_localtimestamp_aliases +04299_mvt_encode +04299_table_engines_documentation +04300_analyzer_identifier_cache_context_correctness +04300_dedup_subtrees_on_filter_merge +04300_mvt_clip +04301_virtual_row_per_block_wide_partial_granule +04302_alter_segments_partition_validation +04303_cross_join_reorder_restriction +04303_ddsketch_bin_key_validated_on_insert +04303_extract_timezone_hour_and_minute +04303_join_runtime_filter_query_condition_cache +04303_key_condition_ifnull_coalesce_boolean +04303_read_in_order_memory_issue_52624 +04303_stid_3993_36c1_optimize_partition_time_column +04303_stid_4697_4326_mutation_exists_column_identifier +04303_text_index_function_multiSearchAny +04304_extract_from_interval +04304_lazy_crash_2 +04304_limit_after_until_settings_limit +04304_prewhere_statistics_column_grouping +04304_primary_key_is_true_false_unknown +04304_text_index_function_multiMatchAny +04305_adaptive_codec_default_merge +04305_aggregate_function_combinators_documentation +04305_any_join_dry_run_in_anti_conversion +04305_array_distance_bfloat16 +04305_ast_fuzzer_skips_backup_restore +04305_constraint_const_substitution_correlated_subquery +04305_create_handler_basic +04305_database_engines_documentation +04305_date32_pre_epoch_monotonicity +04305_dictionary_layouts_documentation +04305_distributed_shuffle_join_type_mixed +04305_dpsub_outer_join +04305_formats_documentation +04305_lwd_merge_projection_rebuild +04305_mutation_in_subquery_column_identifier +04305_regexp_extract_no_capture_group +04305_rfmt_remove_unused_columns_duplicated_filter_outputs +04305_rfmt_remove_unused_columns_duplicated_filter_outputs_2 +04305_storage_join_composite_keys +04305_text_index_match_fold_required_into_alternatives +04305_time64_to_time_datetime_cast +04306_data_skipping_index_types_documentation +04306_date32_upper_overflow +04306_dictionary_sources_documentation +04306_distributed_aggregation_correctness_guards +04306_h3_polygon_to_cells_multipolygon_cap +04306_keycondition_nan_equality +04306_sip_hash_keyed_empty_array +04307_ast_json_roundtrip_lossless +04307_datetime64_pre_epoch_subsecond_monotonicity +04307_disk_types_documentation +04307_distributed_read_error_terminates +04307_limit_after_large_mt +04307_text_index_function_multi_search_match_validation +04308_ast_json_validation_hardening +04308_date32_pre_epoch_part_pruning +04308_distributed_totals_not_distributed +04308_on_fly_mutation_filtered_update_chain +04308_regexp_extract_vector_constant_oob +04308_text_index_function_multiMatchAny_regex_cases +04309_distributed_aggregation_persisted_exchange +04310_any_join_not_ready_set_wrong_results +04311_system_tables_skipping_indices_types +04311_text_index_non_utf8_needle_no_prune +04312_array_dot_product_bfloat16 +04312_asterisk_like_ilike +04312_grace_hash_vs_hash_join_key_types +04312_in_order_aggregation_inconsistency +04312_limit_with_ties_collation +04312_partition_constants_folding_eval_error +04312_reverse_key_obsolete_setting +04312_text_index_lazy_segment_cache_reuse +04313_limit_by_sorted_prefix_key +04313_partition_constants_folding_column_name_collisions +04314_limit_by_const_key +04314_partition_constants_folding_derived_key +04315_cnf_substitute_columns_no_descend_into_subquery +04316_106082_scalar_subquery_equality_loses_row +04316_array_join_nested_prefix_non_array_sibling +04316_chinese_tokenizer_text_index +04316_fix_scatter_buffer_reuse_window +04316_reader_executor_basic +04316_sparse_pk_index_analysis_truncation +04317_106083_mergetree_order_by_limit1_equality +04317_sparse_pk_index_analysis_space_filling_curve +04318_arrayjoin_after_sort_with_limit_by +04318_polygon_dict_nan_inf_coordinates +04318_scalar_subquery_in_tuple +04318_sparse_pk_index_analysis_last_mark_null +04319_106573_minmax_count_projection_partition_key_group_by +04319_array_norm_bfloat16 +04319_asof_join_parallel_hash +04319_base58_respects_time_limit +04319_dict_get_keys_vector_null_nan_consistency +04319_distributed_plan_set_operation_const_columns +04319_merge_tree_optimize_row_order_explicit_opt_out +04319_optimize_limit_by_function_keys +04319_query_parameter_as_function_name +04319_sparse_pk_index_analysis_const_false +04319_timeseries_two_stacks +04319_timeseries_window_memoization +04319_timeseries_window_splits_step +04320_arrayjoin_no_sort_limit_pushdown +04320_ast_json_review_hardening +04320_columns_cache_on_fly_mutations +04320_default_compression_codec_recompress_ttl +04320_distributed_plan_read_rejects +04320_obfuscate_query_cache_nondeterministic +04320_optimize_injective_functions_in_limit_by +04320_parser_system_background_controls +04320_total_uncompressed_bytes_mergetree_metric +04321_array_join_clause_limit_pushdown +04321_distributed_plan_count_implicit_projection +04321_optimize_limit_by_keys_combined +04322_105501_correlated_materialized_cte_in_subquery +04322_memory_mutate_no_op_commands_2380_3043 +04322_optimize_limit_by_variant_dynamic_keys +04323_avro_schema_registry_retry_settings +04323_multi_if_asterisk_table_function +04323_optimize_limit_by_with_group_by_modifiers +04324_if_const_nothing_no_logical_error +04324_jit_in_scalar_subquery_stack +04324_nested_asterisk_ilike_join_rewrite +04324_optimize_function_keys_non_deterministic +04324_parse_datetime_non_ascii +04324_read_in_order_virtual_row_union +04324_regexp_required_substring_escape_106382 +04324_sip_hash_keyed_varying_key_arrays +04324_summap_custom_named_summable +04325_decode_html_component_expanding_entities +04325_or_join_keys256_merge +04325_sparsity_float_negative_zero_excluded +04325_sql_json_functions_with_dynamic_input +04326_adaptive_codec_mixed_block_read +04326_aggregation_two_level_decision +04326_ast_json_update_parameterized_table +04326_create_or_replace_size_check_pre_flight +04326_limit_offset_settings_via_subquery +04326_negative_limit_redundant_sort +04326_reject_create_index_granularity_zero +04326_sparsity_enum_defaultness +04326_text_index_empty_part_marks_prewarm +04327_106948_minmax_skip_index_nan +04327_107032_like_without_wildcards_pk_range +04327_adaptive_codec_explicit_default +04327_allow_lossy_numeric_supertype +04327_array_levenshtein_weighted_overflow +04327_array_resize_decimal_size +04327_ast_json_dml_output_options +04327_compare_substrings_out_of_range_offset +04327_correlated_subquery_duplicate_column_join +04327_data_type_families_documentation +04327_distributed_plan_local_log_formatted_queries +04327_encrypt_decrypt_constant_key_no_iv +04327_enum_value_out_of_range +04327_geohashesInBox_const_mix_and_bfloat16 +04327_group_by_use_nulls_exact_key_comparison +04327_inconsistent_ast_aliased_lambda_under_operator_1941_1bfa +04327_join_on_nothing_typed_residual +04327_join_runtime_filter_fingerprint_collision +04327_join_runtime_filter_json +04327_json_array_element_escape_dots +04327_key_condition_multi_atom_datetime_operators +04327_lazy_materialization_topk_filter_column_position +04327_lc_nullable_partition_key_minmax_idx +04327_like_constant_haystack_nonconstant_needle +04327_materialized_cte_in_recursive_with +04327_mv_squash_parallel_inserts_visited_views +04327_nullable_partial_sort_limit_equal_ranges +04327_packed_composite_key_join +04327_parquet_v3_prewhere_shared_intermediate +04327_quantile_tdigest_date_no_overflow +04327_reader_executor_metrics +04327_recursive_cte_qualified_matcher +04327_round_down_nan_boundaries_104877 +04327_single_argument_or_in_join_on +04327_stid_1499_6033_statistics_lc_cast +04327_summing_merge_tree_tuple_dotted_name_vs_key_column +04327_trim_long_characters +04327_union_branch_const_header_mismatch # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +04327_variant_map_statistics_merge_discriminator +04327_wait_timeout_chrono_overflow +04328_106533_partition_pruning_nan_inversion +04328_adaptive_codec_none_selection +04328_key_condition_multi_atom_string_key +04328_low_cardinality_single_key_join +04328_set_index_variant_low_cardinality +04328_sparsity_big_integers +04328_summing_merge_tree_tuple_array_not_fake_map +04328_union_branch_sparse_header_mismatch +04329_adaptive_codec_projection +04329_key_condition_multi_atom_relaxation_safety +04329_key_condition_variant_low_cardinality +04329_like_fixedstring_constant_match_everything +04329_or_join_packed_key_merge +04329_tuple_element_aggregation_reject_nullable_tuple +04330_join_disjunctions_pushdown_using_type_mismatch +04330_join_global_left_semi_chunk_consistency +04330_key_condition_multi_atom_deterministic_transforms +04330_show_policies_format_clause +04330_tuple_element_aggregation_disabled_by_default +04331_coalescing_merge_tree_nested_map +04331_key_condition_multi_atom_in_sets +04331_mergeTreeCodecBlockCounts_nested_subcolumns +04332_key_condition_multi_atom_type_normalization +04332_summing_merge_tree_tuple_leaf_column_name_collision +04333_coalescing_merge_tree_key_tuple_element +04333_key_condition_multi_atom_curves_polygon +04334_cascades_paste_join +04334_key_condition_multi_atom_partition_pruning +04334_tuple_element_aggregation_alter_validation +04335_analyzer_identifier_cache_clone_on_retrieval +04335_arrow_memory_limit_error_code +04335_create_table_sql_security_unsupported +04335_group_by_use_nulls_constant_key_source_expression +04335_grouping_function_group_by_use_nulls +04335_join_using_dynamic_key_aggregate +04335_key_condition_multi_atom_skip_indexes +04335_packed_composite_key_set +04335_storage_join_right_join_const_conjunct_pushdown +04335_summing_merge_tree_tuple_map_in_sorting_key +04336_key_condition_multi_atom_consumers +04336_storage_join_low_cardinality_read +04337_array_similarity_zero_weights_sum +04337_ast_json_typed_child_hardening +04337_cross_left_join_transitive_predicates +04337_encrypt_decrypt_block_modes +04337_key_condition_multi_atom_no_lost_pruning +04337_low_cardinality_nested_function_fast_paths +04337_obfuscate_as_expression +04337_optimize_function_keys_shared_non_deterministic +04337_point_in_polygon_preprocessed_cache +04337_prometheus_query_nan_timestamp +04337_recursive_cte_inner_ref_no_logical_error +04337_rewrite_aggregate_function_with_if_respect_nulls +04337_s3_hive_partition_id_compatibility_validation +04337_top_k_skip_index_lightweight_delete +04337_ttl_aggregate_function_column_reject +04337_tuple_inside_nullable_subcolumn_shared_cache +04337_variant_to_column_inplace_mutation +04338_04305_values_non_column_argument_logical_error +04338_accurate_cast_or_null_dynamic_tuple +04338_async_insert_current_user +04338_changedate_datetime64_scale_array_push +04338_columns_cache_write_estimate_prewhere +04338_has_map_dynamic_key_lowcardinality_arg +04338_obfuscate_int64_min_keeps_sign +04338_on_fly_mutation_read_overwritten_lc_source +04338_prewhere_after_pushdown_file +04338_query_construction_settings_subqueries +04338_replace_partition_no_resurrect_after_restart +04338_s3_duplicate_key_value_argument_bad_arguments +04338_statistics_countmin_estimate_type_mismatch +04338_text_index_codec_setting_change_merge +04338_tuple_inside_nullable_null_carrying_elements +04338_window_funnel_deserialize_event_bounds +04339_105356_nullable_tuple_subcolumn_sort_order +04339_aggregation_in_order_limit_filter +04339_analyzer_rand_constant_resolution_cache +04339_ast_json_review_followup_hardening +04339_chinese_tokenizer_rune_encoding +04339_columns_cache_multi_range_task +04339_deltaSumTimestamp_signed_types +04339_in_subquery_partition_pruning_not_ready_set +04339_obfuscate_inner_query_result_limits +04339_text_index_block_size_zero_rejected +04339_virtual_row_prefetch_filtered_out +04340_any_join_not_ready_set_null_in +04340_chinese_tokenizer_factory_in_functions +04340_intdiv_variable_constant_monotonicity +04340_orc_fast_decoder_char_overflow +04340_rapidjson_memory_tracking +04340_set_index_row_policy_const_folded_function +04341_analyzer_identifier_cache_shared_expression_mutation +04341_broken_mutation_part_log_flush +04341_cascades_constant_in_no_subquery +04341_distributed_plan_join_function_key_type_mismatch +04341_dynamic_mutation_variant_discr_streams +04341_group_format_sparse +04341_join_reorder_imprecise_stats_label +04341_limit_after_with_limit_by +04341_mergeTreeCodecBlockCounts_json +04341_remote_storage_engine_restore +04342_ast_json_create_child_typing +04342_cascades_outer_join_distribution +04342_distributed_plan_read_with_projection +04342_dynamic_mutation_dummy_placeholder_stream +04342_group_format_serialization +04342_inconsistent_ast_move_part_to_shard +04342_join_reorder_aggregation_subquery_imprecise_stats +04342_limit_after_non_selected_columns +04342_parquet_v3_prewhere_intermediate_name_collision +04342_position_caseinsensitive_utf8_low_byte_needle +04342_remote_storage_engine_settings +04343_ast_json_enum_data_type_roundtrip +04343_cascades_view_aggregation_distributes +04343_limit_after_optimizer_guards # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +04343_secret_args_finder_mixed_named_positional +04343_startswith_endswith_caseinsensitive_utf8_empty_needle +04344_ast_json_select_child_typing +04344_lambda_in_non_lambda_argument_position +04344_limit_after_pushdown_guards # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +04344_server_ast_fuzzer_insert_limit +04344_tuple_element_lowcardinality_consistency +04345_ast_json_identifier_and_value_typing +04345_construction_settings_on_write_query +04346_ast_json_original_text_keyword_casing +04347_construction_settings_top_level_no_double_apply +04348_limit_after_until_plan_serialization +04349_construction_settings_from_context +04349_limit_after_union_settings_limit +04350_106533_statistics_pruning_nan_inversion +04350_ast_json_parser_impossible_field_combinations +04350_limit_after_replace +04351_bloom_filter_text_index_like_escape +04351_limit_after_intersect_except_settings +04352_limit_after_union_totals_settings # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +04353_text_index_explicit_tokenizer_argument +04354_limit_after_reject_array_join +04355_text_index_table_settings +04356_compatibility_skips_obsolete_settings +04356_constant_join_right_semi_anti +04356_datetime64_extended_range +04356_format_window_function_in_codec +04356_geojson_geometry_values +04356_key_condition_ifnull_coalesce_boolean_entry_points +04356_limit_after_boundary_non_selected_column +04356_nullable_tuple_type_setting +04356_packed_skip_indices_vertical_merge +04356_partition_minmax_for_primary_key_pruning +04356_threshold_for_parallel_hash_2 +04356_where_field_aggregate_projection_no_prune +04357_analysisOfVariance_deserialize_size +04357_constraint_subst_correlated_subquery_having +04357_join_order_dp_uniqcombined +04357_join_runtime_filter_size_from_hash_table_stats +04357_set_skip_index_lowcardinality_hastoken_like +04357_system_detached_tables_not_implemented # only=tcp: the test drops the current database; over HTTP each later request fails +04357_system_documentation_table +04357_ytsaurus_lookup_settings_table_engine_rejected +04358_geojson_duplicate_geometry_member +04359_geojson_empty_compound_coordinates +04360_geojson_misplaced_geometries_member +04361_geojson_duplicate_feature_type +04362_geojson_duplicate_top_level_type +04363_geojson_misplaced_coordinates_member +04364_geojson_unrequested_unsupported_geometry +04365_bloom_filter_arrayJoin_in +04365_dictionary_lazy_load +04365_lazy_materialization_split_step_oob +04365_materialized_cte_delayed_remote_null_logger +04365_msgpack_empty_fixstr_schema_inference +04365_order_by_lowcardinality_limit_after_join +04365_query_views_log_secrets_masking +04365_token_index_lowcardinality_constant +04366_filter_push_down_limit_by +04367_construction_settings_in_view +04367_lambda_arg_backquoted_dot_no_logical_error +04368_group_array_moving_array_combinator_parameter +04370_distinct_combinator_correlated_subquery_group_by_use_nulls +04401_110037_minmax_index_lowcardinality_nullable_is_null +04401_aggregate_function_deserialize_allocation_bomb +04401_alter_incompatible_default_breaks_attach +04401_arrow_nullable_tuple_flattened_subcolumn +04401_columns_transformer_alias_on_asterisk +04401_date32_zerotransform_monotonicity_pruning +04401_datetime64_range_hashed_dictionary +04401_detect_charset_language_large_input_ubsan +04401_formatDateTime_out_of_range_date32 +04401_format_single_cte_consistent_indent +04401_geojson_ignored_members +04401_geojson_nullable_id +04401_implicit_minmax_block_number_offset_alter_column +04401_intdivorzero_mixed_signed_unsigned +04401_join_by_virtual_column +04401_join_runtime_filter_low_cardinality_nullable +04401_key_condition_is_not_distinct_from +04401_low_cardinality_fixed_string_partition_pruning +04401_low_cardinality_negative_zero_normalization +04401_mutate_all_columns_preserve_skip_index_checksums +04401_nullable_bool_where_count +04401_obfuscate_inner_settings_limit_stable +04401_optimize_aggregators_of_group_by_keys_low_cardinality +04401_orc_timestamp_scale_aware_conversion +04401_parameterized_view_scalar_subquery_in_with +04401_recursive_cte_correlated_subquery +04401_skip_index_on_tuple_subcolumn_with_tuple_element +04401_sparse_pk_index_analysis_unknown_const_false +04401_trim_left_unchanged_fast_path +04401_update_nonexistent_column_error +04402_ast_json_view_targets_duplicate_kind +04402_cascades_task_budget_exceeded +04402_digits +04402_float_parsing_corner_cases +04402_ip_trie_dict_get_single_key_no_tuple +04402_map_functions_lowcardinality +04402_materialized_cte_union_body_in_subquery +04402_modulo_or_null_float_no_fpe +04402_obfuscate_query_cache_default_seed_key +04402_regexp_all_word_boundary_context +04402_remote_storage_engine_insert_table_function +04402_replace_regexp_dot_nl_106830 +04402_similar_to_analyzer_cnf +04402_skip_index_on_variant_subcolumn_with_variant_element +04402_sparse_pk_index_analysis_truncated_isnull +04402_storage_join_emit_non_first_column +04402_text_index_push_ranges_to_analyzer +04403_adaptive_codec_recompress_ttl +04403_dot_product_transposed +04403_naive_bayes_bad_models +04403_obfuscate_datetime_timezone +04403_remote_storage_engine_async_insert +04403_skip_index_on_qbit_subcolumn_with_tuple_element +04403_text_index_push_ranges_first_token_postings +04403_totime64_saturate_clamp +04404_accurate_cast_or_null_dynamic_variant_in_tuple +04404_get_client_http_header_non_deterministic +04404_qbit_int8 +04404_text_index_push_ranges_any_single_token +04405_csv_tuple_leading_null_null_as_default +04405_naive_bayes_memory +04405_obfuscate_integer_type_edge_cases +04405_qbit_int8_distance +04405_qbit_length +04406_naive_bayes_dictionary_lifecycle +04406_obfuscate_datetime_dst_transition +04407_datalake_getcatalog_deprecated_settings_guard +04407_naive_bayes_empty_input +04407_obfuscate_inner_settings_default_reset +04407_quantize_bfloat16_int8 +04408_array_element_with_array_index +04408_ast_json_user_name_with_host_child_typing +04408_create_or_replace_refresh_mv_to_target +04408_datediff_datetime64_overflow +04408_hypothetical_index_partial_read +04408_lazy_materialization_part_offset_prewhere +04408_merged_json_patch_aggregate +04408_naive_bayes_class_id_type +04408_parseDateTimeBestEffort_nullable_regression +04408_query_phase_profile_events +04408_random_hadamard_transform +04408_system_documentation_no_empty_code_blocks +04408_text_index_serialization_version_setting +04409_array_partial_sort_per_row_limit +04409_compact_part_mixed_codec_read +04409_distributed_filter_pushdown_exact_decimal +04409_explain_actions_secret_args +04409_join_use_nulls_inequality_residual +04409_join_with_totals_const_swap # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +04409_map_buckets_key_order_preservation +04409_naive_bayes_class_id_range +04409_system_documentation_source_and_entities +04409_time_series_referential_dependencies +04409_variant_escape_filename_fallback +04410_array_size_subcolumn_shared_buffer_merge +04410_bfloat16_binary_math_functions +04410_join_runtime_filter_mixed_predicates +04410_map_buckets_order_by_and_comparison +04410_xxhash64_spark +04411_block_number_wide_part_mutations +04411_constant_join_combinations +04411_map_buckets_parts_splitter_row_drop +04411_merge_sorting_queue_strategy_correctness +04411_naive_bayes_wrong_dictionary_type +04411_planner_actions_visitor_shared_subexpr_reuse +04411_point_in_polygon_const_cache_key +04411_text_index_multiple_partially_materialized +04411_window_function_self_copy_nested_types +04412_constant_join_algorithm +04412_merge_sorting_queue_strategy_vertical_granularity +04412_naive_bayes_padding +04412_projection_added_column_default +04412_settings_documentation_empty_default +04412_validate_fixed_size_column_huge_granularity +04412_window_transform_skip_materialization +04413_dict_get_keys_const_path_order_consistency +04413_documentation_no_indented_lines +04413_geojson_output_format_row +04413_merge_sorting_queue_strategy_equal_keys +04413_naive_bayes_short_input +04413_partition_disjointness_propagation +04413_window_transform_unchanged_frame_aggregates +04414_distinct_partitions_independently_heuristic +04414_window_transform_cume_dist_peer_groups +04415_distinct_partitions_independently_size_limit +04415_tostartof_datetime64_extreme_overflow +04415_use_legacy_to_time_default +04416_group_by_use_nulls_low_cardinality_constant +04416_groupconcat_tuple_sparse_subcolumn +04416_groups_window_frame +04416_mutate_all_columns_packed_prefix_collision +04416_mutate_all_columns_projection_hardlink +04416_remove_deprecated_snowflake_conversion_functions +04417_naive_bayes_ngrams +04417_numeric_indexed_vector_pointwise_multiply_all_ones +04417_partition_constants_folding_force_settings +04418_naive_bayes_classifier_nullable +04418_numeric_indexed_vector_multiply_zero_integer_bits +04418_partition_constants_folding_minmax_count_projection +04419_99495_limit_with_ties_virtual_row_empty_chunk +04419_naive_bayes_classifier_dependency +04419_numeric_indexed_vector_multiply_all_ones_index_sets +04420_foreach_combinator_zero_size_nested_state +04420_naive_bayes_classifier_dictgetordefault +04421_create_populate_view_alias_precheck +04421_naive_bayes_classifier_deterministic +04422_naive_bayes_tokenization_edge_cases +04423_naive_bayes_classifier_vs_dictget +04425_naive_bayes_lowcardinality_nullable +04426_naive_bayes_oov_ignored +04427_naive_bayes_dictionary_sparse_source +04428_naive_bayes_classifier_null_literal +04430_naive_bayes_codepoint_truncated_utf8 +04488_full_sorting_merge_join_unsupported_strictness +04489_analyzer_final_join_prewhere_pushdown +04489_compact_part_mixed_codec_uncompressed_cache +04489_constraint_comparison_wrong_arity +04489_create_table_as_inherit_engine_and_settings +04489_dot_product_transposed_partial_reads_pass +04489_geo_utm_mgrs +04489_information_schema_mysql_compat_columns +04489_masking_policies_introspection +04489_max_threads_auto_parsing_compat +04489_not_ready_set_inplace_build +04489_optimize_final_all_partitions_at_once +04489_part_starting_offset_in_subquery +04489_qbit_cast_to_array +04489_redundant_comparisons_datetime64_scale +04489_regexp_too_complex_no_crash +04489_uniq_exact_grouping_sets_concurrent_merge +04489_values_float32_conversion_and_in +04489_vector_search_rescoring_lazy_materialization +04490_adaptive_codec_recompress_mutation +04490_any_join_constant_condition_reorder +04490_correlated_exists_zero_column_body +04490_dict_get_keys_float_signed_zero_consistency +04490_geojson_input_geometry_collection +04490_join_any_take_last_row_spilling_hash_join +04490_join_runtime_filters_index_analysis +04490_keycondition_float_pk_no_lossy_prune +04490_obfuscate_markov_order_bounds +04490_parallel_view_processing_values +04490_qbit_stride_subcolumns +04490_qualified_matcher_table_alias_over_column +04490_table_readonly_partition_commands +04490_vector_search_rescoring_prewhere_eligibility +04490_where_field_nullable_key_exact_count +04490_with_fill_interpolate_constant_fill_column +04491_dict_get_keys_const_path_non_coordinator_layout +04491_obfuscate_inner_default_only_reset +04491_qbit_stride_distance +04491_table_readonly_move_partition_to_table +04491_vector_search_rescoring_lightweight_delete_filter +04492_aggregate_partitions_independently_max_rows_to_group_by +04492_ast_json_rename_scalar_coercion +04492_create_or_replace_materialized_view_populate_keeps_subscription +04492_lightweight_delete_filtered_projection +04492_max_insert_threads_auto_default +04492_optimize_and_compare_chain_work_budget +04492_optimize_or_like_chain_embedded_nul +04492_parallel_full_sorting_merge_join +04492_projection_ttl_default_divergence +04492_regexp_pattern_with_nul_byte +04492_schedule_merge_retry_on_busy_pool +04493_ast_json_alter_ttl_select_validation +04493_atomic_populate_materialized_view_features +04493_correlated_subquery_join_runtime_filter_dup_column +04493_float_parsing_in_formats +04493_jit_simple_regexp +04493_lazy_final_prewhere_derived_filter_column +04493_nullable_tuple_schema_inference_arrow_formats +04493_optimize_or_like_chain_match_vectorscan_incompatible +04493_parallel_full_sorting_merge_join_no_shard_cases +04493_qbit_distance_nullable_reference +04493_sqr +04494_aggregating_dimensions_in_sorting_key +04494_ast_json_create_system_identifier_validation +04494_columns_cache_patch_part_write_estimate +04494_jit_simple_regexp_extract_replace +04494_nullable_tuple_schema_inference_avro +04494_qbit_stride_dot_product_transposed +04495_ast_json_nested_uuid_rejection +04495_columns_cache_write_budget_soft_threshold +04495_external_distinct_limits +04495_jit_regexp_drop_compiled_cache +04495_optimize_or_like_chain_fixed_string_enum +04495_qbit_stride_cast_to_array +04495_sort_setting_reject_empty_and_zero_positional +04496_external_distinct_pre_distinct_pass_through +04496_group_by_limit_pushdown_partial_aggregation +04496_optimize_or_like_chain_like_derived_embedded_nul +04497_external_distinct_metrics +04497_optimize_or_like_chain_invalid_escape_skipped +04497_qbit_stride_max_groups +04498_async_insert_dedup_optimize_on_insert_merge_tree +04498_crosstab_variant_to_variant_merge +04498_database_max_tables +04498_external_distinct_set_operations +04498_geojson_precise_float_parsing +04498_join_runtime_filters_multihop +04498_json_extract_cast_string_to_date_time_mode +04498_optimize_or_like_chain_non_deterministic +04498_packed_skip_index_uncompressed_size +04498_parallel_hash_read_in_order_through_join +04498_redundant_comparisons_date_datetime_truncation +04498_sample_ratio_exponent_overflow +04498_tostartof_hour_interval_extreme_overflow +04499_cascades_nondeterministic_single_node +04499_json_extract_precise_float_parsing +04499_key_condition_bare_key_column_multi_atom +04499_redundant_comparisons_lossy_conversions +04499_toStartOfInterval_floor +04499_tostartof_minute_interval_extreme_overflow +04500_cascades_sort_size_limits +04500_key_condition_multi_atom_deterministic_alongside_direct +04500_optimize_or_like_chain_non_utf8 +04500_prewhere_final_nondeterministic_condition +04500_read_in_order_through_partial_merge_join +04500_toStartOfInterval_origin_subscale +04500_wkb_empty_polygon_canonical +04501_dict_get_root +04501_format_local_join +04501_full_sorting_merge_join_shard_stream_divergence +04501_group_by_ttl_block_number_offset +04501_group_by_ttl_infinite_rollup +04501_inner_join_key_column_not_ambiguous +04501_key_condition_null_containing_constant +04501_mutation_materialize_block_number_offset +04501_qbit_cast_between_params +04501_qbit_distance_transposed_nullable_partial_reads +04501_qbit_distance_transposed_truncate_reference +04501_quantize_bfloat16_int8_array_qbit +04502_alter_drop_column_default_with_alias +04502_correlated_subquery_deep_nested_reference +04502_group_by_ttl_materialized_column +04502_group_by_ttl_merge_of_finished_parts +04502_inconsistent_ast_create_index_expr_paren_round_trip +04502_parseDateTime_variable_length_microseconds +04502_qbit_distance_transposed_dynamic_reference +04502_tuple_combinator_state_compatibility +04503_cascades_aggregation_settings +04503_reinterpret_array_to_string +04503_tuple_combinator_multiple_tuples +04504_cascades_topn_exact_rows_before_limit +04504_transposed_distance_quantized +04504_tuple_combinator_respect_nulls +04504_variant_discriminators_cow_safe_rows_offset +04505_distributed_plan_any_scatter_spread +04505_in_function_table_first_argument +04505_json_object_hash_split_invariance +04505_materialize_statistics_on_insert_compatibility +04505_qualified_column_names_in_delete +04505_tuple_combinator_state_variants +04506_csv_float_quoted_bad_value +04506_distributed_plan_window_function +04506_exact_ranges_not_merged_across_seek_gap +04506_geometry_intersect +04506_in_function_array_column_right_argument +04506_lwu_modify_order_by_with_patches +04506_naive_bayes_priors_literal +04506_parallel_single_level_merge_group_by # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +04506_read_in_reverse_order_final +04506_sparsity_fixed_string_empty +04506_tuple_combinator_parallel_merge +04507_array_aggregation_bfloat16 +04507_data_type_name_numeric_roundtrip +04507_dpsub_chained_outer_join_null_side +04507_exclusion_search_max_steps +04507_intersect_except_all_packed_composite_key +04507_json_bracket_subcolumn_collision_guard +04507_lwu_merge_on_key_duplicate_keys +04507_materialized_cte_union_merge +04507_mergeTreeCodecBlockCounts_pushdown +04507_mvt_encode_state_serialize +04507_naive_bayes_source_values_fit_declared_types +04507_parallel_single_level_merge_group_by_limit +04507_sparsity_count_expression_semantics +04507_storage_join_right_direct_read +04507_view_orderby_expression_no_pushdown +04508_connection_reconnect_on_stale +04508_construction_settings_default_reset_in_view +04508_exclusion_search_max_steps_correctness +04508_function_conv_fixedstring +04508_lwu_subcolumn_sorting_key +04508_mergeTreeCodecBlockCounts_patch_parts +04508_naive_bayes_dictionary_checked_at_analysis +04508_parallel_join_with_additional_filter_2 +04508_shared_part_schema_metadata +04509_additional_table_filters_illegal_type +04509_array_comparison_bigger_types +04509_array_sort_numeric_fast_path +04509_backup_to_memory_cleanup_after_error +04509_cascades_distributed_final_lanes +04509_construction_settings_default_reset_union_arm +04509_create_xgboost_model +04509_icu_tokenizer +04509_key_condition_deterministic_transform_unsupported_cast +04509_least_greatest_nullable_variadic +04509_lwu_sorting_key_common_prefix +04509_mergeTreeCodecBlockCounts_row_policy +04509_not_has_function +04509_partition_float32_no_lossy_drop +04509_reverse_key_no_final_mark_pruning +04509_split_by_regexp_tokenizer +04509_system_drop_encryption_headers_cache +04510_bool_numeric_in_containers +04510_clamp_numeric_vectorized +04510_direct_join_merge_tree_prewhere_clone +04510_key_condition_multi_atom_tuple_in_wrapped_set +04510_minmax_block_columns_projection_merge +04510_mutation_query_plan_only_virtual_columns +04510_not_has_function_explain +04510_optimize_and_compare_chain_comparison_domains +04510_small_bitmap_subset +04510_statistics_basic_default_count_survives_merge +04511_array_normalize +04511_bool_json_special_values_gate +04511_cascades_replicated_subplan_join +04511_geometry_discriminators_compatibility +04511_key_condition_wrapped_set_injective_negation +04511_lwu_apply_patches_recalculate_ttl +04511_orc_native_union_type +04511_point_in_polygon_geo_types +04511_projection_part_compression_codec +04511_reverse_nullable_key_no_final_mark_pruning +04511_statistics_basic_variant_dynamic_null_count +04511_uniq_combined_sparse_column +04512_accurateCastOrDefault_nullable_target +04512_arrow_null_slot_garbage_roundtrip +04512_bigquery_table_function_arguments +04512_cascades_trivial_count_sparsity_gating +04512_constraint_on_subcolumn +04512_correlated_subquery_cross_join_aggregate_dedup +04512_eval_table_function +04512_every_database_engine_must_have_documentation +04512_filter_push_down_limit_by_nondeterministic +04512_format_row_no_newline_empty_row_underflow +04512_in_function_array_subquery_right_argument +04512_inconsistent_ast_aliased_in_under_function_arg +04512_lowcardinality_const_key_distributed_merge_aggregation +04512_map_enum_key_subcolumn +04512_materialize_implicit_minmax_index_block_offset +04512_max_bytes_limits_count_string_arena +04512_min_max_aggregation_from_statistics +04512_orc_native_union_branch_hints +04512_orc_native_union_write +04512_pco_codec +04512_point_in_polygon_geometry_type_mismatch +04512_postgresql_regexp_operators +04512_random_hadamard_transform_hartley_9 +04512_shared_null_map_default_implementation_for_nulls +04512_short_circuit_constant_false_join +04512_totime_datetime64_extreme_overflow +04512_wide_type_pair_kernels_via_conversion +04513_array_element_enum_key_map +04513_cascades_two_phase_aggregation_bucket_order +04513_every_data_type_must_have_documentation +04513_lwu_merge_on_key_combine_patches +04513_orc_fast_decoder_obsolete_setting +04513_orc_native_union_integer_targets +04513_pco_codec_gating +04513_pg_catalog_compatibility_functions +04513_prewhere_map_subcolumn_read_cost +04513_prewhere_statistics_cost_ordering +04513_type_pair_matrix_comparison +04514_every_format_must_have_documentation +04514_lwu_merge_on_key_many_patches +04514_mergetree_analyze_indexes_alias_predicate +04514_type_pair_matrix_arithmetic +04515_every_server_setting_must_have_documentation +04515_identity_lowcardinality_tuple_totals # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +04515_orc_native_union_bool_targets +04516_correlated_subquery_return_type_group_by_use_nulls # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +04516_every_compression_codec_must_have_documentation +04516_ie_join_duckdb_countzeros +04516_join_order_estimation_pruned_parts +04516_join_reorder_duplicate_names_merge_expression +04516_orc_native_union_struct_branch_null +04516_projection_part_column_drift +04516_recursive_cte_union_seed +04517_every_aggregate_function_combinator_must_have_documentation +04517_explain_syntax_single_record +04517_ie_join_duckdb_predicate_expressions +04517_lazy_final_join_with_statistics +04518_every_data_skipping_index_type_must_have_documentation +04518_group_by_all_tuple_order_by +04518_ie_join_duckdb_events +04518_type_pair_matrix_comparison_integer_left +04519_every_dictionary_layout_must_have_documentation +04519_ie_join_duckdb_minimal_overlap +04519_type_pair_matrix_arithmetic_signed_wide +04520_every_dictionary_source_must_have_documentation +04520_ie_join_duckdb_projection +04521_every_disk_type_must_have_documentation +04521_ie_join_duckdb_timestamps +04522_every_function_must_have_documentation +04522_ie_join_duckdb_unsupported_shapes +04523_every_table_function_must_have_documentation +04524_create_as_select_temp_cleanup_size_guard +04524_every_table_engine_must_have_documentation +04524_ie_join_read_in_order +04527_cast_resolver_expired_context +04528_ie_join_outer_default_padding +04529_ie_join_outer_vs_oracle +04530_ie_join_duckdb_semi_anti_ranges +04532_ie_join_right_semi_anti_swap +04535_ie_join_band_join +04536_ie_join_operators_vs_oracle +04537_aggregation_in_order_serialized_keys +04537_ie_join_edge_cases +04537_valid_for_interval +04538_datetime64_zerotransform_monotonicity_pruning +04538_delta_codec_decode_roundtrip +04538_eval_construction_settings +04538_join_use_nulls_full_outer_to_inner +04538_lwu_alter_sorting_key_column_type +04538_lwu_nested_multi_subcolumn_validation +04538_materialized_view_comment_implicit_alias +04538_null_safe_cmp_bigger_types +04538_query_cache_normalize_default_settings +04539_enum_string_search_dictionary +04539_ie_join_duckdb_basic +04539_lazy_final_read_in_order_limit_disabled +04539_projection_reject_storage_settings +04539_tonullable_monotonicity_pruning +04539_uniq_combined_fixed_string_no_key +04540_correlated_subquery_cnf_column_count +04540_enum_search_hastokenornull_nullmap_expand +04540_ie_join_duckdb_null_keys +04540_lazy_materialization_final_limit_no_order +04540_packed_part_long_filename_consistency +04540_read_wkt_point_empty +04541_ie_join_duckdb_union_inputs +04542_create_if_not_exists_as_select_skips_create_only_validation +04542_ie_join_float_nan_inf +04543_ie_join_outer_empty_input +04544_array_min_max_nan_zero_bit_pattern +04544_ie_join_detection_negatives +04545_add_days_fixed_offset_time64 +04545_asof_join_constant_condition +04545_base64_decode_padding_leniency +04545_bloom_filter_index_transform_null_in +04545_correlated_exists_right_join_tlp +04545_correlated_subquery_in_set_speculative_build +04545_create_as_select_fast_path_existence_parity +04545_full_join_storage_join_using_nullable_key +04545_full_sorting_merge_join_enum_default +04545_getsubcolumn_json_type_hint_no_crash +04545_grace_hash_join_read_after_cancel +04545_group_bitwise_batch_single_place +04545_group_by_all_rollup_use_nulls +04545_group_by_use_nulls_grouping_sets_const_fold_equals +04545_ie_join_low_cardinality +04545_join_on_uint8_condition_not_boolean +04545_naive_bayes_ngrams_special_columns +04545_negative_limit_distinct +04545_optimize_or_like_chain_aggregate_lhs +04545_parquet_minmax_stats_type_mismatch +04545_prewhere_final_summing_implicit_bool_key +04545_read_wkt_leading_whitespace +04545_set_param_colliding_with_setting +04545_streaming_queries_bounded +04545_throwif_notlike_lowcardinality +04545_totime_key_use_legacy_to_time_mismatch +04545_zxc_codec +04546_constant_join_any_first_row_multiple_blocks +04546_constant_join_compressed_non_joined +04546_constant_join_max_joined_block_bytes_zero +04546_constant_join_replicated_right_column +04546_constant_join_shrink_stored_blocks +04546_constant_join_spill_non_joined +04546_ie_join_type_extremes +04546_injective_functions_in_group_by_modifiers # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +04546_map_element_duplicate_keys_first_match +04546_naive_bayes_ngrams_start_token_only +04546_partial_merge_join_float_nan +04546_qbit_subcolumn_missing_column_default +04546_statistics_simple_batch_single_place +04546_text_index_merge_fsync +04546_ttl_delete_where_recalc_after_update +04547_create_as_select_destination_not_visible_during_populate +04547_ie_join_size_limits +04547_partial_merge_join_multikey_track +04547_read_wkt_point_measure_valid +04548_compact_multi_codec_dedup +04548_distributed_plan_window_parametric_aggregate +04548_ie_join_algorithm_priority +04548_part_storage_type_column +04549_array_comparison_bigger_types_nullable +04549_ie_join_residual_outer_vs_oracle +04549_lowcardinality_shared_dictionary_ownership_validator +04549_text_index_exclusion_search_max_steps +04550_ie_join_residual_semi_anti +04550_single_value_data_string_multi_refill +04551_ie_join_residual_null_and_edges +04551_substreams_cache_ownership_validator_more_paths +04553_ie_join_duckdb_predicate +04555_sqlite_table_function_metadata_without_file +04556_ie_join_detection_strictness_negatives +04557_ie_join_residual_low_cardinality +04558_ie_join_sparse_and_extremes # only=tcp: no extremes in the HTTP RowBinary output +04559_ie_join_keep_presort +04560_ie_join_tuple_dynamic_keys +04560_union_subqueries_in_mutations +04561_ie_join_storage_join +04562_ie_join_anti_bit_boundary +04563_text_index_merge_heterogeneous_children +04600_orc_native_union_timestamp_kinds +04600_system_documentation_full_page_no_synthetic_sections +04601_orc_native_union_struct_projection +04601_valid_for_non_interval_rejected +04601_window_clause_query_parameters +04602_group_by_all_suspicious_types +04602_orc_native_union_nested +04602_parallel_full_sorting_merge_join_fallback_strict_keys +04602_valid_until_pre_1900_rejected +04603_analyzer_compatibility_multiple_joins_qualify_column_names +04603_async_insert_dedup_multi_partition +04603_bit_to_array_big_int +04603_cte_column_aliases_intersect_except +04603_join_using_nested_projection_alias +04603_limit_offset_settings_union +04603_materialize_statistics_on_insert_size_gate +04603_orc_native_union_oversized +04603_projection_part_type_ignores_base_quantize_codec +04603_reservoir_sampler_multiply_total_values_overflow +04603_sz3_codec_non_finite +04603_valid_until_year_zero_rejected +04603_xgboost_experimental_flag +04604_adaptive_aggregator_compaction +04604_negative_limit_with_limit_offset_settings +04604_orc_native_union_string_kinds +04604_qbit_bfloat16_low_precision_centre_fill +04604_reader_executor_min_size +04604_sz3_codec_lorenzo_reg +04604_valid_until_epoch_zero_not_infinity +04605_adaptive_aggregator_thaw +04605_fractional_limit_with_limit_offset_settings +04605_orc_native_union_struct_branch_pruning +04605_valid_until_range_bypass_rejected +04606_adaptive_aggregator_nothing_state +04606_computed_limit_with_limit_offset_settings +04606_valid_until_no_authentication +04607_negative_offset_with_limit_offset_settings +04607_tuple_combinator_respect_nulls_state_name +04608_with_ties_limit_settings_cap +04611_bool_literal_to_string_const_eval +04611_cascades_broadcast_join_keeps_left_partitioning +04611_correlated_subquery_grouping_sets_use_nulls +04611_join_any_take_last_row_auto_algorithm +04611_join_runtime_filters_index_analysis_skip_index +04611_random_hadamard_transform_hartley_truncation +04611_valid_until_method_level_precedence +04612_alp_codec_float32_decimal_ratio +04612_alter_drop_column_alias_in_set +04612_ast_json_projection_where +04612_cascades_join_width_from_column_sizes +04612_constant_join_decorrelated_duplicate_columns +04612_fixedstring_const_string_key_condition +04612_full_sort_join_skip_not_matched +04612_function_replicate_preserves_const +04612_hash_join_right_key_timezone +04612_join_runtime_filters_index_analysis_multi_key_anti +04612_key_condition_nested_cast_lowcardinality +04612_key_condition_pending_alter_lowcardinality_key +04612_left_join_additional_filter_right_any_scatter +04612_random_hadamard_transform_generalized_hartley +04612_reverse_key_index_analysis +04612_table_same_name_as_database +04612_timeseries_version_setting +04612_valid_until_pre_epoch_normalized +04613_and_compare_notequals_chain_null_variant_constant +04613_ast_json_create_variant_clause_ownership +04613_column_ttl_fully_expired_single_column +04613_compatibility_page_limit_offset_not_changed +04613_constant_join_left_anti_short_circuit +04613_constant_sort_keys +04613_create_or_replace_view_over_dictionary +04613_distributed_plan_merge_broadcast_join +04613_estimate_compression_ratio_none +04613_parse_comment_rollback +04613_pipe_operators +04613_row_policy_additional_table_filter_shared_column +04613_system_users_valid_until_datetime64 +04613_variant_constant_folding_distributed +04614_analyzer_view_cte_qualified_identifier +04614_array_fixedstring_ipv6_comparison +04614_ast_json_create_inner_uuid_target_shape +04614_async_insert_dedup_identical_multi_partition +04614_group_by_top_k_array_join_projection +04614_jit_compiled_disjunctive_filter +04614_join_runtime_filter_shared_fixed_hash_table_key_cast +04614_join_runtime_filters_index_analysis_partial_filter +04614_malformed_nested_tuple_type_parser +04614_merge_sorting_queue_strategy_part_offset_projection +04614_ownership_validator_prefix_cache_shared_dictionary +04614_scalar_subquery_in_skipped_table_function_argument +04614_uniq_sparse_no_key +04614_uniq_state_read_merge_roundtrip +04614_utm_to_geo_band_letter +04614_valid_for_ast_traversal +04615_ast_json_optimize_manifest_show_like_where +04615_join_runtime_filters_shared_fixed_hash_table_pruning +04615_lambda_captures_lazy_replication +04615_logsql_dialect +04615_parameterized_view_scalar_subquery_param_ctas +04615_substreams_prefix_cache_map_shared_data_subobject +04616_ast_json_column_type_and_cursor_tree_validation +04616_experimental_codec_in_merge_tree_settings +04616_json_lazy_type_hints_key_safety +04616_map_like_functions_lazy_pattern_replication +04617_ast_json_auto_increment_result_type_pk_slots +04617_read_in_order_virtual_row_front_source_limit +04618_obfuscate_inner_settings_do_not_loosen_outer_limits +04619_streaming_queries_shared_snapshot_strip_race +04620_jit_compile_nothing_argument +04621_toStartOfInterval_subsecond_overflow +04622_datetime_number_quoted_escaping_formats +04622_detach_partition_fsync_part_directory +04623_delete_in_partition_unsupported_storage +04624_obfuscate_union_and_output_settings_query_cache_key +04625_ast_json_drop_optimize_explain_owned_fields +04626_and_compare_chain_nothing_collapsed_and +04626_ast_json_nested_uuid_serialization_rejection +04626_caseinsensitive_long_needle_simd_extend +04626_lwu_sort_key_column_with_default +04626_minmax_block_number_downgrade_merge +04626_mutation_in_partition_query_parameter +04626_right_join_duplicate_left_column_union_all +04626_text_index_flush_settings +04627_analyzer_compatibility_final_all_joined_tables +04627_ast_json_check_optimize_partition_type +04627_direct_join_dictionary_nullable_key +04627_filter_push_down_constant_predicate +04627_mergeTreeCodecBlockCounts_no_substream_marks +04627_obfuscate_positional_arguments_remote +04627_prewhere_final_sorting_key_not_projected +04627_set_index_null_const_no_prune +04627_streaming_queries_unordered +04627_text_index_flush_memory_tracking +04627_timeseries_tf_string_arg_wrappers +04627_trivial_insert_select_max_threads_cap +04628_and_compare_chain_index_hint +04628_ast_json_alter_update_partition_shape +04628_ephemeral_column_type_is_not_masked +04628_join_runtime_filter_reverse_key +04628_json_value_dynamic_multipath_nullable +04628_multistep_prewhere_default_column +04628_qbit_lloyd_max_prefix_centroid +04628_rand_distribution_no_hang +04628_regexp_quoted_datetime_number_full_consumption +04628_secret_args_expression_derived_key +04628_settings_limit_offset_default_union +04628_split_filter_name_clash_header_leak +04628_tolastdayofweek_extreme_daynum_overflow +04628_union_intersect_except_child_format_parens +04629_ast_json_delete_partition_and_alias_identifiers +04629_dynamic_order_by_shared_data +04629_finalize_aggregation_mismatched_state +04629_lwu_patch_parts_mixed_versions +04629_multistep_prewhere_default_column_patch_parts +04629_propagate_predicate_across_equi_join_runtime_filters_nested +04629_rand_binomial_invalid_probability +04630_ast_json_projection_index_expression_list +04630_default_over_virtual_column +04630_prewhere_subcolumn_guard_throwing_expression +04631_ast_json_partition_shape_and_user_names_nonempty +04631_promql_count_subquery_in_range_function +04631_query_condition_cache_topk_compatibility +04631_valid_for_subsecond_interval_rejected +04633_async_insert_select_break_writes_nothing +04635_geometry_variant_local_discriminators +04635_in_tuple_subquery_rewrite_in_to_join +04635_lazy_materialization_gcs_no_etag_pin +04635_orc_native_union_boolean_enum +04635_skip_empty_columns_rename_drop +04636_orc_native_union_numeric_widening +04639_ast_json_wasm_function_arguments_children +04640_ast_json_table_override_list_and_explain_shape +04640_query_log_map_columns_serialization +04641_ast_json_projection_order_by_shape +04641_date32_extended_range_preimage +04641_numeric_to_time_saturation_accurate_cast +04645_refreshable_materialized_view_reject_populate +04647_buffer_dynamic_subcolumn +04647_columns_cache_projection_index +04647_exact_range_unloaded_key_columns +04647_matcher_in_lambda_join_use_nulls +04647_spilling_hash_join_post_build_phase +04647_text_index_lazy_single_posting_segment +04648_count_substrings_utf8_complexity +04648_join_dummy_only_both_children +04648_join_on_constant_null_conjunct +04648_library_dictionary_source_removed +04648_multi_atom_null_and_fixed_string_guards +04648_mutation_statistics_type_mismatch +04648_parameterized_view_non_equals_argument +04648_query_condition_cache_and_chain_split +04648_query_condition_cache_vector_search +04648_timeseries_samples_codecs +04648_tsv_schema_inference_leading_zero_decimals +04648_ttl_group_by_consecutive_keys_optimization +04648_url_secret_masking_forms +04649_atomic_populate_materialized_view_query_local_parallel_replicas +04649_ytsaurus_empty_cypress_path_rejected +04650_materialize_statistics_on_insert_planner_cold_load +04650_min_max_wide_integers +04651_date32_out_of_lut_calendar_normalization +04651_gini_aggregate +04651_intdiv_const_variable_monotonicity +04651_intdiv_const_variable_monotonicity_controls +04651_intdiv_const_variable_monotonicity_decimal_float +04651_intdiv_const_variable_monotonicity_ip +04651_nullable_tuple_lowcardinality_subcolumn_shared_cache +04651_parallel_full_sorting_merge_join_fallback_top_k +04651_rand_binomial_degenerate_probability +04652_column_alias_list_in_view_function +04652_compound_key_monotonicity +04652_datetime_number_variant_try_path +04652_delta_kernel_rs_setting_alias +04652_direct_join_dictionary_sparse_key +04652_enum_constant_vs_string_column +04652_group_by_top_k_pruning_memory +04652_intdiv_ip_key_monotonicity +04652_lazy_materialization_replace_node_header_order +04652_mutation_materialize_block_columns_some +04652_nested_merge_prewhere_type_mismatch +04652_nullable_tuple_element_subcolumn_of_dynamic_variant +04652_part_minmax_block_columns_mutation +04652_pr_plan_based_join_correlated_subquery +04652_prewhere_final_move_skipped_when_deferred +04652_schema_inference_float_parser_parity +04652_system_documentation_settings_history +04652_url_wildcard_index_pages_userinfo +04652_valueless_setting_column_level +04652_wide_integer_to_string +04653_adaptive_aggregator_admission +04653_ast_json_codec_and_statistics_shape +04653_atomic_populate_materialized_view_rollback_on_error +04653_bloom_filter_fixed_string_constant_scalar +04653_group_by_top_k_size_hint_gate +04653_identity_variant_passthrough_type +04653_join_runtime_filters_index_analysis_refiner +04653_mutation_rewrite_stale_part_column_type +04653_parameterized_view_own_name +04653_profile_events_external_sort_read_rows +04653_quantile_deterministic_merge_split_independent +04653_table_function_proxy_prewhere_type_drift +04653_text_index_prewhere_deferred_after_final +04653_valueless_setting_format_roundtrip +04653_values_bool_to_textual_column_native +04654_bloom_filter_array_fixed_string_constant +04654_cast_operator_values_template +04654_create_view_param_db_in_body +04654_lazy_materialization_shadowed_input_name +04654_matcher_in_default_expression +04654_merge_filter_into_join_condition_common_supertype +04654_propagated_disjointness_group_by_limit +04654_quantile_deterministic_legacy_state_version +04654_table_name_length_underflow +04654_text_index_merge_with_empty_part +04654_union_scalar_subquery_in_mutation_predicate +04655_ast_json_dictionary_and_time_interval_required_fields +04655_distinct_partitions_independently_join_pk_sharding +04655_group_by_top_k_boundary_plateau_eviction +04655_valueless_setting_subquery_limit +04656_ast_json_subquery_child_query_shape +04656_distributed_plan_workers_disable_jit_and_skip_index_read +04656_group_by_top_k_in_order_removes_synthetic_sort +04657_cuturlparameter_documented_behavior +04657_explain_estimates_rewrite +04657_group_by_top_k_no_order_by_never_freezes +04657_join_result_row_count_delayed_buckets +04657_lwu_narrowed_key_identity_columns +04657_streaming_queries_unique_key_reject +04657_timespan_setting_out_of_range +04658_streaming_queries_pipeline_teardown_use_after_free +04658_streaming_queries_watermark_query_parameters +04658_text_index_negative_tokens_cache +04658_uniq_variadic_if_no_key +04659_propagate_predicate_across_equi_join_no_primary_key_analysis +04659_storage_join_mixed_on_expression +04660_column_comment_after_modifiers +04660_non_constant_rhs_in_lambda_lhs +04660_random_hadamard_transform_constant_folding +04661_accurate_cast_non_integral_float_to_date_datetime +04662_kafka_num_consumers_attach +04662_view_explain_valueless_setting +04663_setting_boolean_shorthand_in_create_settings +04664_setting_boolean_shorthand_raw_engine_settings +04665_merge_filter_into_join_dynamic_key +04665_obfuscate_unsupported_types +04665_part_minmax_block_columns_after_reload +04665_remote_engine_settings_clause +04665_valueless_query_construction_setting +04666_ast_json_mutation_multiple_partitions +04666_direct_null_in_non_constant_rhs +04666_poco_json_integer_overflow +04666_set_query_parameters_ast_hash +04669_adaptive_codec_vertical_merge +04669_distributed_plan_window_end_preceding_frame +04669_fuse_filter_into_array_join +04669_join_key_no_supertype +04669_point_in_polygon_point_column_primary_key_index +04669_query_condition_cache_lightweight_delete +04670_any_join_take_last_row_no_swap +04670_buffer_no_destination_prewhere +04670_cascades_streaming_queries_gating +04670_make_distributed_plan_in_subquery_baseline +04670_query_condition_cache_unique_key +04671_join_const_propagation_partition_pruning +04671_kql_string_operators +04671_make_distributed_plan_join_to_in_disabled +04671_part_minmax_block_columns_legacy_repair +04672_join_on_array_join_residual +04672_make_distributed_plan_in_subquery_set_delivery +04672_read_in_order_virtual_row_sort_prefix +04673_cross_to_inner_join_non_deterministic +04673_kql_unsupported_is_rejected +04674_key_condition_erased_fixed_string_constant +04674_kql_clickhouse_functions +04680_share_sets_between_mutation_tasks_index_analysis +04691_array_intersect_smallest_argument +04691_intdiv_by_minus_one_minimal_signed +04691_replace_regexp_unmatched_capture_group_ubsan +04691_ttl_expression_rebuild_after_constant_fold +04692_bool_tag_faithful_in_set +04692_functions_to_subcolumns_merge_support +04692_insert_dedup_retry_sparse_tuple +04692_insert_dedup_sparse_serialization +04692_point_in_polygon_point_column_non_lightweight +04692_rewrite_array_filter_length_to_array_count +04692_totime_key_reload_use_legacy_to_time +04693_kql_geo_h3 +04693_point_in_polygon_point_key_index_analysis_modes +04695_analyzer_group_by_use_nulls_matcher_projection_names +04695_date32_field_to_datetime_coercion +04695_enable_experimental_codec_settings +04695_geohashes_in_box_zero_area_value +04695_parallel_single_level_merge_group_by_no_aggregates +04695_spilling_hash_join_memory_spill_scheduler +04695_text_index_postings_read_order +04695_to_string_monotonicity +04695_tuple_element_serialization_version_per_part +04696_enable_experimental_codec_setting_sz3 +04696_grace_hash_honors_max_bytes_before_external_join +04696_quantized_codec_shared_part_metadata +04697_custom_type_name_shared_part_metadata +04697_in_join_limits_are_hard_caps +04698_legacy_join_size_limits_spill_trigger +04700_backup_settings_default_round_trip +04700_merge_temporary_database +04700_set_index_nullable_operand_in_expression +04701_kv_container_key_set_cast +04708_functions_to_subcolumns_file_storages +04711_view_no_subcolumn_optimization +04716_text_index_ipv6_string_constant +04718_workload_ratio_settings_overflow +04719_packed_skip_index_logical_name_collision +04723_virtual_row_interpolate_column_set +04726_streaming_queries_commit_order_snapshot_plan +04727_part_minmax_block_columns_legacy_repair_merged +04730_array_remove_at +04735_ttl_delete_where_shared_time_expression +04738_merge_subcolumn_of_alias_parent +04741_buffer_two_filters_converted_column +04743_buffer_two_filters_converted_column_parquet +04745_join_low_cardinality_wide_int_key +04755_groupconcat_fixedstring +04756_nested_sibling_shared_offsets_prefetch +04757_alter_modify_projection_settings +04757_logsql_format_case +04757_numeric_indexed_vector_index_type_width +04757_optimize_to_date_preimage +04757_part_minmax_block_columns_setting_widened +04757_streaming_queries_parallel_replicas +04758_optimize_date_preimage +04759_array_count_legacy_uint32_result +04759_atomic_populate_materialized_view_rollback_on_runtime_error +04759_single_argument_or_in_join_on +04760_storage_join_composite_key_read +04763_variant_adaptor_cancellation +04766_merge_max_block_size_bytes_below_empty_column_size +04767_array_lexicographic_nothing_element +04770_nested_subcolumn_shared_offsets_continuation +04771_compression_method_hint_case_insensitive +04771_mutation_serialization_info_basic_divergence +04772_system_databases_index_hint_not_ready_set +04773_dotted_nested_null_subcolumn_metadata_alter +04791_lossy_codec_key_column +04792_array_exists_to_has_string_family +04796_create_or_replace_internal_drop_not_ignored +04797_create_or_replace_view_internal_drop_not_ignored +04811_aggregate_functions_timeseries_topk_bottomk_limitk +04811_alter_column_type_with_key_subcolumns +04811_constant_lambda_rhs_in +04811_current_setting_timezone +04811_incremental_refreshable_mv +04811_logsql_subquery_scoping +04811_prewhere_statistics_ordering_compact_parts +04811_prewhere_subcolumn_size_setting +04811_promql_topk_bottomk_limitk +04811_promql_topk_bottomk_limitk_streaming +04811_statistics_part_pruning_nan_negation +04811_text_index_pattern_bypass_cache +04812_alter_modify_projection_settings_index_projection +04812_arrayFlattenedLength +04812_incremental_refreshable_mv_at_least_once +04812_logsql_field_overwrite_and_ranges +04812_merge_alias_in_prepared_set +04812_merge_children_distributed_plan_const_mismatch +04812_multi_atom_injective_key_exact_ranges +04812_nested_member_subcolumn_unrewritten_part +04812_non_constant_rhs_in_non_nullable_element_types +04812_predicate_pushdown_untuple +04812_prewhere_statistics_tautology_last +04812_row_policy_top_k_optimization +04812_tsv_int_leading_zeros +04812_view_if_permitted_else_operator_formatting +04813_allow_statistics_blocks_column_declaration +04813_block_nested_loop_join_routing +04813_eval_union_per_arm_construction_settings +04813_gcd_codec_hash_signedness +04813_non_constant_rhs_in_without_identifiers +04814_block_nested_loop_join_totals # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +04814_gcd_codec_on_negative_integers +04814_non_constant_all_null_tuple_rhs_in +04814_theilsu_window_tiny_entropy +04815_atomic_populate_materialized_view_to_target_rollback +04815_block_nested_loop_join_inner_left +04816_block_nested_loop_join_use_nulls +04816_direct_join_virtual_column +04816_group_by_top_k_abandoned_for_projection +04816_promql_shared_subqueries_materialized +04817_block_nested_loop_join_right_full +04817_constantjoin_replicated_column_use_after_free +04817_filesystem_cache_dashboard_metrics_coverage +04817_logsql_time_offset_and_calendar_rate +04817_time_series_selector_bare_pk_conditions +04817_window_partition_by_aggregate_function_state +04818_block_nested_loop_join_empty_sides +04818_group_by_top_k_desc_evict_only_keeps_heap +04819_block_nested_loop_join_semi_anti +04820_block_nested_loop_join_any +04820_quantile_deterministic_stripe_log +04820_rewrite_in_to_join_prewhere_exists +04821_block_nested_loop_join_spill +04821_kql_datetime_local_utc_and_set_escape +04821_logsql_rate_civil_time_and_transformers +04821_parse_remote_description_long_address +04821_partial_merge_join_build_finalization # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +04821_postgresql_array_position +04822_block_nested_loop_join_overflow +04822_logsql_numeric_filters_time_validation_and_pack +04822_quantile_deterministic_create_as_select +04823_block_nested_loop_join_optimizer_passes +04823_postgresql_array_position_null +04824_cross_type_non_constant_rhs_in +04824_logsql_exact_numbers_and_timestamp_precision +04824_quantile_deterministic_external_aggregation +04824_view_if_permitted_ast_json_shape +04825_block_nested_loop_join_block_size +04825_non_constant_stateful_rhs_in +04825_quantile_deterministic_alter_add_modify_column +04826_block_nested_loop_join_prepared_storage +04826_logsql_rate_intersection_exact_pipes_and_decimal +04826_parallel_insert_sinks_too_many_parts_self_race +04826_runtime_null_lhs_in_heterogeneous_rhs +04827_merge_table_make_distributed_plan_child_plan +04827_tuple_lhs_non_constant_scalar_rhs_in +04828_block_nested_loop_join_retained_blocks +04828_filter_pushdown_input_type_mismatch +04828_fold_filter_masked_secret_hidden +04828_logsql_nested_global_filter +04828_runtime_null_lhs_in_non_constant_rhs +04828_time64_to_datetime_not_monotonic +04828_view_table_function_ast_json_shape +04829_block_nested_loop_join_build_squashing +04829_mixed_type_non_constant_rhs_in +04830_block_nested_loop_join_probe_window +04830_columns_cache_rename_and_add_after +04830_logsql_range_infinities_unroll_rate_avg +04833_injective_plus_minus_type_gate +04833_merge_row_policy_in_subquery +04836_bloom_filter_map_fixed_string_constant +04836_nullable_keys_better_hash_external_merge +04836_parenthesized_definitions_attach_partition_from +04836_tree_hash_ast_identity +04836_trivial_group_by_limit_aggregate_functions +04836_valid_until_trailing_characters_rejected +04837_date32_to_datetime64_field_overflow +04837_distributed_plan_window_partition_shuffle +04837_trivial_group_by_limit_projection_guards +04838_alter_column_referenced_by_key_or_ttl +04838_cascades_filter_selectivity +04838_distributed_plan_window_shapes +04838_in_subquery_lowcardinality_result_type +04838_index_hint_non_uint8_constant +04838_lazy_materialization_for_join +04838_nested_column_declaration_statistics +04838_overflow_in_no_supertype_non_constant_rhs_in +04838_timeseries_tags_column_contains_all_tags +04838_trivial_group_by_limit_aggregates_profile_events +04839_lazy_materialization_for_join_final +04839_mixed_type_scalar_non_constant_rhs_in +04839_trivial_group_by_limit_aggregate_projection +04839_variant_escape_filename_compact_map_buckets +04840_json_skip_index_combined_subcolumn +04840_trivial_group_by_limit_projection_guards +04841_logsql_subquery_rate_scope +04843_part_minmax_block_columns_setting_widened_merge +04844_join_add_block_after_data_release +04846_bloom_filter_map_keys_values_array_spellings +04846_explicit_null_in_non_constant_rhs_transform_null_in +04846_logsql_pooled_sum_and_string_stats +04846_materialized_view_target_is_materialized_view +04846_streaming_queries_join_unknown_estimate +04846_tounixtimestamp_datetime64_key_pruning +04847_bloom_filter_map_has_low_cardinality_key +04847_ttl_where_json_subcolumn +04848_logsql_switch_and_numeric_stats +04849_buffer_converted_column_text_index_and_lazy_final +04851_datetime64_min_max_jit_signedness +04851_read_in_order_virtual_row_buffering_deferred_sources +04852_statistics_part_pruning_no_subquery_execution +04852_vector_search_distributed_plan_header_order +04854_ie_join_on_array_join_residual +04855_csv_tuple_nested_element_null +04855_custom_separated_csv_tuple_leading_null +04858_missing_column_marker_type_conflict +04859_quantile_interpolated_integer_boundary +04860_space_filling_curve_not_a_key_column +04861_codec_hash_type_derived_params +04869_any_semi_right_join_or_conditions +04869_cascades_read_cost_granule_volume +04869_clear_column_materialized_over_alias +04869_clear_column_materialized_with_block_columns +04869_dpsub_single_table_filter_placement +04869_duplicate_cte_column_aliases +04869_materialized_chain_on_fly_read +04869_materialized_over_alias_column_mutation +04869_merge_filter_into_join_non_boolean_condition +04869_mutation_updated_header_compact_readonly_dependency +04869_number_no_supertype_scalar_non_constant_rhs_in +04869_on_fly_mutation_read_set_closure +04869_postgresql_tls_trailing_arguments +04869_regexp_full_field_consumption_all_rules +04869_skip_index_stale_type_absent_column +04869_sparse_tuple_element_missing_column_read +04870_column_declaration_statistics_lazy_load # only=tcp: the test drops the current database; over HTTP each later request fails +04870_filter_push_down_non_boolean_condition +04870_skip_index_stale_type_metadata_only_alter +04870_tuple_lhs_bare_scalar_column_rhs_in +04871_in_tuple_single_key_rewrite_in_to_join +04871_skip_index_stale_type_subcolumns +04871_text_index_lazy_always_false_on_cancel +04871_tuple_lhs_string_column_rhs_in +04871_vector_search_no_rescoring_vector_column_consumers +04872_bloom_filter_array_fixed_string_pruning +04872_running_concurrency_join_conversion_wrong_results +04873_tuple_subcolumn_pushdown_case_insensitive_collision +04874_running_concurrency_query_result_cache +04876_running_concurrency_short_circuit +04881_low_cardinality_default_value_needle +04882_deferred_filter_after_final_bare_column +04885_enum_empty_label_json_subcolumn_index +04888_distributed_plan_window_const_partition +04891_agg_if_combinator_null_fold +04891_distributed_plan_join_runtime_filters +04891_logsql_typed_fields_review +04891_mergetree_index_respects_row_policy +04891_optimize_inverse_dictionary_lookup_single_key_tuple +04891_query_condition_cache_join_by_pk_ranges +04891_streaming_queries_watermark_simple +04891_time_window_functions +04891_time_window_functions_wrapped_interval_overflow +04891_timeseries_lowcardinality_id +04891_tuple_element_nullable_json +04892_array_join_with_grouping_sets_distributed +04892_ast_json_removed_window_view_state +04892_distributed_plan_join_runtime_filters_edge_cases +04892_time64_accurate_cast +04893_comparison_can_throw_replicated_columns +04893_kafka_num_consumers_hard_limit +04893_obfuscate_ast_json_shape +04893_time64_to_time64_accurate_cast +04894_distributed_plan_runtime_filter_nested_join_placement +04894_in_subquery_lowcardinality_type +04894_lazy_materialization_shadowed_constant +04895_distributed_plan_runtime_filter_admission +04896_distributed_plan_runtime_filter_tree_delivery +04896_inconsistent_ast_view_subquery_paren_round_trip_1941_1bfa +04896_orfill_merge_group_by_overflow_any +04897_distributed_plan_rollup +04897_distributed_plan_runtime_filter_exact_string_transport +04897_key_condition_multi_atom_tuple_membership_packed +04897_point_in_polygon_primary_key_invalid_polygon +04897_promql_offset_in_range_selector +04898_distributed_plan_grouping_function +04899_distributed_plan_cube +04900_distributed_plan_grouping_sets +04901_distributed_plan_group_by_modifiers_corner_cases +04903_merge_join_alias_column_resolution +04903_nonliteral_const_aggregate_function_parameter +04903_not_has_secondary_index +04903_query_parameters_in_subquery_settings +04903_text_index_direct_read_join_header +04903_time64_values_conversion +04904_alter_two_modify_column_same_column_default +04904_low_cardinality_missing_column_read +04904_propagate_predicate_across_equi_join_throwing_predicate +04904_quantile_decimal_wide_boundary_no_ub +04907_bloom_filter_fixed_string_constant_array_scalar +04907_group_by_top_k_stable_string_erase_keys +04907_obfuscate_datetime_full_range +04907_partition_key_shadowed_by_array_join +04907_to_decimal_string_rounding_carry +04907_vector_search_no_rescoring_row_policy +04908_asof_join_unsupported_algorithm_error +04908_group_by_top_k_max_k_cap +04908_json_each_row_lowercase_field_names +04908_logsql_review_followups +04908_max_table_size_settings +04908_optimize_final_empty_table +04908_query_parameters_query_level_settings +04909_distinct_projection_order_by_non_distinct_column +04909_final_split_layers_duplicate_header_columns +04909_group_by_top_k_freeze_after_eviction_burst +04909_key_condition_null_under_not +04909_s3_globbed_path_implicit_partition_strategy +04910_group_by_top_k_long_serialized_erase_keys +04910_h3_array_building_no_quadratic_realloc +04910_max_table_size_merge +04911_max_table_size_patch_parts +04911_query_plan_aggregation_bucket_top_k +04913_drop_refreshable_mv_not_ignored +04918_s2_get_neighbors_reserve_once +04919_dictionary_validate_primary_key_type_low_cardinality +04920_timeseries_drop_low_sorting_name +04925_array_reduce_in_ranges_zero_size_state +04925_jit_compiled_if_negative_time +04926_cascades_aggregation_pushdown +04926_distributed_plan_read_in_order +04926_grouping_specializations_validation +04926_intra_column_stream_filename_collision +04926_nullable_void_keys_better_hash_external_merge +04926_promql_clamp_round_argument_errors +04926_quota_interval_missing_comma +04926_system_statements +04926_time_to_date_not_monotonic +04927_cascades_aggregation_pushdown_correctness +04927_date_preimage_result_correctness +04927_distributed_plan_read_in_order_array_join +04927_kql_review_regressions +04927_materialized_recompute_stage_mutation_version +04927_system_documentation_statements +04927_uniq_injective_tuple_nullable +04930_jit_compiled_if_date_to_datetime +04930_query_condition_cache_non_deterministic_virtual_columns +04935_optimize_functions_to_subcolumns_name_collision +04935_text_index_lazy_alter_conversion +04945_loop_over_table_expression_without_columns +04946_dynamic_adaptor_nothing_type +04947_modify_order_by_reverse_key_direction +04947_modulo_partition_key_alter_partition +04948_distributed_plan_runtime_filter_mixed_local_remote +04948_key_condition_widening_cast_block_ref +04949_distributed_plan_runtime_filter_receiver_no_lingering +04950_distributed_plan_runtime_filter_delivery_from_join_stage +04950_minmax_count_projection_unusable_bound +05019_async_insert_json_max_dynamic_subcolumns_control_on_parsing +05019_asynchronous_metrics_key_values +05019_date_time_overflow_behavior_from_string +05019_group_by_top_k_compatibility +05019_join_shard_by_pk_ranges_pruned_side +05019_settings_constraints_nested_settings_clamp +05019_time_series_recent_samples_table +05019_ttl_tuple_datetime_overflow +05021_distributed_plan_read_locally_pruned_part +05021_json_max_dynamic_subcolumns_in_parsing_nested_objects +05021_trino_conformance +05022_json_max_dynamic_subcolumns_in_parsing_after_default_rows +05022_trino_conformance_presto_scalar +05023_86045_lambda_argument_capture_alias +05023_adaptive_codec_non_candidate_fallback +05023_arrow_type_hints_reordered_wrapped_nested +05023_cascades_grouping_sets_distributes +05023_correlated_subquery_equivalence_type_conversion +05023_dictionary_source_descriptions +05023_fold_filter_materialize_shared_nodes +05023_ie_join_selectivity_condition_choice +05023_insert_select_duplicate_column_structure_hint +05023_join_several_disjuncts_right_keys +05023_merge_engine_projection +05023_recursive_cte_referencing_another_recursive_cte +05023_set_index_expression_widened_operand +05023_trino_conformance_tempto +05023_ttl_array_datetime_overflow +05023_ttl_group_by_lowcardinality_string_key +05023_union_subquery_query_level_settings +05023_variant_arena_deserialize_bad_discriminator +05024_aggregate_state_version_parallel_marshalling +05024_binary_string_literal_uninitialized_byte +05024_codec_gate_settings_match_registered_codecs +05024_dictionary_layout_descriptions +05024_jemalloc_arena_bins +05024_max_table_size_attach_partition +05024_mv_alias_in_where_in +05024_obfuscate_nested_union_seed_query_cache +05024_time64_values_negative_and_time +05024_time_series_extract_tag_empty_input +05024_totime_copied_column_expression_consistency +05024_tpch_join_order_plans_aggregation_pushdown +05024_trino_conformance_impala +05024_ttl_nullable_tuple_datetime_overflow +05025_aggregate_state_version_in_column_views +05025_group_by_top_k_partial_aggregation_sort_pass_through +05025_group_concat_window_sparse_tuple +05025_parquet_footer_read_size +05025_time_accurate_cast_matches_time64 +05025_union_subquery_explicit_query_cache +05026_distributed_plan_passthrough_sort_column +05026_named_tuple_cast_unambiguous +05026_obfuscate_additional_result_filter +05026_time64_values_date_overflow_behavior +05026_time_series_recent_samples_default +05027_read_wkb_deep_nesting +05027_uniq_state_version_64bit_hashes +05028_column_alias_equals_table_alias +05028_json_merge_patch_deep_nesting +05028_randconstant_alias_common_subexpression +05028_trino_dialect_icu_base64 +05029_columns_cache_comment_keeps_cache +05029_correlated_subquery_materialized_in_set +05029_max_table_size_replace_partition +05029_not_has_fixed_string_key_condition +05029_on_fly_mutation_sample_factor +05029_remote_description_deep_braces +05029_timeseries_to_grid_duplicate_timestamps +05029_totime_constraint_expression_consistency +05029_unused_conflicting_aliases +05030_correlated_subquery_bool_group_by_use_nulls # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +05030_ml_method_malformed_state +05030_timeseries_group_array_duplicate_timestamps +05031_resample_combinator_overflow +05032_group_uniq_array_malformed_state +05033_lazy_materialization_column_function_structure_equals +05034_lazy_materialization_column_function_set_capture +05035_stream_cursor_deep_nesting +05037_key_condition_multi_atom_negated_curve_group +05037_propagate_predicate_across_equi_join_in_set +05037_rename_column_materialized_by_merge +05038_cast_literal_read_with_target_type +05038_function_composition_operator +05038_in_empty_set_array_join +05038_join_reorder_merged_expression_shadowing_input +05038_lwu_v2_reverse_sorting_key +05039_placeholders_partial_application +05041_cast_keep_nullable_low_cardinality_target +05042_array_membership_null_map +05042_concurrent_hash_join_memory_limit +05042_correlated_subquery_equivalence_type_conversion_2 +05042_fuse_filter_array_join_left_distributed +05042_group_by_top_k_shared_boundary +05042_ie_join_selectivity_stats_edge_cases +05042_incremental_refreshable_mv_validation +05042_logsql_typed_text_pipes_and_numeric_spellings +05042_query_log_join_columns_more_cases +05042_rename_full_database_error_order +05042_streaming_queries_lazy_materialization +05042_streaming_queries_watermark_filter_push_down +05042_system_documentation_full_system_table_pages +05042_text_index_merge_streaming_encode +05042_wide_integer_128_narrow_division +05043_array_membership_null_map_text_index +05043_columns_cache_text_index_fallback +05043_concurrent_hash_join_single_join_memory_limit +05043_correlated_subquery_substitution_usage_restriction +05043_hop_window_end_past_datetime_range +05043_memory_prewhere +05043_merge_read_in_order_prefix_within_sorting_key +05043_not_in_value_position_key_condition +05043_regexp_anchored_literal +05043_statement_documentation_related_sections +05043_trino_conformance_presto_scalar2 +05044_bloom_filter_array_in_empty_array +05044_clear_column_materialized_by_merge +05044_deeply_nested_field_comparison_linear +05044_distributed_plan_with_fill +05044_lower_array_join_function +05044_memory_trivial_count +05044_propagate_predicate_query_condition_cache +05044_query_log_join_columns_direct_rocksdb +05044_time_time64_strict_in +05044_top_k_dynamic_filtering_float_special_values +05044_trino_conformance_presto_scalar3 +05045_86045_lambda_argument_niladic_function_alias +05045_backup_uuid_not_user_settable +05045_cascades_aggregation_pushdown_merge_local +05045_deferred_filters_after_final_header_order +05045_distributed_plan_fallback_to_local # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +05045_empty_in_set_short_circuit +05045_function_composition_udf_name +05045_group_uniq_array_8bit_bitmap +05045_identifier_parsed_as_literal_quoting +05045_index_analysis_more_parts_than_threads +05045_join_order_dpsub_fallback_state +05045_jsonextract_named_tuples_from_objects +05045_memory_prewhere_row_policy +05045_merge_tree_analyze_indexes_unknown_optimization +05045_min_max_aggregation_from_basic_statistics +05045_not_has_cross_type_key_condition +05045_or_null_division_subquery_wrap_no_lost_null +05045_preliminary_distinct_abandoning +05045_query_condition_cache_lambda_nondeterministic +05045_query_log_join_columns_multiplicity +05045_read_in_order_normal_projection_fixed_key +05045_statistics_null_count_part_pruning +05045_time64_or_null_zero_precision +05045_totime_alter_payload_expression_consistency +05045_trino_dialect_semantics +05045_uniq_state_version_foreach_map_combinators +05046_aggregator_array_combinator_empty_range_ubsan +05046_cascades_aggregation_pushdown_merge_shuffle +05046_create_token_parser +05046_creating_set_deduplication_abandoning_event +05046_distributed_plan_private_preview_tier +05046_json_cached_serialization_compact_wrapped +05046_minmax_index_nested_bool +05046_query_log_spilled_to_disk_needs_a_write +05046_trino_dialect_review_regressions +05047_adaptive_codec_size_substreams +05047_cascades_aggregation_pushdown_merge_spill +05047_coalescing_merge_tree_map_lowcardinality_key +05047_date_to_datetime_monotonicity_pruning +05047_distributed_plan_finished_stages_drain +05047_external_distinct_stable_spill_order +05047_lwu_patch_part_packed_storage_read +05047_projection_parts_files_column +05047_query_log_join_algorithm_switch +05047_streaming_queries_watermark_without_block_columns +05047_totime_legacy_select_column_names +05048_cascades_aggregation_pushdown_correctness_2 +05048_date_to_datetime_monotonicity_order_and_edges +05048_external_distinct_constant_columns +05048_function_composition_scoping +05048_hash_join_stored_block_registration_fault +05048_intersect_except_subquery_query_level_settings +05048_merge_tree_setting_of_a_table_under_either_name +05048_not_has_nested_mixed_sign_key_condition +05048_parse_iso8601_duration +05048_projection_selected_over_read_in_order_limit +05048_statistics_json_null_subcolumn_pruning +05048_sum_if_to_count_if_low_cardinality_nullable +05048_time64_datetime64_strict_in_scale_reduction +05048_totime_legacy_mutation_expressions +05048_xgboost_layout_parameter_validation +05049_external_distinct_non_key_columns +05049_obfuscate_nested_intersect_except_seed_query_cache +05049_projection_shorter_sort_prefix_than_pk +05049_totime_legacy_create_as_nested +05050_key_condition_nan_in_container_constant +05052_arrow_ipc_realign_empty_tuple +05052_tostring_two_args_not_injective_in_group_by +05053_key_condition_multiple_key_columns_per_condition_setting +05053_running_accumulate_short_circuit +05054_adaptive_codec_float_alp +05054_cascades_aggregation_pushdown_join_subtree +05054_deduplicated_rows_need_query_determinism +05054_formatdatetime_lowcardinality_timezone +05054_function_composition_name_and_alias_priority +05054_injective_plus_minus_type_gate_plan_shape +05054_join_key_common_subtype_tuple_nullable_element +05054_key_condition_multi_atom_exact_ranges +05054_nullable_key_todate_monotonicity +05054_query_log_join_columns_view_rebuilds +05054_small_parts_min_count_optimize_aggressive +05054_sparse_column_nondeterministic_function +05054_storage_alias_materialize_ttl +05054_streaming_queries_count_not_from_metadata +05054_timeseries_group_array_simple_aggregate_function +05054_timeseries_to_grid_array_of_pairs +05054_xgboost_prediction_accuracy +05055_adaptive_codec_untyped_substreams +05055_aggregate_state_bulk_deserialization_overflow +05055_aggregation_in_order_limit_order_by_prefix +05055_allow_experimental_codecs_obsolete +05055_array_intersect_nullable_argument_mix +05055_bitmap_cardinality_intersect_paths +05055_bloom_filter_index_no_negated_functions +05055_cast_literal_null_in_collection +05055_clear_column_ephemeral_materialized +05055_database_max_tables_inner_tables +05055_grace_hash_falls_back_without_spill_threshold +05055_group_by_zero_row_block +05055_jit_float_to_integer_cast +05055_join_disjunction_push_down_reaches_prewhere +05055_json_native_flattened_paths_memory_tracking +05055_key_condition_nan_normalized_constant +05055_like_perfect_suffix_escape +05055_map_combinator_duplicate_key_state +05055_memory_prewhere_added_column +05055_merge_past_multi_partition_update +05055_min_max_aggregation_from_statistics_nan +05055_normalized_query_hash_unordered +05055_not_has_tuple_layout_and_variant_key_condition +05055_obfuscate_create_table_construction_settings +05055_optimize_or_like_chain_end_anchor +05055_query_log_join_columns_same_shape_joins +05055_string_filters_during_scan_merge_tree +05055_string_filters_move_to_prewhere +05055_timeseries_deserialize_size +05055_trivial_group_by_limit_aggregates_external_aggregation +05055_xgboost_integer_feature_keys +05056_86045_nested_alias_lambda_argument_capture +05056_array_intersect_nullable_null_presence +05056_cast_literal_low_cardinality +05056_grace_hash_memory_spill_scheduler +05056_jit_bit_swap_last_two_argument_type +05056_map_combinator_state_stranded_on_throw +05056_query_log_join_columns_recursive_cte +05056_xgboost_backup_restore +05057_memory_prewhere_in_subquery +05057_query_log_join_columns_loop_table_function +05057_time_series_alter_setting_keeps_other_settings +05058_max_joined_block_size_rows_zero_with_bytes +05058_query_log_join_columns_nested_rebuilt_pipelines +05059_aggregate_function_state_with_low_cardinality_argument +05059_array_index_accurate_numeric_comparison +05059_conversion_wrap_around_monotonicity +05059_convert_column_to_type_bool_identity +05059_dict_join_get_context_expired_remote_subquery +05059_distributed_plan_fallback_forced_projection +05059_formatDateTime_extralong_timezone +05059_has_enum_array_by_name +05059_injective_decoding_functions +05059_join_conversion_nondeterministic_lambda +05059_kql_range_count_int256_min +05059_limit_after_view_order_by_pushdown_inner_range +05059_lwu_patch_spanning_base_parts_v1 +05059_minmax_count_projection_after_alter_column +05059_nested_variant_constant_folding_distributed +05059_parquet_timestamp_to_time64_no_stats_pruning +05059_prometheus_query_empty_aggregation_setting +05059_promql_empty_by_group +05059_query_condition_cache_final_bug93787 +05059_regexp_trailing_backslash +05059_system_log_common_columns +05059_text_index_direct_read_pending_mutation +05059_text_index_lazy_multi_block_windows +05059_text_index_posting_list_codec_pfor +05059_time_series_create_as_keeps_settings +05059_timeseries_sum_avg_non_finite +05059_top_k_dynamic_filter_shares_prewhere +05059_user_query_parameter_identifier +05059_vector_search_bug117723 +05060_array_join_in_where_blocks_numbers_limit_pushdown +05060_columns_cache_multi_block_range +05060_database_max_tables_rename_inner_tables +05060_enum_in_variant_dynamic_in_set +05060_grouping_function_rollup_cube_constant_key +05060_lift_up_array_join_keeps_nesting_order +05060_limit_after_view_order_by_pushdown_outer_range +05060_logical_functions_constant_float_argument +05060_map_enum_key_subcolumn_numeric +05060_nan_in_primary_key +05060_nested_member_subcolumn_cleared_column +05060_query_log_interface_enum # only=tcp: the test checks interface = 'TCP' of its own query +05060_text_index_posting_list_codec_size +05060_to_unix_timestamp_date_key_wrap +05060_uniq_to_count_nullable_and_group_by_modifiers +05060_where_and_negative_constant_72577 +05061_key_condition_signed_zero_transform +05061_map_enum_key_bloom_filter +05061_query_log_settings_when_query_start_is_not_logged +05062_extract_greedy_prefix_occurrence +05062_has_enum_array_bloom_filter +05062_limit_after_sorting_properties_across_streams +05063_key_transform_tuple_key_in_set +05063_limit_after_contextual_keywords +05064_lift_up_array_join_nondeterministic_filter +05064_limit_after_with_fill_interpolate +05066_limit_after_merge_join_header_rewrite +05066_subsecond_extractors_primary_key_monotonicity +05067_join_condition_merge_nondeterministic +05069_reject_array_join_in_check_constraint +05070_clone_as_copies_constraints +05070_limit_after_correlated_boundary +05070_merge_expression_into_join_nondeterministic +05071_alter_constraint_array_join_always_rejected +05071_limit_after_count_scalar_early_short_circuit +05072_case_with_expression_nullable_enum_117206 +05072_limit_after_json_ast_invariants +05073_column_ttl_recompute_materialized +05073_limit_after_distinct_on_duplicate_range +05073_to_hour_to_minute_epoch_offset_fast_path +05073_ttl_array_join_rejected +05074_check_constraint_array_join_rejected +05074_limit_after_boundary_alias_format +05074_materialize_ttl_recompute_materialized +05075_bloom_filter_index_array_nullable +05075_limit_after_with_ties_after_limit_by +05075_materialize_ttl_materialized_extra_inputs +05076_empty_container_cast_to_variant +05076_join_order_single_table_filter_placement +05076_json_lazy_type_hints_projection_safety +05076_limit_after_explain_actions +05076_materialize_ttl_materialized_skip_index +05076_merge_refused_before_pending_rename_column +05076_promql_fused_aggregation_pair +05076_promql_label_manipulation_label_names +05076_qbit_group_by +05076_row_policy_underlying_storages +05076_streaming_queries_concurrent_pipeline_removal +05076_text_index_in_set_without_elements +05076_window_function_group_by_use_nulls_not_an_aggregate # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +05077_external_distinct_memory_limit +05077_join_runtime_filter_skip_saturated_bloom_filter +05077_json_lazy_type_hints_ttl_safety +05077_promql_quantile_prefer_column_alias +05077_statistics_unknown_atom_and_merge +05077_text_index_in_storage_set +05078_external_distinct_equality +05078_text_index_in_storage_set_serialized_plan +05079_parse_aggregate_function_typed_param +05079_statistics_unknown_atom_order_independence +05080_ill_typed_skip_index_expression +05080_statistics_index_hint_not_counted_twice +05081_statistics_not_over_absorbed_unknown +05081_text_index_fixed_string_constant +05082_field_visitor_dump_rare_types +05082_regexp_rewrite_quoted_literal +05082_statistics_not_over_unknown_atom +05083_nullable_key_exact_count +05083_projection_calculation_with_analyzer +05083_statistics_not_over_constant +05084_statistics_not_over_absorbing_clause_reused +05085_limit_with_ties_after_limit_by +05086_column_shadowing_array_size_subcolumn +05087_create_view_inferred_suspicious_type +05088_merge_drops_shadowed_column_stream +05089_constraints_in_list_incomparable +05089_low_cardinality_default_arguments_throwing_functions +05089_ttl_group_by_set_sorting_key +05090_correlated_positional_tuple_element +05090_to_date_conversion_monotonicity_wrap +05091_rewrite_in_to_join_repeated_alias +05092_low_cardinality_overload_resolution +05093_any_join_to_semi_anti_algorithm_check +05093_time_filter_preimage_type_maximum +05095_correlated_scalar_subquery_twice +05095_patch_parts_total_rows +05096_aggregation_bucket_top_k_array_join +05096_regexp_character_class_literals +05097_jit_int128_signedness +05097_regexp_fixed_prefix_flag_group +05098_conflict_detector_preserves_strictness +05098_defer_partition_pruning_final_float +05098_extract_flag_group_not_a_capture +05098_time_zone_fixed_offset_granularity +05099_conflict_detector_outer_join_join_use_nulls +05099_datetime_set_constant_range +05099_dict_get_hierarchy_not_injective +05099_divide_decimal_single_digit +05099_fuse_quantile_integer_level +05099_index_analysis_through_array_join +05099_join_shard_by_pk_prewhere_sorting_key +05099_lift_up_array_join_nondeterministic_lambda +05099_metric_log_bucketed_by_default +05099_parquet_uuid_no_minmax_pruning +05099_query_condition_cache_formatdatetime_settings +05099_rewrite_aggregate_function_with_if_nullable_condition +05099_vector_search_limit_multiplier_overflow +05102_storage_join_any_to_semi_algorithm_check +05103_index_hint_merge_table_virtual +05104_array_element_tuple_large_uint64_index +05104_json_cached_serialization_compact_presence +05104_timeseries_changes_nan_bits +05104_ttl_group_by_parenthesized_key +05104_uniq_theta_compressed_state +05105_correlated_subquery_with_outer_filter +05105_sequence_match_datetime64 +05107_correlated_subquery_creating_sets +05108_interpolate_keeps_set_placeholder +05109_lcm_wide_integer_sign +05110_reverse_utf8_not_injective +05111_array_intersect_null_in_all_arrays +05111_count_from_set_table +05111_local_read_throttler_page_cache +05111_recursive_cte_union_branch_propagation +05111_time_filter_preimage_year_month_timezone_transition +05113_arithmetic_monotonicity_nan_endpoint +05114_read_in_order_decreasing_function_nan +05117_readd_column_after_drop_conversion +05136_117819_exact_count_nan_in_tuple_key +05136_alter_modify_setting_default +05136_analyzer_cannot_be_disabled +05136_array_aggregation_constant_lambda_empty_arrays +05136_ast_json_clone_as_shape +05136_external_distinct_row_limit_and_hint +05136_hash_join_match_stats_no_emit_probe +05136_hashed_array_dictionary_bytes_allocated +05136_interpolate_clause_query_parameters +05136_json_shared_data_bucketed_map_without_statistics +05136_key_condition_lowcardinality_key_over_merge +05136_limit_after_totals_in_joined_subquery # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +05136_limit_offset_overflow_no_pushdown +05136_merge_trivial_count_row_policy +05136_top_column_in_view_show_create +05137_array_starts_with_variants +05137_convert_join_to_in_correlated_subplan_reference +05137_delete_query_parameter_predicate +05137_external_distinct_serialized_key_round_trip +05137_fuse_row_conditions_into_array_join +05137_hash_join_gather_basic +05137_idna_0_5_5_behaviour +05137_inplace_set_build_fault_injection_scope +05137_join_use_nulls_right_key_restored # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +05137_key_condition_multi_atom_tuple_membership_setting_off +05137_natural_join_ephemeral_key +05137_port_rfc_ipv6_host +05137_range_hashed_dictionary_bytes_allocated +05137_rewrite_aggregate_function_with_if_short_circuit +05137_substring_index_large_uint64_count +05138_conflict_detector_degenerate_predicate +05138_forbid_mergetree_introspection_table_functions_as_engine +05138_global_in_max_subquery_depth +05138_memory_prewhere_read_rows +05138_merge_child_row_policy_trivial_count +05138_natural_join_alias_column_order +05138_with_fill_step_below_precision +05139_array_join_reuse_nested_columns +05139_join_partial_push_down_nondeterministic_lambda +05139_join_using_merged_key_nullable_tuple_element +05139_prune_array_join_columns_subquery +05140_column_cut_shared +05140_external_distinct_merge_unique_chunks +05140_mergetree_index_key_type_after_alter +05140_t64_decode_narrow_signed_tails +05140_to_last_day_of_at_date_maximum +05141_array_index_simd_numeric +05141_external_distinct_final_merge +05141_http_dictionary_hide_header_values +05141_lwu_parenthesized_sorting_key +05141_nondeterministic_functions_with_constant_arguments +05141_remove_expired_authentication_methods +05141_row_policy_after_final_folded_lambda +05141_t64_one_bit_roundtrip +05141_time_series_select_join_settings +05142_apply_lambda_join_using_projection_name +05142_lwu_trivial_count +05142_timeseries_timestamp_of_min_max_functions +05144_join_disjunctions_push_down_nondeterministic +05147_ngrambf_like_escaped_backslash_run +05149_key_condition_datetime64_scale_cast_key +05150_kv_key_filter_date_family_literal +05151_generate_ulid_constant_argument +05153_columns_cache_retained_memory_accounting +05153_has_named_tuple_order_relaxed_key_condition +05153_is_valid_ascii_simd_boundaries +05153_jit_decimal_integer_conversion_overflow +05153_join_using_projection_alias_virtual_column +05153_lambda_stays_above_array_join +05153_optimize_extract_common_expressions_primary_key +05153_prefer_column_name_to_alias_ambiguous_join +05153_string_filters_same_column_prewhere_guard +05153_text_index_mergeTreeTextIndex_create_table_as +05153_trino_dialect_wrappers_and_set +05153_trivial_group_by_limit_aggregates_single_stream_spill +05153_uniq_state_version_tuple_combinator +05153_variant_truncated_compact_discriminators +05153_vector_search_quantized_codes_deferred_row_policy +05153_virtual_row_widened_prefix_constant_order_by +05154_prefer_column_name_to_alias_compound_ambiguous +05154_semi_join_empty_right_side +05154_subquery_duplicate_use_query_cache +05155_columns_cache_column_added_after_part +05156_big_integer_to_datetime_overflow +05157_86045_in_flight_alias_lambda_argument +05157_read_in_order_transform_to_nan +05158_decimal_integer_operand_overflow +05159_join_shard_by_pk_ranges_float_nan +05161_column_ttl_skip_untouched_blocks +05161_group_array_insert_at_order_by +05161_json_type_non_utf8_string +05161_least_greatest_const_columns +05161_mv_set_operation_metadata_reparse +05161_pk_tuple_nested_nan_null +05162_map_contains_value_to_subcolumn +05162_stochastic_regression_order_by +05163_bloom_filter_array_date_literal +05164_key_condition_lossy_constant_not_equals +05165_merge_expressions_non_deterministic_array_join +05166_limit_by_const_with_totals_joined_subquery +05166_nondeterministic_nested_lambda_constant_folding +05166_subcolumn_rewrite_nullable_element_type_mismatch +05170_jit_cast_nullable_to_non_nullable +05173_url_rfc_ipv6_with_ipv4_tail +05174_nullable_tuple_join_key_with_null_element +05175_comment_of_table_created_from_table_function +05175_distributed_plan_index_analysis_once +05175_hash_of_aggregate_function_state_column +05175_ie_join_selectivity_types_nulls_ties +05175_index_hint_null_constant +05175_lwu_delete_read_rows_wide_part +05175_map_has_to_subcolumn +05175_materialize_statistics_session_gate +05175_mutation_drops_shadowed_column_stream +05175_regr_aggregate_functions +05175_selectivity_estimator_type_mismatch +05175_tokens_split_by_string_block_boundaries +05175_trim_empty_chars_is_a_function_call +05175_truncate_all_tables_merges +05175_yyyymmddhhmmsstodatetime64_pre_epoch_fraction +05176_logsql_oversized_integers_and_stream_id +05176_map_keys_values_filter_only +05176_tokens_split_by_non_alpha_corner_cases +05177_tokens_split_by_string_corner_cases +05178_text_index_byte_tokenizers_corner_cases +05179_regr_aggregate_state_serialization +05179_table_backed_set_out_of_range +05181_fuzz_bits_and_generate_ulid_constant_arguments +05182_arithmetic_monotonicity_nan_const_dividend +05182_arrayJaccardIndex_coerced_types +05182_array_intersect_overflowed_element_order +05182_collapsing_stable_sort_on_insert +05182_columns_matcher_alias_columns +05182_correlated_subquery_in_having_with_totals # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +05182_join_order_conflict_detector_cast_null_propagation +05182_lightweight_update_materialized_cte_in_subquery +05182_materialized_view_alter_column_comment +05182_materialized_view_alter_column_comment_mixed +05182_materialized_view_alter_column_comment_refreshable +05182_modify_setting_default_engine_checks +05182_prewhere_column_sizes_pruned_parts +05182_prewhere_partition_statistics +05182_projection_positional_arguments_with_analyzer +05182_replace_regexp_all_inline_multiline +05182_row_policy_after_final_lambda_nondeterminism +05182_skip_index_order_after_partition_pruning +05182_time_series_id_type_setting +05183_decimal_datetime64_stable_sort_on_insert +05183_join_order_conflict_detector_direct_key_null_extension +05183_prewhere_statistics_pruned_parts +05183_prewhere_statistics_throwing_partition +05183_uniq_multi_place_prefetch +05183_unreferenced_with_array_join_limit_pushdown +05185_readonly_toggle_loads_outdated_parts +05186_to_day_of_week_mode_monotonicity +05187_read_in_order_key_type_setting_divergence +05188_map_subcolumn_shadowed_by_physical_column +05189_count_bytes_in_filter_with_null +05189_update_cte_out_of_scope_database +05192_read_in_reverse_order_final_merge_table +05193_top_k_through_join_final_reverse_order +05194_array_shift_nullable_default_compatibility +05194_time_zone_libc_names +05196_modulo_mixed_sign_operands +05198_json_skip_index_typed_path_subcolumn +05202_mutation_of_attached_part_with_dropped_column +05205_vector_search_lightweight_delete_limit +05207_nullable_enum_string_search +05210_array_concat_single +05210_array_except_empty +05210_columns_cache_nested_member_offsets +05210_empty_serialized_aggregate_state_key +05210_forbid_timeseries_target_table_functions_as_engine +05210_join_runtime_filter_float_nan +05210_lightweight_update_materialized_cte_in_ignore +05210_lower_upper_utf8_mixed_ascii +05210_map_contains_value_case_insensitive_collision +05210_nullable_tuple_element_subcolumn_rewrite +05210_numeric_indexed_vector_repeated_index +05210_prewhere_column_sizes_compact_pruned_parts +05210_quantile_parameter_type_name_round_trip +05210_readonly_settings_rollback +05210_sfc_uint64_index_analysis +05210_skip_index_type_from_alter_session_setting +05210_timeseries_present_to_grid +05210_ttl_delete_vertical_merge_replacing +05210_with_recursive_mixed_list_alias_scope +05211_aggregate_parameter_type_name_round_trip +05211_apply_transformer_format_escaping +05211_array_filter_uniform +05211_array_slice_identity +05211_columns_cache_write_estimate_uncompressed +05211_json_compact_shared_path_cache +05211_map_contains_like_to_subcolumns +05211_numeric_indexed_vector_multiply_divide_zero_result +05211_promql_present_over_time_absent_over_time +05211_ttl_delete_vertical_merge_collapsing +05212_compression_codec_zstd_long_range_mode +05212_isnull_non_canonical_null_map +05212_join_shard_by_pk_ranges_pruned_parts +05212_lambda_nondeterminism_filter_push_down +05212_map_has_keys_case_insensitive_collision +05212_nullable_tuple_element_to_subcolumn +05212_numeric_indexed_vector_scalar_overflow_all_ops +05212_reader_executor_max_size +05212_sequence_match_trailing_actions_past_end +05212_timeseries_quantile_to_grid +05212_ttl_delete_vertical_merge_other_ttl_families +05212_url_hierarchy_boundaries +05213_array_min_max_index +05213_compression_codec_parameter_errors +05213_json_shared_data_size_subcolumn_advanced +05213_limit_by_injective_unwrap_stops_at_group_by_key +05213_promql_quantile_over_time +05213_reverse_string_column +05213_some_keyword_quoting +05213_substring_identity +05213_to_valid_utf8_simdutf +05214_columns_cache_write_estimate_refiner +05214_functions_type_error_branches +05214_key_analysis_zoneless_datetime_session_tz +05214_timeseries_linear_regression_to_grid +05215_columns_cache_granule_entries +05215_h3_to_center_child_error_branches +05215_promql_predict_linear +05215_ttl_delete_vertical_merge_set_built_once +05216_columns_cache_json_dynamic_const +05216_join_order_greedy_non_equi_over_cross +05216_mergetree_minmax_topk_handle_ties +05217_columns_cache_sparse_nullable_null_map +05217_external_distinct_nested_keys +05217_inverse_dictionary_lookup_conversion_semantics +05217_join_cross_type_equi_key_pushdown_use_nulls +05217_reverse_short_paths +05217_text_index_map_lowcardinality_subcolumn_cast +05217_timeseries_tags_text_index +05218_allow_executable_tables +05218_alter_reset_setting_implicit_indices +05218_analyze_indexes_malformed_optimization_args +05218_analyzer_column_transformer_kind_isequal +05218_analyzer_window_node_dump_tree +05218_any_function_subquery_quoting +05218_autopr_set_building_plan_is_left_alone +05218_cast_literal_canonical_text +05218_convert_outer_join_to_inner_join_transitively +05218_datetime64_in_set_out_of_range_constant +05218_external_distinct_serialized_key_identity +05218_force_and_prefer_optimize_projection +05218_grace_hash_break_stops_delayed_buckets +05218_ie_join_selectivity_pseudo_band +05218_inconsistent_ast_window_frame_residue +05218_inverse_dictionary_lookup_key_comparison +05218_join_conversion_assume_not_null +05218_key_condition_multi_atom_sampling +05218_map_contains_key_value +05218_map_lowcardinality_key_lookup +05218_merge_children_remote_tasks_vs_subquery_sets +05218_named_tuple_metadata_only_alter_subfield_retype +05218_projection_index_filter_polarity +05218_query_plan_aggregation_having_prefilter +05218_set_engine_row_policy +05218_settings_changes_history_placement +05218_short_circuit_compact_logical_masks +05218_streaming_queries_watermark_unordered_rejected +05218_text_index_granule_tail_trimming +05218_text_index_keyvaluepairs_decode_token +05218_text_index_like_dictionary_scan_pruning +05218_time_zone_names_from_database +05218_timeseries_alp_codec +05218_tinylog_read_zero_byte_data_file +05218_trivial_count_sparsity_filter_after_metadata_only_alter +05218_truncate_all_tables_refreshable_mv +05218_uuid_ip_comparison_vectorized +05219_analyzer_interpolate_node_dump_tree +05219_external_distinct_fingerprints +05219_fixed_string_16_comparison +05219_inverse_dictionary_lookup_key_type_boundaries +05219_key_condition_multi_atom_set_candidates +05219_readonly_mixed_alter_rejected +05219_streaming_queries_part_offset +05220_analyzer_query_tree_pass_manager +05220_inverse_dictionary_lookup_simple_key_declared_type +05220_key_condition_multi_atom_disjunction_template +05220_text_index_map_key_wrapped_constant +05221_key_condition_typed_constant_pruning +05221_tokenbf_map_absent_key_fixedstring_needle +05221_top_k_through_join_n_guards +05222_key_condition_multi_atom_whole_tuple_wrapped_set +05223_array_reduce_seeded_aggregate_determinism +05223_collapsing_merge_block_boundary +05223_join_runtime_filters_index_analysis_normal_projection +05223_limit_until_after_start +05223_pk_tuple_nullable_element_bounds +05223_range_glob_total_regexp_bound +05223_streaming_queries_readonly_bounded +05223_system_disable_all_fault_injection_points +05223_text_index_fixed_string_padded_needle +05223_time64_strict_in_scale_reduction +05223_trivial_group_by_limit_aggregates_limit_after_guard +05223_uniq_state_version_arithmetic_and_cast +05224_limit_until_deferred_evaluation +05224_null_safe_join_fixed_keys +05224_trivial_group_by_limit_aggregates_top_k_arbitration +05225_limit_until_stateful_evaluation +05226_ast_json_constraint_expression_argumentless_function +05226_limit_after_evaluation_stops +05227_86045_interpolate_alias_lambda_argument_capture +05227_aggregate_arithmetic_decimal_truncation +05227_array_jaccard_nullable_hashed +05227_ast_fuzzer_no_profile_events_leak +05227_ast_json_sentinel_enum_values +05227_autopr_forced_projection_name +05227_codec_family_name_case_insensitive +05227_column_free_conjunct_join_push_down +05227_columns_cache_variant_added_by_alter +05227_custom_week_monotonicity_column_timezone +05227_format_escaped_braces_59297 +05227_function_composition_alias_dispatch_and_union_scope +05227_in_nan_minmax_pruning +05227_injective_claims_tostring_datetime_and_tofixedstring +05227_inline_view_join_alias +05227_key_condition_datetime64_scale_array_cast_key +05227_key_condition_signed_zero_tuple_transform +05227_lazy_load_tables_mutations_visibility +05227_lazy_replication_respects_lambda_determinism +05227_load_outdated_parts_retryable_error +05227_max_table_size_rows_shrinking_merge +05227_mutation_batch_over_patch +05227_mutation_clears_shadowed_column_stream +05227_nested_correlated_beyond_outer_scope +05227_not_not_has_phrase_text_index_direct_read +05227_part_virtual_column_shadowing +05227_partition_pruning_unevaluable_subexpression +05227_pending_rename_of_nested_leaf +05227_projection_calculation_ignores_additional_table_filters +05227_qbit_one_bit_hamming_distance +05227_query_condition_cache_conversion_settings +05227_replace_regexp_all_multiline_and_empty_tail +05227_replace_regexp_all_nullable_dollar_tail +05227_set_index_dynamic_granule_range +05227_single_step_prewhere_default_column +05227_statistics_cache_per_part +05227_streaming_queries_time_attribute_filter +05227_string_filters_row_policy_guard +05227_timeseries_timestamp_t64_codec +05227_variant_offsets_uninitialized_only_nulls +05227_with_fill_non_finite_bound +05228_day_of_week_monotonicity_extended_dates +05228_index_hint_outer_join_right_side +05228_lazy_load_tables_merge_tree_commands_and_parts # only=tcp: the test drops the current database; over HTTP each later request fails +05228_system_tables_filter_by_in_prunes_enumeration +05229_adaptive_codec_chain +05229_analyzer_column_transformer_alias_equality +05229_array_join_function_nondeterministic_placement +05229_ast_json_foreign_key_declaration_rejected +05229_column_named_from_in_parenthesized_expression +05229_custom_week_explicit_timezone_pruning +05229_logsql_exact_decimal_literals_and_normalized_values +05229_max_table_size_rows_multiple_parts +05229_minmax_index_order_after_modify_column_after +05229_nondeterministic_conjunct_join_push_down +05229_replace_partition_covers_outdated_parts +05229_text_index_local_postings_cache_no_rebuilds +05230_always_false_equals_chain_without_pruning +05230_ast_json_storage_expression_argumentless_function +05230_columns_cache_lazy_materialization_second_pass +05230_day_of_week_monotonicity_paired_weeks +05230_declining_default_arguments_nullable_no_nulls_fast_path +05230_materialized_cte_shared_by_two_ctes_in_set_subquery +05230_parquet_int_signedness_no_minmax_pruning +05230_vector_search_no_rescoring_dotted_column_name +05231_inverse_dictionary_lookup_variant_dynamic_key +05231_timeseries_to_grid_timestamp_scale_conversion +05231_type_tree_walk_reaches_nested_types +05232_accurate_cast_nullable_callers +05232_exclusion_search_unknown_atoms +05232_text_index_lazy_intersection_block_span_rule +05232_timeseries_selector_time_range_conversion +05232_timeseries_selector_time_range_scale +05233_aggregate_function_input_format_values_in_any_format +05233_alias_skipped_by_truncate_all_tables +05233_alter_drop_column_part_without_table_columns +05233_asof_join_nullable_key_lazy_replication +05233_assume_not_null_nullable_partition_key_pruning +05233_constraint_graph_negated_ordered_comparison +05233_dict_get_or_default_const_null_key +05233_direct_join_row_policy +05233_dynamic_adaptor_propagate_exceptions +05233_eval_table_function_explain_ast_optimize +05233_group_by_limit_dynamic_filter +05233_join_conversion_date32_default +05233_json_extract_tuple_duplicate_keys +05233_key_analysis_unconvertible_text_constant +05233_kill_throw_if_noop +05233_lateral_join_ast_json_and_locality +05233_promql_min_max_of +05233_query_log_join_columns_scalar_subquery_in_rebuilt_pipelines +05233_string_filters_fixed_string_constant +05233_text_index_lazy_brute_force_early_exit +05233_timezone_name_file_prefix_rejected +05233_uniq_up_to_saturated_hash +05233_update_with_alias_dict_name +05234_aggregate_function_input_format_parquet +05234_alp_codec_random_roundtrip +05234_array_enumerate_fixed_string +05234_array_join_replicated_array_stays_lazy +05234_foreach_streaming_aggregation_batch +05234_generate_random_null_ratio +05234_map_key_lookup_nan +05234_promql_streaming_aggregation_memory +05234_row_policy_storage_join +05234_subplan_join_estimate_propagation +05234_text_index_lazy_brute_force_narrow_window +05234_text_index_postings_stream_buffer_reads +05235_alter_comment_column_alias_subcolumn +05235_dynamic_json_deep_value_read_stack_guard +05235_processors_profile_log_on_exception +05235_timeseries_to_grid_extreme_parameters +05235_wide_part_compress_block_value_alignment +05236_generate_random_time_bfloat16 +05236_join_using_with_clause_alias +05236_truncate_all_tables_skip_engines_without_data +05237_alter_modify_query_comment_removed_column +05237_column_ttl_default_expression_partial_block +05237_generate_random_variant_dynamic +05237_hash_join_row_store_cache_miss +05237_json_combined_subcolumn_skip_rules +05237_killed_modify_column_nested_collected_type +05237_lateral_join_aggregate_empty_input +05237_merge_table_variant_element_subcolumn +05237_time_series_old_metric_family_name_inner_column +05237_timeseries_first_to_grid_functions +05237_trivial_count_sparsity_filter_stats_after_alter +05238_aggregate_parameter_types_always_printed +05238_analyzer_compatibility_allow_cte_redefinition +05238_array_distinct_decimal +05238_array_reverse_wide_integer +05238_dpsub_conflict_detector_cross_join_kind +05238_enum_to_datetime_overflow +05238_inverse_dictionary_lookup_float_keys +05238_key_condition_multi_atom_tuple_nan_exactness +05238_lateral_join_on_predicate_required +05238_nullable_number_void_group_by_two_level_null_group +05238_skip_index_final_exact_mode_scattered +05238_top_k_primary_key_skip_collation +05239_generate_random_json_merge_tree +05239_key_condition_nan_in_nested_set_values +05239_lateral_join_aggregate_if_combinator +05239_replace_regexp_all_quantifier_after_no_op_element +05240_external_distinct_spill_blocks +05240_to_day_of_week_monotonicity_wrapped_modes +05241_bloom_filter_map_default_value_low_cardinality_nullable_constant +05241_external_distinct_coalescing +05241_groupbitmap_invalid_run_container +05241_lateral_join_buffered_join_overflow_break +05241_low_cardinality_serialized_group_by +05241_lower_upper_ascii_byte_range +05241_mv_source_final_sample_in_subquery_issue_123270 +05241_parquet_hash_filter_output_type_value_space +05241_row_policy_after_final_float_sorting_key +05241_timeseries_mad_to_grid +05241_vector_search_quantize_codec_read_task_subcolumn +05242_external_distinct_limit_remerge +05242_key_condition_negated_wrapped_set_candidates +05242_lateral_join_volatile_functions +05242_subsecond_extractors_every_scale +05242_text_index_preprocessor_lossless_conversion_haystack +05242_time_series_range_max_elements +05243_aggregate_projection_json_required_columns +05243_array_join_element_filter_block_boundary +05243_enum_unknown_literal_key_condition +05243_group_by_top_k_dynamic_filter_nan +05243_jit_bit_shift_rotate_domain +05243_join_runtime_filters_index_analysis_final_noop +05243_key_condition_erased_fixed_string_transforms +05243_key_condition_signed_zero_in_and_array_transform +05243_lateral_join_keyword_as_table_name +05243_low_cardinality_group_by_position_cache +05243_query_log_join_columns_create_populate +05243_query_log_spilled_to_disk_distinct +05243_time_series_deduplication_caches +05243_to_start_of_interval_extended_results_input_type +05244_default_minmax_indices_alter_rename_with_setting +05244_key_condition_sparse_atom_groups +05244_top_k_primary_key_skip_reverse_key +05244_window_functions_lag_lead_default_cast +05245_alter_modify_projection_fixed_granularity_guard +05245_date_time_overflow_behavior_with_fill_datetime64 +05245_key_condition_wrapping_input_dependencies +05254_parse_query_to_json_deep_query_stack_guard +05255_analyzer_identifier_cache_quoted_dotted_alias +05255_and_compare_chain_string_column_interval_bound +05255_array_min_max_index_offsets +05255_filter_output_evaluated_before_its_filter +05255_jit_decimal_scaled_conversions +05255_mutation_scalar_subquery_with_skip_index +05255_set_index_coalesce_rewrite_const_folded_atom +05255_statistics_column_missing_from_part +05255_statistics_part_pruning_row_policy +05255_streaming_queries_watermark_time_attribute_types +05255_text_index_lazy_intersection_256_tokens +05255_timeseries_external_time_ranges_table +05255_timeseries_time_ranges_table +05256_array_uniq_decimal +05256_coalesce_row_mask_updates +05256_json_extract_lowcardinality_fixedstring_padding +05256_json_number_null_not_as_default_121472 +05256_mutation_scalar_subquery_nullable_placeholder +05256_s3_uri_exception_masks_credentials +05256_statistics_not_orphaned_by_column_ttl +05256_system_unicode_notation_no_trailing_nul +05256_window_functions_range_frame_date_keys +05257_any_join_to_semi_grace_hash_without_spill_threshold +05257_cascades_shard_aggregation_group_by_limit_single_node +05257_coalesce_row_mask_subquery +05257_function_composition_array_join_alias +05257_has_enum_array_index_fixed_string +05257_join_where_guard_conjunct_order +05257_keycondition_tuple_name_mode_pruning +05257_lazy_load_tables_mutations_optimize_create_as # only=tcp: the test drops the current database; over HTTP each later request fails +05257_materialize_ttl_materialized_statistics +05257_merge_tree_analyze_indexes_vector_search_integral_vector +05257_parse_date_time_best_effort_row_boundary +05257_pre_epoch_datetime64_fraction_rounds_down +05257_prewhere_after_final_float_sorting_key +05257_tokens_ngrams_utf8_boundaries +05257_vector_search_index_analysis_limit_cap +05257_window_function_state_column_type_rejected +05257_window_functions_frame_definition_errors +05257_xgboost_attach_dictionary_gate +05258_aggregation_single_level_result_fanout_query_shapes +05258_anti_join_runtime_filter_null_bypass_estimate +05258_backup_except_data_tables_keyword_names +05258_coalesce_row_mask_separate_mutations +05258_correlated_subquery_over_merge_nested_planning +05258_drop_partition_invalid_date_literal +05258_join_transitive_equality_with_direct_predicate +05258_json_shared_data_restore_after_rejected_insert +05258_lazy_load_tables_delete_projection_throw +05258_memory_prewhere_column_as_filter +05258_merge_blocks_nested_thread_pool_deadlock +05258_query_condition_cache_prewhere_attribution +05258_query_condition_cache_topk_folded_lambda_nondeterministic +05258_readd_column_after_drop_projection +05258_start_of_interval_month_origin_time_of_day +05258_text_index_low_cardinality_dictionary +05258_top_k_filter_nan_in_array +05258_ttl_group_by_set_subcolumn_sorting_key +05258_vertical_ttl_delete_unmaterialized_input +05258_window_functions_range_frame_offsets_and_peers +05258_with_elements_expansion_bound +05259_agg_if_nullable_single_null_map_in_order +05259_cross_join_self_join_qualifier_side +05259_join_transitive_equality_dictionary_lookup +05259_numbers_limit_pushdown_join +05259_query_condition_cache_topk_sample +05259_replace_regexp_all_quantified_dollar +05259_short_circuit_reorder_arguments +05259_top_k_dynamic_filter_read_columns +05259_top_k_primary_key_skip_nested_nulls_direction +05259_window_functions_range_frame_nullable_keys +05259_xgboost_params_validated_before_source_read +05260_join_reorder_or_without_keys +05260_nested_json_wide_parts +05260_settings_indexes_aliases +05260_streaming_queries_shared_lambda +05260_ttl_constant_delete_where_non_uint8_condition +05260_window_functions_rank_nulls_direction +05261_kv_tuple_in_key_filter_unconvertible_element +05261_statistics_not_orphaned_by_column_ttl_partial_mutation +05261_window_functions_nth_value_ntile_arguments +05262_promql_regex_literal_alternatives +05262_window_functions_lag_lead_offsets_and_types +05262_xgboost_null_and_constant_features +05263_window_functions_first_last_value_nulls_data +05263_xgboost_log_to_server_log +05264_window_functions_holistic_aggregates_sliding_frames +05264_xgboost_query_count +05265_rename_column_subcolumns +05265_window_functions_group_concat_frames +05265_xgboost_parameters_change_result +05266_window_functions_misc_aggregates +05266_xgboost_multiple_blocks +05267_join_runtime_filter_prewhere_order_without_statistics +05267_window_functions_filter_clause +05268_window_functions_definition_scoping +05269_window_functions_range_frame_nullable_keys_default_order +05270_update_cte_settings_reset_default +05270_window_functions_bug_validation_inconsistencies +05273_has_any_constant_string_needles +05273_promql_instant_vector_sorted_by_tags +05289_correlated_subquery_in_having_with_totals_overflow_row # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +05289_join_runtime_filter_null_safe_key_not_skipped +05289_low_cardinality_serialized_group_by_external +05289_memory_prewhere_multiple_steps +05289_promql_duration_serialization_zero_sub_ms +05289_query_condition_cache_topk_on_fly_mutations +05289_ttl_in_subquery_own_parallel_replicas_settings +05290_in_subquery_of_standalone_expression_cte_and_insertion_table +05291_apply_prefix_join_qualified_name +05291_binary_encoded_field_deep_recursion +05291_hash_table_sizes_stats_expression_constants +05291_index_hint_below_window +05291_join_filter_pushdown_key_and_key_expression +05291_lazy_load_tables_hypothetical_objects +05291_memory_database_detached_name_is_reserved # only=tcp: the test drops the current database; over HTTP each later request fails +05291_mv_ordinary_view_over_source_reads_table +05291_mv_to_modify_query_keeps_column_comments +05291_query_parameters_in_row_policy_and_filter_settings +05291_remove_unused_columns_through_limit +05291_text_index_phrase_search_build_memory_fault +05291_variance_stable_single_non_finite +05292_alter_rename_and_modify_nested_member +05292_analyzer_setting_float_value +05292_lateral_join_nullable_key_local_json +05292_modify_order_by_retyped_or_renamed_column +05292_mv_source_substitution_scope +05292_outer_if_condition_through_or_null_if +05292_regexp_local_cache_profile_events +05292_replace_always_true_filter_join_order +05292_split_filter_renamed_filter_column_dangling_input # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +05292_ttl_array_map_constant_lambda_body +05292_ttl_constant_delete_where_multi_row_part +05293_argmin_argmax_first_index_on_ties +05293_datalake_catalog_database_comment +05293_fold_filter_through_materialize_kept_filter_column +05293_key_condition_monotonic_transform_strict_bounds +05293_lateral_join_table_function_group_by_limit_json +05293_map_bucket_indexes_codec +05293_memory_nested_member_added_by_alter +05293_mv_ordinary_view_over_source_inlined +05293_profile_events_once_per_block +05293_storage_limits_break_for_shipped_plan +05293_time_series_copy_tags_const_groups +05293_ttl_expression_uses_server_settings +05293_window_functions_range_offset_nan +05294_inverse_dictionary_lookup_float_container_keys +05294_lazy_materialization_for_join_without_order_by +05294_metadata_only_alter_guard_alias_dependency +05294_multi_match_profile_events_once_per_block +05294_time_series_samples_ttl +05295_explain_ast_backup_locator_columns_name +05295_json_shared_typed_paths_bucketed_map +05295_lazy_final_filter_above_row_index +05296_conflict_detector_dynamic_join_key_null_match +05296_join_using_alias_outermost_join_only +05296_quantile_deterministic_merge_over_network +05296_sql_compatible_division_for_integers +05296_top_k_dynamic_filter_conjunction_name_clash +05296_window_functions_ntile_large_bucket_count +05297_prometheus_query_rfc3339_time +05297_sql_compatible_division_for_integers_errors +05297_window_functions_offset_functions_max_offset +05298_sql_compatible_division_for_integers_optimizer +05298_window_functions_frame_offset_bounds +05299_sql_compatible_division_for_integers_types +05299_window_functions_low_cardinality_arguments +05301_memory_update_after_modify_column +05306_json_shared_typed_paths_uncompressed_cache +05312_ast_json_dictionary_definition_shapes +05314_multiif_to_if_group_by_use_nulls +05315_explain_ast_parenthesized_query_output_options +05315_forbid_drop_column_referenced_by_mv_index_hint +05315_generate_random_variant_memory_limit +05315_group_by_limit_dynamic_filter_block_dependent +05315_if_tuple_null_element_in_both_branches +05315_lateral_join_duplicate_projection_names +05315_logsql_scientific_decimals_subquery_values_and_max_offsets +05315_low_cardinality_subcolumn_mutation_lazy_stream +05315_projection_order_by_single_element_tuple +05315_regr_aggregates_with_nan +05315_text_index_map_keys_derived_map_element +05315_text_index_postings_cache_readable_rows +05316_aggregation_serialized_keys_chunks +05316_ast_json_dictionary_pair_without_value +05316_lateral_join_volatile_table_functions_and_join_overflow +05316_limit_after_until_reject_matcher +05316_map_remove +05316_morton_encode_argument_types_and_masks +05316_parquet_all_null_chunk_null_as_default_pruning +05316_skip_index_lossless_conversion +05316_todatetime64_nullable_string_null_rows +05316_top_k_primary_key_skip_query_condition_cache +05316_trino_compatible_syntax +05316_window_functions_no_input_columns +05317_alter_reset_setting_auto_statistics_types +05317_array_join_in_interpolate_and_totals_having # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +05317_block_nested_loop_join_duplicate_input_names +05317_bloom_filter_json_subcolumn_cast +05317_column_ttl_on_key_subcolumn +05317_group_by_top_k_query_condition_cache_keys +05317_hypothetical_projection_force_in_subqueries +05317_key_condition_signed_zero_nested_transform +05317_lateral_join_default_strictness +05317_logsql_quoted_string_escapes +05317_map_combinator_time_key +05317_map_entries +05317_parquet_prewhere_dictionary_encoded_pages +05317_projection_alias_columns_sharing_expression +05317_promql_unimplemented_calls +05317_unevaluable_chain_exact_range +05318_array_has_all_has_any_long_integer_arrays +05318_lateral_join_json_natural_paste_round_trip +05318_projection_positional_arguments_remote_insert +05318_text_index_trivial_count_lazy_cursors +05319_array_min_max_decimal_fast_path +05319_cnf_alias_referenced_twice +05319_hypothetical_projection_part_histories +05319_lateral_join_volatile_hidden_filters +05320_block_nested_loop_join_duplicate_input_name +05320_clear_statistics_then_name_reuse +05320_compatibility_keeps_backup_on_cluster_bounds +05320_date_time_overflow_behavior_review_followups +05320_disk_function_key_without_value +05320_function_composition_correlated_join_tree_subquery +05320_generaterandom_create_as_keeps_settings +05320_hypothetical_projection_nondeterministic_filter +05320_join_under_always_false_where_reads_nothing +05320_lateral_join_bare_offset +05320_memory_top_k_dynamic_filter +05320_nested_member_added_by_alter_subcolumns +05320_outer_to_inner_join_with_in_subquery_filter +05320_point_in_polygon_huge_coordinates +05320_projection_used_with_pending_drop_of_unrelated_column +05320_promql_duplicate_series_check_per_step +05320_promql_duplicate_series_one_to_one_matching +05320_prune_array_join_numeric_index_shared_node +05320_set_index_nullable_null_granule_prune +05320_statistics_cache_prewarm +05320_string_filters_mutation_on_fly_guard +05320_unhex_fixed_string_odd_width +05321_complex_key_dictionary_read_per_block +05321_function_composition_operator_identity +05321_generate_random_settings_cache_separation +05321_hypothetical_projection_reject_before_read +05321_in_subquery_of_standalone_expression_under_materialized_view +05321_lateral_join_volatile_hidden_filters_table_function +05321_lower_upper_utf8_icu_equivalence +05321_parquet_bool_hint_no_minmax_pruning +05321_read_in_order_string_vs_fixed_string_constant +05321_text_index_trivial_count_lazy_leapfrog_five_tokens +05322_generate_random_expression_schema_settings_persistence +05322_hypothetical_projection_mark_type_from_table +05322_lateral_join_opaque_view +05322_point_in_polygon_const_matches_non_const +05322_rabbitmq_invalid_routing_keys +05322_tsv_crlf_escape_sequence_at_buffer_end +05323_generate_random_settings_only_persistence +05323_lateral_join_executable +05324_hypothetical_projection_read_limits_of_scope +05324_lateral_join_volatile_table_engines +05325_datetime64_key_integer_strict_bound +05325_join_statistics_huge_row_estimates +05325_lazy_replication_sort_merge +05325_map_combinator_legacy_nan_keys +05325_merge_over_merge_prewhere_after_pushdown +05325_merge_tree_projection_parent_snapshot +05325_normal_projection_rejected_keeps_parent_parts +05325_null_safe_join_float_keys +05325_partition_pruning_null_safe_comparison_null_result +05325_show_full_every_form +05325_string_filters_columns_cache_guard +05325_tuple_comparison_nullable_nothing_element +05325_union_subquery_opt_out_query_cache_arms +05326_aggregation_two_level_decision_query_memory # only=tcp: HTTP request or response compression changes the query memory +05326_minmax_pruning_use_skip_indexes_repro +05326_string_filters_move_to_prewhere_applicability +05326_text_index_lazy_exact_and_skip_dense_blocks +05327_use_aggregation_memory_tracker_compatibility +05329_promql_empty_vector_time_grid +05330_optimize_and_compare_chain_time_point_constant_scale +05331_analyzer_table_alias_equals_database_name +05331_and_compare_chain_outer_join_on +05331_canbesafelycast_in_set_key_types +05331_decimal_integer_overflow_key_analysis +05331_distributed_plan_in_memory_exchange_constant_sort_key +05331_encrypt_decrypt_argument_columns +05331_explain_query_tree_hides_table_function_secret_settings +05331_function_composition_placeholders_in_subquery +05331_geometry_intersect_empty_linear +05331_h3_polygon_to_cells_small_polygons +05331_inconsistent_ast_in_under_tuple_element_in_function_arg +05331_ipcrypt_secret_arguments +05331_join_engine_count_matches_read +05331_join_order_one_side_unknown_rows +05331_lazy_load_tables_heavy_update_key_column +05331_map_enum_negative_bloom_filter_in +05331_map_remove_signed_unsigned_keys +05331_parquet_bool_hint_nonzero_is_true +05331_promql_date_non_finite +05331_query_result_cache_subquery_partial_read +05331_rewrite_in_to_join_with_totals # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +05331_skip_index_disjunction_rpn_position +05331_text_index_lazy_mismatched_search_shared_token +05331_top_k_through_join_merge_table_filter +05331_xgboost_validation_without_rows +05332_aggregation_bucket_top_k_simple_count +05332_apply_lambda_call_followed_by_operator +05332_function_composition_nested_placeholders +05332_lazy_load_tables_unload_primary_key_server_wide +05332_obfuscate_profile_seed_query_cache +05332_promql_set_operator_empty_on +05332_string_filters_move_to_prewhere_top_k +05332_sum_map_filtered_with_overflow +05333_bloom_filter_left_array_join +05333_function_composition_expression_name_priority +05337_parallel_join_max_joined_block_size +05338_dynamic_key_transform_cross_type +05338_group_by_top_k_key_only_shared_boundary +05338_group_by_top_k_query_condition_cache_computed_key +05338_hypothetical_projection_in_subquery_runs_once +05338_join_reorder_fact_without_column_statistics +05338_lazy_materialization_for_join_repeated_row_index +05338_mutation_keeps_no_files_of_column_part_does_not_store +05338_projection_calculation_type_folded_constants +05338_promql_range_function_over_scalar_subquery +05338_skip_index_lossless_conversion_drop_nullable +05338_sql_compatible_division_for_integers_kusto +05338_text_index_multi_search_any_dictionary_scan +05339_alter_add_column_data_type_default_nullable +05339_alter_modify_ttl_query_scoped_subquery_suspicious +05339_analyzer_sample_of_one_joined_table +05339_bloom_filter_lossless_conversion_time_zone_bool +05339_correlated_subquery_as_whole_filter +05339_decimal_wide_comparison_scale_overflow +05339_explain_ast_optimize_prewhere_in_subquery_over_remote +05339_group_by_limit_dynamic_filter_lambda_block_dependent +05339_h3_cell_area_antimeridian +05339_hash_join_right_full_every_key_matched +05339_key_condition_atom_group_description +05339_lazy_materialization_for_reordered_join_alias_outputs +05339_mv_source_table_in_expression_subqueries +05339_prewhere_subcolumn_read_steps +05339_projection_calculation_renamed_aggregate_functions +05339_query_log_spilled_to_disk_block_nested_loop_join +05339_sql_compatible_division_for_integers_key_optimizations +05339_summing_final_keeps_zero_rows +05339_timezone_offset_monotonicity_dst +05340_adaptive_aggregator_nullable_keys +05340_custom_disk_error_hides_secrets +05340_key_condition_set_mapping_transform +05340_local_time_monotonicity_clock_change +05340_map_element_to_subcolumn_bucketed_only +05340_projection_lightweight_delete_rebuild_normal_projection +05340_streaming_queries_lazy_materialization_for_join +05340_text_index_preprocessor_cast_drop_nullable +05340_where_equality_null_in_tuple_join_key +05341_text_index_map_json_default_value_throws +05342_lazy_materialization_for_join_repeated_names +05342_sql_compatible_division_for_integers_float_optimizer +05343_lazy_materialization_for_join_padded_side_can_throw +05343_sql_compatible_division_for_integers_constant_unsigned_divisor +05343_text_index_stale_positions_after_redefinition +05344_exact_division_metadata +05344_lazy_materialization_for_join_masked_values +05345_exact_division_ast +05345_in_subquery_row_policy_under_view_inner_query_in_materialized_view +05345_lazy_materialization_for_join_without_condition +05345_lower_array_join_empty_array_to_single +05345_nullable_string_size_subcolumn_and_sum_rewrite +05345_string_filters_during_scan_merge_tree_short_values_bulk_scan +05345_text_index_direct_read_per_part_patches +05345_text_index_prewhere_read_step_order +05345_trino_base64url_aliases +05346_exact_division_default_setting +05346_lazy_materialization_for_join_rejected_side +05346_optimize_or_like_chain_shared_alias +05346_string_filters_during_scan_merge_tree_short_values_bulk_scan_other_conditions +05347_lazy_materialization_for_join_memory_table +05348_exact_division_join_order +05349_external_set_block_ranges +05350_comparison_tuple_elimination_shared_alias +05351_date_diff_day_datetime_before_local_epoch +05352_buffer_converted_column_prewhere_steps +05353_merge_child_columns_read_for_policy_or_alias +05353_substitute_columns_constraint_ast +05353_table_readonly_attach_partition_source +05355_ip_trie_two_key_columns_short_circuit +05355_projection_calculation_aggregate_functions_resolved_to_same +05356_projection_calculation_ignores_parallel_replicas_custom_key +05358_null_constant_argument_not_strictly_monotonic +05359_interpolate_converted_expression_read_by_other_target +05359_optimize_aggregators_of_group_by_keys_exact_quantiles_bit_and_or +05359_text_index_inject_without_virtual_column +05359_virtual_column_filter_partial_and +05361_exact_division_nonfinite_aggregate +05361_projection_calculation_ignores_additional_result_filter +05364_virtual_column_filter_index_hint +05366_dpsub_conflict_detector_split_inner_conjunct +05366_exact_count_with_normal_projection +05366_join_swap_bool_literal_json_path +05366_json_path_element_not_string_subcolumn_rewrite +05366_promql_pushdown_aggregation_without_arguments +05366_quoted_printable +05366_uniq_combined_merge_into_empty +05366_window_functions_bug_ntile_distributed_constant +05366_window_functions_totals_sorting # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +05367_dpsub_conflict_detector_defer_conjunct_outer_join +05367_kv_tuple_key_filter_low_cardinality +05367_merge_read_in_order_iceberg +05368_dpsub_conflict_detector_full_left_null_rejection +05371_text_index_count_read_rows_progress +05385_fuse_filter_array_join_lift_row_actions +05385_group_by_use_nulls_constant_condition_group_by_key # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +05385_summing_merge_tree_nested_map_compound_low_cardinality +05386_aggregators_of_group_by_keys_grouping_sets_use_nulls +05386_analyzer_identifier_cache_constant_if_chain +05393_window_over_join_empty_in_set +05394_distributed_plan_runtime_filter_low_cardinality_key +05394_key_condition_fixed_string_constant_without_reverse_conversion +05394_restore_null_dictionary_source_without_source +05394_short_circuit_reorder_arguments_nested_shared +05394_statistics_cache_weight +05394_vertical_merge_packed_part +05395_key_condition_unusable_set_is_not_built +05395_vertical_merge_packed_part_empty_result +05396_key_condition_curve_hyperrectangle_through_atom_groups +05396_merge_tree_text_index_postings +05397_fuse_filter_into_left_array_join +05397_json_subcolumn_serialization_cache +05397_key_condition_memory_limit_in_key_transform +05397_lazy_materialization_for_join_unread_side_computed +05398_lazy_materialization_for_join_unmatched_defaults +05398_skip_index_disjunction_unevaluated_atom +05399_lazy_materialization_for_join_stateful_values +05400_lazy_materialization_for_join_masked_constant_arguments +05401_array_has_all_any_slice_boundaries +05401_columns_cache_shared_deserialize_states +05401_convert_join_to_in_query_condition_cache +05401_explain_ast_graph_node_ids +05401_index_hint_derived_below_group_by # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +05401_index_hint_derived_query_condition_cache +05401_join_conversion_constness_sensitive_filter +05401_lazy_materialization_for_join_use_nulls_constants +05401_least_greatest_nan_compiled +05401_rename_chain_keeps_statistics_wide +05401_replace_regexp_all_quantified_caret +05401_sample_top_k_skip_index +05401_skip_index_final_float_primary_key +05401_subcolumn_size_without_reading_prefixes # only=http: over native the EXPLAIN query reads bytes (also clickhouse-client) +05401_vector_search_dot_product_no_rescoring +05401_vector_search_no_rescoring_dense_candidates +05401_where_float_equality_nan_join_key +05402_array_index_nullable_enum_null_slot +05402_lazy_materialization_declared_part_offset +05402_mv_source_table_in_hidden_filters +05402_window_function_through_alias_chain_computed_once +05403_lazy_materialization_for_join_short_circuit +05404_always_true_equality_selectivity +05404_lazy_materialization_for_join_random_value_and_its_cast +05405_array_join_lazy_replication_chunk_bytes +05405_json_shared_typed_paths_adaptive_granularity_merge +05406_elasticsearch_table_function_arguments_persisted +05406_hash_table_stats_key_group_cap +05406_join_swap_array_join_estimate +05406_lazy_materialization_for_join_with_totals # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +05407_estimate_compression_ratio_large_block +05407_lazy_materialization_for_join_totals_in_child_plans # only=tcp: no WITH TOTALS row in the HTTP RowBinary output +05408_lazy_materialization_for_join_direct_join +05409_lazy_materialization_for_join_padded_function_can_throw +05410_lazy_materialization_for_join_nested_unread_side +05410_parse_date_time_daylight_saving_time +05417_array_join_window_cut_once +05421_bloom_filter_text_index_total_size +05427_azure_sas_url_parsing +05427_polygon_convex_hull_empty_exterior_ring +05427_sparsity_date32_default_not_zero +05428_malformed_nested_json_type_parser +05441_dpsub_conflict_detector_computed_column_null_supplying +05441_kql_bin_narrow_datetime +05441_msgpack_schema_inference_untypeable_map_key +05441_obfuscate_more_types +05442_ai_functions_privileges_stored_expressions +05442_dpsub_conflict_detector_partial_merge_semi_join +05442_xgboost_concurrent_prediction +05443_async_insert_mv_dedup_empty_partition_block +05443_join_reorder_converted_outer_join_type_change +05443_obfuscate_datetime64_range_boundaries +05452_aggregate_state_version_relabel_replicated_column +05453_join_reorder_or_of_constant_equalities +05453_merge_child_row_policy_before_prewhere +05457_join_runtime_filter_nested_cast_key +05457_json_extract_datetime_compatibility +05459_ai_functions_background_defaults +05480_geometry_rows_after_empty_value +05480_lateral_join_setting_alias +05483_crosstab_window_state_layout +05484_crosstab_window_merge_ordinary_states +05485_crosstab_window_merge_wrapped_states +05492_paste_join_redundant_sorting +05497_jit_multiif_decimal128_scale_lift_overflow +05498_group_by_two_level_few_keys_prefetch +05498_s3_disk_sse_c_key_validation +05567_group_array_sample_counter_overflow +05616_key_condition_to_string_key_in_subquery +05617_gini_deserialize_validation +05617_mongodb_format_schema_query_null_query_tree +05617_orc_nested_struct_without_requested_fields +05618_to_string_monotonicity_digit_count +05627_prewhere_guard_sibling_subcolumn +4060_row_policy_projection_not_found_column + +############################################################################## +# Known failures +############################################################################## + +#----------------------------------------------------------------------------- +# [http-type-interval] client: HTTP: the Interval types are not supported +# The HTTP type parser does not know IntervalNanosecond .. IntervalYear. +# The TCP client reads them as Int64. +# Reproduction: +# SELECT toIntervalDay(1) +# -- ArgumentException: Unknown type: IntervalDay +# Issue: not filed yet +# Protocols: http +# Tests: http 34 +# 01099_operators_date_and_timestamp # [http-type-interval] +01523_interval_operator_support_string_literal # known=http: [http-type-interval] +01916_low_cardinality_interval # known=http: [http-type-interval] +01916_lowcard_dict_type # known=http: [http-type-interval] +02366_kql_func_datetime # known=http: [http-type-interval] +# 02366_kql_native_interval_format # [http-type-interval] +02457_tuple_of_intervals # known=http: [http-type-interval] +02480_interval_casting_and_subquery # known=http: [http-type-interval] +02724_persist_interval_type # known=http: [http-type-interval] +02884_interval_operator_support_plural_literal # known=http: [http-type-interval] +03403_toInterval # known=http: [http-type-interval] +03404_dynamic_in_interval_bug # known=http: [http-type-interval] +04051_functions_various_bugs # known=http: [http-type-interval] +04054_compound_interval_literals # known=http: [http-type-interval] +# 04092_kql_conformance_baby_kusto # [http-type-interval] +# 04093_kql_conformance_kusto_loco # [http-type-interval] +04093_remove_mutable_from_functions_lowcardinality # known=http: [http-type-interval] +04240_interval_cast_forward_conversion # known=http: [http-type-interval] +04539_arithmetic_context_free_execution # known=http: [http-type-interval] +# 04672_kql_semantics # [http-type-interval] +# 04676_kql_function_families # [http-type-interval] +# 04759_kql_bin_floor_timespan_type_defaults # [http-type-interval] +04822_kql_timespan_constructor_and_casts # known=http: [http-type-interval] +04831_kql_range_typed_and_dynamic_negative # known=http: [http-type-interval] +04846_kql_bin_timespan_bin_at_alignment_decimal_range # known=http: [http-type-interval] +04903_kql_nullable_timespan_dynamic_literals # known=http: [http-type-interval] +# 05019_kql_review_followups # [http-type-interval] +# 05044_kql_exact_scaling_and_tabular_contract # [http-type-interval] +# 05054_interval_binary_decoding_invalid_kind # [http-type-interval] +05237_avg_interval # known=http: [http-type-interval] +05238_sum_interval # known=http: [http-type-interval] +05258_arithmetic_constant_element_in_array_or_tuple # known=http: [http-type-interval] +05321_aggregate_arithmetic_compound_operand # known=http: [http-type-interval] +05361_top_k_dynamic_filter_interval # known=http: [http-type-interval] + +#----------------------------------------------------------------------------- +# [http-datetime64-precision] client: HTTP: DateTime64 with precision 8 or 9 is cut to 100 ns +# A DateTime64 value is a .NET DateTime (100 ns ticks). The count is cut +# toward 1970-01-01, so before 1970 the value is later. No error. The TCP +# client gives the exact count. +# Reproduction: +# SELECT toDateTime64('2023-12-23 20:37:33.035123456', 9, 'UTC') +# -- 2023-12-23 20:37:33.0351234 +# Issue: not filed yet +# Protocols: http +# Tests: http 32 +00514_interval_operators # known=http: [http-datetime64-precision] +01277_toUnixTimestamp64 # known=http: [http-datetime64-precision] +01277_unixTimestamp64_compatibility # known=http: [http-datetime64-precision] +01281_parseDateTime64BestEffort # known=http: [http-datetime64-precision] +01734_datetime64_from_float # known=http: [http-datetime64-precision] +01867_support_datetime64_version_column # known=http: [http-datetime64-precision] +02207_subseconds_intervals # known=http: [http-datetime64-precision] +02245_make_datetime64 # known=http: [http-datetime64-precision] +02842_largestTriangleThreeBuckets_aggregate_function # known=http: [http-datetime64-precision] +02900_add_subtract_interval_with_string_date # known=http: [http-datetime64-precision] +02916_to_start_of_interval_with_origin # known=http: [http-datetime64-precision] +02935_date_trunc_case_unsensitiveness # known=http: [http-datetime64-precision] +02998_to_milliseconds # known=http: [http-datetime64-precision] +03326_toStartOfNanosecond_ubsan # known=http: [http-datetime64-precision] +03407_parse_date_time_best_effort_unix_timestamp_with_fraction # known=http: [http-datetime64-precision] +03800_extended_to_start_of_interval # known=http: [http-datetime64-precision] +# 04092_date_plus_time # [http-datetime64-precision] +04113_best_effort_unix_timestamp_micro_nano # known=http: [http-datetime64-precision] +04201_add_subtract_subsecond_with_timezone # known=http: [http-datetime64-precision] +04201_date_trunc_subsecond_with_timezone # known=http: [http-datetime64-precision] +04249_parseDateTime64BestEffort_unix_timestamp_subsecond # known=http: [http-datetime64-precision] +04413_changeyear_nanosecond_datetime64 # known=http: [http-datetime64-precision] +04492_json_datetime64_number_input # known=http: [http-datetime64-precision] +04512_with_fill_interval_step_int64_overflow # known=http: [http-datetime64-precision] +04648_toStartOfInterval_origin_result_overflow # known=http: [http-datetime64-precision] +04823_avg_datetime64_boundary_no_ub # known=http: [http-datetime64-precision] +04903_quantile_datetime64_boundary_no_ub # known=http: [http-datetime64-precision] +05218_datetime64_time64_in_constant_window # known=http: [http-datetime64-precision] +05242_date_time_overflow_behavior_wide_numeric_carriers # known=http: [http-datetime64-precision] +05291_date_time_overflow_behavior_values_date32_to_datetime64 # known=http: [http-datetime64-precision] +05292_date_time_overflow_behavior_with_fill_date_bound # known=http: [http-datetime64-precision] +05315_jit_multiif_decimal_scale_lift_overflow # known=http: [http-datetime64-precision] + +#----------------------------------------------------------------------------- +# [http-type-dynamic-max-types] client: HTTP: Dynamic(max_types=N) is not supported +# The HTTP type parser does not know the max_types argument. +# Reproduction: +# SELECT 1::Dynamic(max_types=2) +# -- ArgumentException: Unknown type: Dynamic(max_types=2) +# Issue: ClickHouse/clickhouse-cs#626 (fix: ClickHouse/clickhouse-cs#628, +# open) +# Protocols: http +# Tests: http 22 +03034_dynamic_conversions # known=http: [http-type-dynamic-max-types] +03035_dynamic_sorting # known=http: [http-type-dynamic-max-types] +03036_dynamic_read_shared_subcolumns_small # known=http: [http-type-dynamic-max-types] +03040_dynamic_type_alters_1_compact_merge_tree # known=http: [http-type-dynamic-max-types] +03040_dynamic_type_alters_1_memory # known=http: [http-type-dynamic-max-types] +03040_dynamic_type_alters_1_wide_merge_tree # known=http: [http-type-dynamic-max-types] +03150_dynamic_type_mv_insert # known=http: [http-type-dynamic-max-types] +03151_dynamic_type_scale_max_types # known=http: [http-type-dynamic-max-types] +# 03152_dynamic_type_simple # [http-type-dynamic-max-types] +03159_dynamic_type_all_types # known=http: [http-type-dynamic-max-types] +03163_dynamic_as_supertype # known=http: [http-type-dynamic-max-types] +03231_dynamic_uniq_group_by # known=http: [http-type-dynamic-max-types] +03233_dynamic_in_functions # known=http: [http-type-dynamic-max-types] +03272_json_to_json_cast_6 # known=http: [http-type-dynamic-max-types] +04029_json_typed_path_type_hint_subcolumn # known=http: [http-type-dynamic-max-types] +04036_dynamic_statistics_invalidation # known=http: [http-type-dynamic-max-types] +04038_json_array_element_to_subcolumn # known=http: [http-type-dynamic-max-types] +04058_topk_dynamic_filtering_with_dynamic_type # known=http: [http-type-dynamic-max-types] +04101_json_skip_regexp_parentheses_in_type_hint # known=http: [http-type-dynamic-max-types] +# 04408_decimal_constant_exact_serialization_dist # [http-type-dynamic-max-types] +04753_dynamic_map_buckets_pooled_serialization # known=http: [http-type-dynamic-max-types] +04812_json_nested_array_size_subcolumn # known=http: [http-type-dynamic-max-types] + +#----------------------------------------------------------------------------- +# [type-aggregate-function] client: AggregateFunction(...) is not supported +# Both clients document it. HTTP throws AggregateFunctionException; TCP +# throws ClickHouseTcpProtocolException and closes the connection. +# Reproduction: +# SELECT sumState(1) +# -- HTTP: Unable to directly query column with type AggregateFunction(sum) +# -- TCP: ClickHouseTcpProtocolException ... cannot read +# Issue: not filed yet +# Protocols: http, tcp +# Tests: http 6, tcp 19 +# 01088_array_slice_of_aggregate_functions # [type-aggregate-function] +# 01880_materialized_view_to_table_type_check # [type-aggregate-function] +01961_roaring_memory_tracking # known=tcp: [type-aggregate-function] +02149_issue_32487 # known=tcp: [type-aggregate-function] +# 02418_aggregate_combinators # [type-aggregate-function] +# 02428_combinators_with_over_statement # [type-aggregate-function] +# 02429_combinators_in_array_reduce # [type-aggregate-function] +# 02430_initialize_aggregation_with_combinators # [type-aggregate-function] +02520_group_array_last # known=tcp: [type-aggregate-function] +02552_regression_crash # known=tcp: [type-aggregate-function] +02812_large_varints # known=tcp: [type-aggregate-function] +03127_argMin_combinator_state # known=tcp: [type-aggregate-function] +03529_quantile_deterministic_ubsan # known=tcp: [type-aggregate-function] +04049_numeric_indexed_vector_negative_scalar_ubsan # known=tcp: [type-aggregate-function] +04209_running_accumulate_state_combinator # known=tcp: [type-aggregate-function] +04500_index_hint_nothing_argument_type # known=tcp: [type-aggregate-function] +04614_group_array_state_resample_finalize_no_crash # known=tcp: [type-aggregate-function] +04623_union_aggregate_state_in_tuple_header # known=tcp: [type-aggregate-function] +04638_tuple_combinator_nested_suffix_nulls_action # known=tcp: [type-aggregate-function] + +#----------------------------------------------------------------------------- +# [http-empty-tuple-rows] client: HTTP: the rows of a Tuple() result are lost +# RowBinary has no bytes for a row of zero-width columns, and the reader +# stops at the end of the bytes. No error. TCP is correct. +# Reproduction: +# SELECT tuple() FROM numbers(3) -- 0 rows, expected 3 rows () +# Issue: ClickHouse/clickhouse-cs#570 (closed as not planned) +# Protocols: http +# Tests: http 16 +02891_empty_tuple # known=http: [http-empty-tuple-rows] +03167_empty_tuple_concat # known=http: [http-empty-tuple-rows] +03229_empty_tuple_in_array # known=http: [http-empty-tuple-rows] +03577_assert_on_estimated_block_size_bytes # known=http: [http-empty-tuple-rows] +03594_funcs_on_empty_arguments # known=http: [http-empty-tuple-rows] +03652_coalescing_merge_tree_fix_empty_tuple # known=http: [http-empty-tuple-rows] +03652_coalescing_merge_tree_fix_empty_tuple_allow_tuple_element_aggregation # known=http: [http-empty-tuple-rows] +03710_empty_tuple_lhs_in_function # known=http: [http-empty-tuple-rows] +03714_empty_tuple_reverse_function # known=http: [http-empty-tuple-rows] +03715_empty_tuple_functions_conversion # known=http: [http-empty-tuple-rows] +03721_tuple_inside_nullable_array_element_function # known=http: [http-empty-tuple-rows] +03725_empty_tuple_some_limit_with_ties_distinct # known=http: [http-empty-tuple-rows] +03764_empty_tuple_permutation_bug # known=http: [http-empty-tuple-rows] +04057_tuple_empty_supertype # known=http: [http-empty-tuple-rows] +04093_empty_tuple_parsing # known=http: [http-empty-tuple-rows] +04838_top_k_dynamic_filter_empty_tuple # known=http: [http-empty-tuple-rows] + +#----------------------------------------------------------------------------- +# [session-timezone] client: TCP: session_timezone is ignored +# DateTime values get the time zone of the handshake, also with a +# SETTINGS session_timezone clause; only +# ClickHouseTcpQueryOptions.Settings counts. The instant is correct. +# (Over HTTP the client documents the UTC wall clock and gives +# ClickHouseCommand.ServerTimezone; the shim uses it.) +# Reproduction: +# SET session_timezone = 'Asia/Tokyo'; +# SELECT toDateTime('2020-01-01 00:00:00') -- zone UTC, expected Asia/Tokyo +# Issue: not filed yet +# Protocols: tcp +# Tests: tcp 15 +# Also: 01099_operators_date_and_timestamp [http-type-interval], +# 04092_date_plus_time [http-datetime64-precision] (listed under the +# other group). +02737_session_timezone # known=tcp: [session-timezone] +02812_from_to_utc_timestamp # known=tcp: [session-timezone] +03266_with_fill_staleness # known=tcp: [session-timezone] +03365_time64_from_datetime_timezone_respect # known=tcp: [session-timezone] +03365_time_timezone_issue # known=tcp: [session-timezone] +04029_with_fill_staleness_cross_chunk # known=tcp: [session-timezone] +04056_mutation_session_timezone_datetime_literals # known=tcp: [session-timezone] +04231_timezone_select_with_changed_setting # known=tcp: [session-timezone] +04322_106474_session_timezone_lowcardinality_datetime # known=tcp: [session-timezone] +04545_tostartof_month_week_day_interval_extreme_overflow # known=tcp: [session-timezone] +05023_join_equi_key_pushdown_session_timezone # known=tcp: [session-timezone] +05024_datetime64_or_null_zero_precision # known=tcp: [session-timezone] +05217_mutation_datetime_reversed_and_in_clause # known=tcp: [session-timezone] + +#----------------------------------------------------------------------------- +# [tcp-session-lost-on-error] client: TCP: the session state is lost after a server exception +# ClickHouseTcpConnection.QueryAsync leaves reusable = false after an +# Exception packet, so the connection closes: session.IsOpen is false, +# temporary tables and SET values are lost. The shim rebuilds SET and +# USE. +# Reproduction: +# CREATE TEMPORARY TABLE t (x UInt8); INSERT INTO t VALUES (1); +# SELECT throwIf(1); SELECT * FROM t -- UNKNOWN_TABLE +# Issue: not filed yet +# Protocols: tcp +# Tests: tcp 14 +# 01286_constraints_on_default: over http an environment cause +# (clickhouse-client ends the connection after a client error). +01018_dictionaries_from_dictionaries # known=tcp: [tcp-session-lost-on-error] +# 01286_constraints_on_default # [tcp-session-lost-on-error] +01732_bigint_ubsan # known=tcp: [tcp-session-lost-on-error] +01933_invalid_date # known=tcp: [tcp-session-lost-on-error] +02385_profile_events_overflow # known=tcp: [tcp-session-lost-on-error] +03101_analyzer_identifiers_2 # known=tcp: [tcp-session-lost-on-error] +04064_describe_show_create_temporary_table # known=tcp: [tcp-session-lost-on-error] +04228_check_optimize_alter_temporary_scoping_100966 # known=tcp: [tcp-session-lost-on-error] +04239_detach_table_on_temporary_table_103475 # known=tcp: [tcp-session-lost-on-error] +04401_rocksdb_backup_restore # known=tcp: [tcp-session-lost-on-error] +04538_session_query_ids # known=tcp: [tcp-session-lost-on-error] +05257_temporary_table_limits # known=tcp: [tcp-session-lost-on-error] +05291_iceberg_optimize_explicit_metadata # known=tcp: [tcp-session-lost-on-error] +05325_mongodb_uri_conflict_error_hides_values # known=tcp: [tcp-session-lost-on-error] + +#----------------------------------------------------------------------------- +# [date32-year-zero] client: Date32 in year 0 cannot be read +# Date32 values start at 0000-01-01 since 26.x. HTTP maps it to DateTime, +# TCP to DateOnly; both start at year 1 (a limit of the .NET type). TCP +# closes the connection. +# Reproduction: +# SELECT toDate32('0000-01-01') +# -- HTTP: ArgumentOutOfRangeException ... un-representable DateTime +# -- TCP: Day number must be between 0 and DateOnly.MaxValue.DayNumber +# Issue: not filed yet +# Protocols: http, tcp +# Tests: http 13, tcp 13 +# 02243_make_date32 # [date32-year-zero] +# 02243_make_date32_mysql # [date32-year-zero] +# 02876_yyyymmddtodate # [date32-year-zero] +# 02907_fromDaysSinceYearZero # [date32-year-zero] +# 02982_changeDate # [date32-year-zero] +# 03595_funcs_on_zero # [date32-year-zero] +# 03604_to_date_casts # [date32-year-zero] +# 04545_bfloat16_to_datetime_saturation # [date32-year-zero] +# 04626_extend_date32_range # [date32-year-zero] +# 04652_accurate_cast_numeric_to_date32 # [date32-year-zero] +# 04669_date32_wide_unsigned_saturation # [date32-year-zero] +# 04827_date32_numeric_field_range # [date32-year-zero] +# 05227_to_week_mode_8_year_1900 # [date32-year-zero] + +#----------------------------------------------------------------------------- +# [http-dt64-outside-dotnet-range] client: HTTP: DateTime64 before year 1 or after 9999 cannot be read +# The value is a .NET DateTime (a limit of the type). The TCP client +# gives the count. 1600 .. 2300 read and write correctly over both +# protocols. +# Reproduction: +# SELECT toDateTime64OrNull(toInt64(-62167219200), 3, 'UTC') +# -- InvalidOperationException: Instant out of range for DateTime +# Issue: not filed yet +# Protocols: http +# Tests: http 11 +01277_fromUnixTimestamp64 # known=http: [http-dt64-outside-dotnet-range] +01821_to_date_time_ubsan # known=http: [http-dt64-outside-dotnet-range] +# 03011_definitive_guide_to_cast # [http-dt64-outside-dotnet-range] +04402_datetime64_extended_range_review_fixes # known=http: [http-dt64-outside-dotnet-range] +04511_add_days_fixed_offset_fast_path # known=http: [http-dt64-outside-dotnet-range] +04600_to_date_or_null_integer_arguments # known=http: [http-dt64-outside-dotnet-range] +04926_kql_datetime_bin_overflow # known=http: [http-dt64-outside-dotnet-range] +05042_datetime64_saturate_to_max_tick # known=http: [http-dt64-outside-dotnet-range] +05099_date_time_overflow_behavior_datetime64 # known=http: [http-dt64-outside-dotnet-range] +05112_time_filter_preimage_year_zero # known=http: [http-dt64-outside-dotnet-range] +05244_date_time_overflow_behavior_values_expression_fallback # known=http: [http-dt64-outside-dotnet-range] + +#----------------------------------------------------------------------------- +# [tcp-insert-needs-client-data] client: TCP: an INSERT that needs data from the client never returns +# INSERT ... VALUES without data, INSERT ... FROM input() with inline +# data, and INSERT ... FROM INFILE: the server waits for a data block, +# the client waits for the result. After ReadTimeout the connection is +# lost. clickhouse-client gives NO_DATA_TO_INSERT or sends the inline +# data. +# Reproduction: +# CREATE TABLE t (x UInt8) ENGINE = Memory; INSERT INTO t VALUES +# -- no result until ReadTimeout +# Issue: not filed yet +# Protocols: tcp +# Tests: tcp 7 +# 02267_insert_empty_data: over http an environment cause +# (NO_DATA_TO_INSERT is a clickhouse-client check). +02249_insert_select_from_input_schema_inference # known=tcp: [tcp-insert-needs-client-data] +# 02267_insert_empty_data # [tcp-insert-needs-client-data] +02458_use_structure_from_insertion_table # known=tcp: [tcp-insert-needs-client-data] +03005_input_function_in_join # known=tcp: [tcp-insert-needs-client-data] +03351_client_insert_bad_connection_state # known=tcp: [tcp-insert-needs-client-data] +03380_input_async_insert # known=tcp: [tcp-insert-needs-client-data] +04027_remote_input_table_function # known=tcp: [tcp-insert-needs-client-data] + +#----------------------------------------------------------------------------- +# [type-multipoint] client: MultiPoint is not supported +# Also a Geometry value that holds a MultiPoint (discriminator 6). +# Reproduction: +# SELECT [(1, 2), (3, 4)]::MultiPoint +# -- HTTP: Unknown type: MultiPoint +# -- TCP: ClickHouse type 'MultiPoint' is not supported +# Issue: not filed yet +# Protocols: http, tcp +# Tests: http 4, tcp 4 +# 03444_flip_coordinates # [type-multipoint] +# 04509_multipoint_type # [type-multipoint] +# 04510_geojson_multipoint # [type-multipoint] +# 04837_geometry_discriminators_row_binary # [type-multipoint] + +#----------------------------------------------------------------------------- +# [http-type-name-normalized] client: HTTP: GetDataTypeName does not give the server type name +# Tuple element names, Decimal32/64/128/256 and the case of JSON change. +# Seen in the TSVWithNamesAndTypes header. +# Reproduction: +# SELECT CAST((1, 'a'), 'Tuple(a UInt8, b String)'), toDecimal32(1, 2) +# -- Tuple(UInt8,String) Decimal32(2), expected Tuple(a UInt8, b String) Decimal(9, 2) +# Issue: not filed yet +# Protocols: http +# Tests: http 6 +# 04545_format_table_function_zero_rows_schema # [http-type-name-normalized] +05212_timeseries_old_version_time_series_outer_column # known=http: [http-type-name-normalized] +05233_promql_result_value_type # known=http: [http-type-name-normalized] +05234_promql_result_timestamp_scale # known=http: [http-type-name-normalized] +05234_promql_result_timestamp_type # known=http: [http-type-name-normalized] +05241_prometheus_query_timestamp # known=http: [http-type-name-normalized] + +#----------------------------------------------------------------------------- +# [http-time64-precision] client: HTTP: Time64 with precision 8 or 9 is cut to 100 ns +# A Time64 value is a .NET TimeSpan (100 ns ticks). No error. +# Reproduction: +# SELECT toTime64('00:00:01.123456789', 9) -- 00:00:01.1234567 +# Issue: not filed yet +# Protocols: http +# Tests: http 5 +03365_time_time64_extreme_values # known=http: [http-time64-precision] +03365_time_time64_parsing # known=http: [http-time64-precision] +04200_fix_time64_scale_conversion # known=http: [http-time64-precision] +04883_time64_convert_field_scale_overflow # known=http: [http-time64-precision] +05243_datetime64_to_time64_accurate_cast # known=http: [http-time64-precision] + +#----------------------------------------------------------------------------- +# [tcp-tuple-over-7-elements] client: TCP: a Tuple with more than 7 elements is not supported +# The client documents it (docs/tcp.mdx). The connection closes. HTTP +# reads it. 03024 uses generateRandom() without a structure: the server +# picks a random structure, and the test fails only when it has a wider +# Tuple (about half of the runs), so KNOWN_FAILURES can show it as +# passed. +# Reproduction: +# SELECT (1, 2, 3, 4, 5, 6, 7, 8) +# -- Tuple type ... has 8 elements; this client supports at most 7 +# Issue: not filed yet +# Protocols: tcp +# Tests: tcp 5 +02457_morton_coding # known=tcp: [tcp-tuple-over-7-elements] +02833_tuple_concat # known=tcp: [tcp-tuple-over-7-elements] +03024_total_rows_approx_is_set_for_system_zeros_and_generate_random # known=tcp: [tcp-tuple-over-7-elements] +03522_join_using_bug_78907 # known=tcp: [tcp-tuple-over-7-elements] +03702_function_dict_get_keys_basic # known=tcp: [tcp-tuple-over-7-elements] + +#----------------------------------------------------------------------------- +# [tz-sub-minute-offset] client: TCP: a time zone offset with seconds loses the seconds +# TimeZoneInfo offsets have whole minutes (for example Africa/Monrovia +# before 1972: -00:44:30). No error. +# Reproduction: +# SELECT toDateTime('1969-12-31 23:15:30', 'Africa/Monrovia') -- 23:16:00 +# Issue: not filed yet +# Protocols: tcp +# Tests: tcp 5 +# Also: 05116_pre_epoch_sub_minute_offset [http-tz-database-differs] +# (listed under the other group). +01691_DateTime64_clamp # known=tcp: [tz-sub-minute-offset] +01702_toDateTime_from_string_clamping # known=tcp: [tz-sub-minute-offset] +02096_date_time_1970_saturation2 # known=tcp: [tz-sub-minute-offset] +04509_to_start_of_interval_fast_path # known=tcp: [tz-sub-minute-offset] + +#----------------------------------------------------------------------------- +# [http-json-overlapping-paths] client: HTTP: JSON with overlapping typed paths cannot be read +# The client documents it (docs/http.mdx, Overlapping paths). TCP is +# correct. +# Reproduction: +# SELECT '{"a" : 42, "a.b" : 43}'::JSON(a UInt32, `a.b` UInt32) +# -- SerializationException: JSON paths 'a' and 'a.b' overlap +# Issue: not filed yet +# Protocols: http +# Tests: http 4 +03779_json_allow_duplicated_path_with_nested_object_and_literal # known=http: [http-json-overlapping-paths] +03780_json_typed_paths_with_same_prefix # known=http: [http-json-overlapping-paths] +03924_duplicated_key_with_literal_and_nested_object_in_typed_paths_in_json # known=http: [http-json-overlapping-paths] +04331_type_json_allow_duplicated_key_with_literal_and_nested_object_typed_paths # known=http: [http-json-overlapping-paths] + +#----------------------------------------------------------------------------- +# [tcp-empty-result-no-header] client: TCP: an empty result has no column names and types +# StreamAsync and QueryAsync give no block for a result without rows, so +# a TSVWithNames header is lost. HTTP is correct. +# Reproduction: +# SELECT 1 AS a, 'x' AS b WHERE 0 -- no block, expected the header block +# Issue: not filed yet +# Protocols: tcp +# Tests: tcp 4 +# 04336_discard_query_data: over http an environment cause (the HTTP +# interface sends the rows with discard_query_data = 1). +# Also: 04545_format_table_function_zero_rows_schema +# [http-type-name-normalized] (listed under the other group). +02998_system_dns_cache_table # known=tcp: [tcp-empty-result-no-header] +03031_table_function_fuzzquery # known=tcp: [tcp-empty-result-no-header] +# 04336_discard_query_data # [tcp-empty-result-no-header] + +#----------------------------------------------------------------------------- +# [type-qbit] client: TCP: the strided QBit form is not supported +# The client documents it (docs/tcp.mdx). HTTP reads the values. +# Reproduction: +# SELECT [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]::QBit(Float32, 16, 8) +# -- this client does not support the strided QBit layout yet +# Issue: not filed yet +# Protocols: tcp +# Tests: tcp 4 +04489_qbit_stride_create_insert_select # known=tcp: [type-qbit] +04492_qbit_stride_mergetree # known=tcp: [type-qbit] +04510_qbit_array_element_slice # known=tcp: [type-qbit] +04628_lazy_replicated_array_slice_element # known=tcp: [type-qbit] + +#----------------------------------------------------------------------------- +# [query-text-not-utf8] client: Query text with bytes that are not valid UTF-8 cannot be sent unchanged +# The query is a .NET string (a limit of the API; there is no byte query +# API). The bytes become U+FFFD. +# Reproduction: +# SELECT hex('') -- EFBFBD, expected FF +# Issue: not filed yet +# Protocols: http, tcp +# Tests: http 2, tcp 2 +# 01957_heredoc_more # [query-text-not-utf8] +# 02683_native_too_large_size # [query-text-not-utf8] + +#----------------------------------------------------------------------------- +# [binary-encoded-types] client: Types encoded in binary format are not supported +# TCP: output_format_native_encode_types_in_binary_format = 1 gives a +# ReadTimeout or an error, and the connection closes. HTTP (no test sets +# it): output_format_binary_encode_types_in_binary_format = 1 gives +# Unknown type with an empty name. +# Reproduction: +# SET output_format_native_encode_types_in_binary_format = 1; SELECT 1 +# -- TCP: ReadTimeout, or Column ... uses custom serialization +# Issue: not filed yet +# Protocols: tcp +# Tests: tcp 3 +# Also: 05054_interval_binary_decoding_invalid_kind [http-type-interval] +# (listed under the other group). +03298_server_client_native_settings # known=tcp: [binary-encoded-types] +05258_window_function_state_in_query_rejected # known=tcp: [binary-encoded-types] + +#----------------------------------------------------------------------------- +# [http-json-tuple-path] client: HTTP: a JSON path that holds an array of different types cannot be read +# TCP is correct. +# Reproduction: +# 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. +# Issue: ClickHouse/clickhouse-cs#626 (fix: ClickHouse/clickhouse-cs#628, +# open) +# Protocols: http +# Tests: http 3 +03229_json_null_as_default_for_tuple # known=http: [http-json-tuple-path] +03525_json_infer_array_of_dynamic_from_array_of_different_types # known=http: [http-json-tuple-path] +05182_json_shared_data_bucketed_map_compact_no_substream_marks # known=http: [http-json-tuple-path] + +#----------------------------------------------------------------------------- +# [http-json-input-as-string] client: HTTP: the client always sends input_format_binary_read_json_as_string = 1 +# The setting changes how the server reads binary JSON input of a query, +# so a query that parses RowBinary JSON fails. TCP and clickhouse-client +# are correct. +# Reproduction: +# SELECT * FROM format(RowBinary, 'j JSON', unhex('0101610A0100000000000000')) +# -- Code: 117 Cannot parse JSON object here, expected {"a":1} +# Issue: not filed yet (related: ClickHouse/clickhouse-cs#659) +# Protocols: http +# Tests: http 2 +05060_row_binary_huge_string_size # known=http: [http-json-input-as-string] +05429_json_shared_typed_paths_nested_in_shared_data # known=http: [http-json-input-as-string] + +#----------------------------------------------------------------------------- +# [http-dt64-overflow-wraps] client: HTTP: a DateTime64 value near the Int64 limit wraps +# MathUtils.ShiftDecimalPlaces multiplies without an overflow check. No +# error. +# Reproduction: +# SELECT reinterpret(toInt64(9223372036854775616), 'DateTime64(3)') +# -- 1969-12-31 23:59:59.808, expected 9999-12-31 23:59:59.616 +# Issue: not filed yet +# Protocols: http +# Tests: http 2 +04065_toStartOfInterval_overflow # known=http: [http-dt64-overflow-wraps] +04270_toStartOfSubsecond_ubsan_int64_min # known=http: [http-dt64-overflow-wraps] + +#----------------------------------------------------------------------------- +# [http-time64-double-rounding] client: HTTP: a Time64 value is rounded through double +# No error. +# Reproduction: +# SELECT toTime64('00:45:30.123456', 6) -- 00:45:30.1234559 +# Issue: not filed yet +# Protocols: http +# Tests: http 2 +03365_parsing_time_time64_short # known=http: [http-time64-double-rounding] +03365_time_time64_operations # known=http: [http-time64-double-rounding] + +#----------------------------------------------------------------------------- +# [type-json-shared-path] client: HTTP: JSON with SHARED typed paths gives wrong values +# The reader gets out of sync: wrong values and extra rows, no error. Two +# SHARED paths throw ArgumentException. TCP is correct. +# Reproduction: +# SELECT '{"a": 1}'::JSON(SHARED a UInt64) -- {"a":0} and 7 rows, expected 1 row +# Issue: not filed yet +# Protocols: http +# Tests: http 2 +05293_json_shared_typed_paths_nested_column # known=http: [type-json-shared-path] +05427_json_shared_typed_paths_cache_key_collision # known=http: [type-json-shared-path] + +#----------------------------------------------------------------------------- +# [param-conflicting-type-hints] client: A parameter with two type hints in one statement fails +# The client checks each statement, also when the command has no +# parameters. +# Reproduction: +# SELECT {db:String} AS d, count() FROM {db:Identifier}.one -- db = system +# -- ArgumentException: Parameter 'db' has conflicting type hints +# Issue: not filed yet +# Protocols: http, tcp +# Tests: http 1, tcp 1 +# 03823_lazy_load_tables: over http an environment cause (the test drops +# the current database; over HTTP each later request fails). +02346_text_index_array_support # known=http: [param-conflicting-type-hints] +# 03823_lazy_load_tables # [param-conflicting-type-hints] + +#----------------------------------------------------------------------------- +# [http-map-literal-as-parameter] client: HTTP: a Map literal in a statement is read as a parameter +# TCP is correct. +# Reproduction: +# INSERT INTO m VALUES (1, {1 : 'a'}), (2, {1 : 'b'}) +# -- ArgumentException: Parameter '1' has conflicting type hints +# Issue: not filed yet +# Protocols: http +# Tests: http 1 +03998_map_subcolumns_nullable_and_complex_values # known=http: [http-map-literal-as-parameter] + +#----------------------------------------------------------------------------- +# [http-tz-database-differs] client: HTTP: old time zone offsets differ from the server +# The NodaTime TZDB of the client has other rules for some zones before +# 1940. No error. +# Reproduction: +# SELECT toDateTime('1930-06-15 12:00:34', 'Europe/Amsterdam') +# -- offset +01:00, server +00:19:32 +# Issue: not filed yet +# Protocols: http +# Tests: http 1 +# 05116_pre_epoch_sub_minute_offset # [http-tz-database-differs] + +#----------------------------------------------------------------------------- +# [tcp-json-as-string-to-shards] client: TCP: a JSON value read through remote() gives wrong values +# The client's default output_format_native_write_json_as_string = 1 +# reaches the shards. clickhouse-client with that setting gives the same +# result, so the cause can be in the server. No error. +# Reproduction: +# 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, expected 1 +# Issue: not filed yet +# Protocols: tcp +# Tests: tcp 1 +# Also: 04408_decimal_constant_exact_serialization_dist +# [http-type-dynamic-max-types] (listed under the other group). + +#----------------------------------------------------------------------------- +# [shim-output-format] shim: Output formats other than the TabSeparated family and Null +# The shim reads typed values and writes only TabSeparated text. +# Protocols: http, tcp +# Tests: http 285, tcp 289 +# Also: 01825_json_type_insert_select [shim-render-json], +# 03011_definitive_guide_to_cast [http-dt64-outside-dotnet-range], +# 03152_dynamic_type_simple [http-type-dynamic-max-types], +# 04326_json_skip_null_typed_paths [shim-render-json] (listed under the +# other group). +# 00006_extremes_and_subquery_from # [shim-output-format] +# 00017_in_subquery_with_empty_result # [shim-output-format] +# 00037_totals_limit # [shim-output-format] +# 00085_visible_width_of_tuple_of_dates # [shim-output-format] +# 00098_k_union_all # [shim-output-format] +# 00175_partition_by_ignore # [shim-output-format] +# 00231_format_vertical_raw # [shim-output-format] +# 00285_not_all_data_in_totals # [shim-output-format] +# 00298_enum_width_and_cast # [shim-output-format] +# 00300_csv # [shim-output-format] +# 00307_format_xml # [shim-output-format] +# 00308_write_buffer_valid_utf8 # [shim-output-format] +# 00309_formats # [shim-output-format] +# 00367_visible_width_of_array_tuple_enum # [shim-output-format] +# 00378_json_quote_64bit_integers # [shim-output-format] +# 00383_utf8_validation # [shim-output-format] +# 00393_if_with_constant_condition # [shim-output-format] +# 00405_output_format_pretty_color # [shim-output-format] +# 00405_pretty_formats # [shim-output-format] +# 00406_tuples_with_nulls # [shim-output-format] +# 00436_convert_charset # [shim-output-format] +# 00460_vertical_and_totals_extremes # [shim-output-format] +# 00476_pretty_formats_and_widths # [shim-output-format] +# 00490_special_line_separators_and_characters_outside_of_bmp # [shim-output-format] +# 00569_parse_date_time_best_effort # [shim-output-format] +# 00585_union_all_subquery_aggregation_column_removal # [shim-output-format] +# 00597_with_totals_on_empty_set # [shim-output-format] +# 00632_aggregation_window_funnel # [shim-output-format] +# 00674_join_on_syntax # [shim-output-format] +# 00685_output_format_json_escape_forward_slashes # [shim-output-format] +# 00695_pretty_max_column_pad_width # [shim-output-format] +# 00700_decimal_formats # [shim-output-format] +# 00722_inner_join # [shim-output-format] +# 00730_unicode_terminal_format # [shim-output-format] +# 00760_insert_json_with_defaults # [shim-output-format] +# 00802_system_parts_with_datetime_partition # [shim-output-format] +# 00803_odbc_driver_2_format # [shim-output-format] +# 00813_parse_date_time_best_effort_more # [shim-output-format] +# 00818_inner_join_bug_3567 # [shim-output-format] +# 00820_multiple_joins # [shim-output-format] +# 00820_multiple_joins_subquery_requires_alias # [shim-output-format] +# 00847_multiple_join_same_column # [shim-output-format] +# 01018_ambiguous_column # [shim-output-format] +# 01034_JSONCompactEachRow # [shim-output-format] +# 01070_template_empty_file # [shim-output-format] +# 01073_crlf_end_of_line # [shim-output-format] +# 01074_partial_revokes # [shim-output-format] +# 01231_markdown_format # [shim-output-format] +# 01250_fixed_string_comparison # [shim-output-format] +# 01293_pretty_max_value_width # [shim-output-format] +# 01324_insert_tsv_raw # [shim-output-format] +# 01351_parse_date_time_best_effort_us # [shim-output-format] +# 01447_json_strings # [shim-output-format] +# 01448_json_compact_strings_each_row # [shim-output-format] +# 01449_json_compact_strings # [shim-output-format] +# 01472_many_rows_in_totals # [shim-output-format] +# 01486_json_array_output # [shim-output-format] +# 01499_json_named_tuples # [shim-output-format] +# 01509_output_format_pretty_row_numbers # [shim-output-format] +# 01550_type_map_formats # [shim-output-format] +# 01553_settings_early_apply # [shim-output-format] +# 01590_countSubstrings # [shim-output-format] +# 01601_detach_permanently # [shim-output-format] +# 01611_constant_folding_subqueries # [shim-output-format] +# 01633_limit_fuzz # [shim-output-format] +# 01640_marks_corruption_regression # [shim-output-format] +# 01645_system_table_engines # [shim-output-format] +# 01656_ipv4_bad_formatting # [shim-output-format] +# 01660_second_extremes_bug # [shim-output-format] +# 01670_neighbor_lc_bug # [shim-output-format] +# 01671_merge_join_and_constants # [shim-output-format] +# 01825_json_type_10 # [shim-output-format] +# 01825_json_type_in_array # [shim-output-format] +# 01825_json_type_partitions # [shim-output-format] +# 01890_state_of_state # [shim-output-format] +# 01913_exact_rows_before_limit # [shim-output-format] +# 01927_query_views_log_current_database # [shim-output-format] +# 01939_type_map_json # [shim-output-format] +# 01942_dateTimeToSnowflakeID # [shim-output-format] +# 01942_snowflakeIDToDateTime # [shim-output-format] +# 01946_profile_sleep # [shim-output-format] +# 01947_mv_subquery # [shim-output-format] +# 01958_partial_hour_timezone # [shim-output-format] +# 02026_describe_include_subcolumns # [shim-output-format] +# 02029_output_csv_null_representation # [shim-output-format] +# 02071_lower_upper_utf8_row_overlaps # [shim-output-format] +# 02111_json_column_name_encoding # [shim-output-format] +# 02114_bool_type # [shim-output-format] +# 02125_query_views_log # [shim-output-format] +# 02152_bool_type # [shim-output-format] +# 02157_line_as_string_output_format # [shim-output-format] +# 02180_group_by_lowcardinality # [shim-output-format] +# 02184_hash_functions_and_ip_types # [shim-output-format] +# 02184_nested_tuple # [shim-output-format] +# 02267_jsonlines_ndjson_format # [shim-output-format] +# 02267_output_format_prometheus # [shim-output-format] +# 02270_client_name # [shim-output-format] +# 02286_tuple_numeric_identifier # [shim-output-format] +# 02295_GROUP_BY_AggregateFunction # [shim-output-format] +# 02322_sql_insert_format # [shim-output-format] +# 02346_text_index_bug62681 # [shim-output-format] +# 02356_insert_query_log_metrics # [shim-output-format] +# 02375_double_escaping_json # [shim-output-format] +# 02375_pretty_formats # [shim-output-format] +# 02381_parseDateTime64BestEffortUS # [shim-output-format] +# 02400_memory_accounting_on_error # [shim-output-format] +# 02417_json_object_each_row_format # [shim-output-format] +# 02421_formats_with_totals_and_extremes # [shim-output-format] +# 02421_json_decimals_as_strings # [shim-output-format] +# 02423_json_quote_float64 # [shim-output-format] +# 02428_batch_nullable_assert # [shim-output-format] +# 02452_json_utf8_validation # [shim-output-format] +# 02454_json_object_each_row_column_for_object_name # [shim-output-format] +# 02456_alter-nullable-column-bag # [shim-output-format] +# 02483_cuturlparameter_with_arrays # [shim-output-format] +# 02494_query_cache_bugs # [shim-output-format] +# 02494_query_cache_ignore_output_settings # [shim-output-format] +# 02523_range_const_start # [shim-output-format] +# 02552_client_format_settings # [shim-output-format] +# 02553_json_type_attach_partition # [shim-output-format] +# 02554_format_json_columns_for_empty # [shim-output-format] +# 02560_vertical_merge_memory_usage # [shim-output-format] +# 02591_bson_long_tuple # [shim-output-format] +# 02717_pretty_json # [shim-output-format] +# 02751_ip_types_aggregate_functions_states # [shim-output-format] +# 02780_final_streams_data_skipping_index # [shim-output-format] +# 02783_parsedatetimebesteffort_syslog # [shim-output-format] +# 02789_describe_table_settings # [shim-output-format] +# 02790_sql_standard_fetch # [shim-output-format] +# 02798_explain_settings_not_applied_bug # [shim-output-format] +# 02813_system_licenses_base # [shim-output-format] +# 02845_domain_rfc_support_ipv6 # [shim-output-format] +# 02861_uuid_format_serialization # [shim-output-format] +# 02890_untuple_column_names # [shim-output-format] +# 02892_rocksdb_trivial_count # [shim-output-format] +# 02902_json_skip_null_values # [shim-output-format] +# 02902_topKGeneric_deserialization_memory # [shim-output-format] +# 02916_set_formatting # [shim-output-format] +# 02932_idna # [shim-output-format] +# 02932_punycode # [shim-output-format] +# 02940_variant_text_deserialization # [shim-output-format] +# 02947_merge_tree_index_table_1 # [shim-output-format] +# 02947_merge_tree_index_table_2 # [shim-output-format] +# 02947_merge_tree_index_table_4 # [shim-output-format] +# 02966_topk_counts_approx_count_sum # [shim-output-format] +# 02971_functions_to_subcolumns_column_names # [shim-output-format] +# 02982_create_mv_inner_extra # [shim-output-format] +# 02993_lazy_index_loading # [shim-output-format] +# 02993_values_escape_quote # [shim-output-format] +# 02994_inconsistent_formatting # [shim-output-format] +# 02998_pretty_format_print_readable_number_if_last_column # [shim-output-format] +# 03019_numbers_pretty # [shim-output-format] +# 03022_highlight_digit_groups # [shim-output-format] +# 03033_dynamic_text_serialization # [shim-output-format] +# 03035_argMinMax_numeric_non_extreme_bug # [shim-output-format] +# 03142_skip_ANSI_in_UTF8_compute_width # [shim-output-format] +# 03145_unicode_quotes # [shim-output-format] +# 03147_rows_before_limit_fix # [shim-output-format] +# 03149_analyzer_join_projection_name # [shim-output-format] +# 03149_analyzer_join_projection_name_2 # [shim-output-format] +# 03150_infer_type_variant # [shim-output-format] +# 03156_nullable_number_tips # [shim-output-format] +# 03162_dynamic_type_nested # [shim-output-format] +# 03164_create_as_default # [shim-output-format] +# 03169_display_column_names_in_footer # [shim-output-format] +# 03203_function_printf # [shim-output-format] +# 03207_json_read_subcolumns_1_1_wide_merge_tree # [shim-output-format] +# 03207_json_read_subcolumns_1_2_wide_merge_tree # [shim-output-format] +# 03207_json_read_subcolumns_1_3_wide_merge_tree # [shim-output-format] +# 03207_json_read_subcolumns_1_compact_merge_tree # [shim-output-format] +# 03211_convert_outer_join_to_inner_join_anti_join # [shim-output-format] +# 03221_incomplete_utf8_sequence # [shim-output-format] +# 03224_trim_empty_string # [shim-output-format] +# 03237_max_map_state_decimal_serialization # [shim-output-format] +# 03254_attach_part_order # [shim-output-format] +# 03254_normalize_aggregate_states_with_named_tuple_args # [shim-output-format] +# 03254_timeseries_functions # [shim-output-format] +# 03254_timeseries_functions_with_resets # [shim-output-format] +# 03255_merge_mutation_start_entry_in_the_part_log # [shim-output-format] +# 03268_nested_analyzer # [shim-output-format] +# 03268_vertical_pretty_numbers # [shim-output-format] +# 03269_bf16 # [shim-output-format] +# 03273_dynamic_pretty_json_serialization # [shim-output-format] +# 03274_json_pretty_output # [shim-output-format] +# 03274_json_to_json_alter_nested_json # [shim-output-format] +# 03282_highlight_trailing_whitespace_pretty # [shim-output-format] +# 03297_cut_column_name # [shim-output-format] +# 03298_triger_local_error_format # [shim-output-format] +# 03298_vertical_columns # [shim-output-format] +# 03299_pretty_squash # [shim-output-format] +# 03300_pretty_vertical_cut # [shim-output-format] +# 03303_pretty_multiline # [shim-output-format] +# 03304_pretty_fallback_to_vertical # [shim-output-format] +# 03315_join_temporary_table_names # [shim-output-format] +# 03317_pretty_fallback_to_vertical_consistent # [shim-output-format] +# 03340_projections_formatting # [shim-output-format] +# 03364_pretty_json_bool # [shim-output-format] +# 03365_time_datetime_operations # [shim-output-format] +# 03400_output_format_float_precision # [shim-output-format] +# 03403_mv_errors # [shim-output-format] +# 03408_limit_by_rows_before_limit # [shim-output-format] +# 03408_limit_by_rows_before_limit_mem # [shim-output-format] +# 03415_dont_highlight_probable_hashes # [shim-output-format] +# 03416_glue_chunks # [shim-output-format] +# 03432_input_format_parquet_max_block_size_validation # [shim-output-format] +# 03440_no_glue_totals # [shim-output-format] +# 03469_json_read_subcolumns_combined_1_compact_merge_tree # [shim-output-format] +# 03469_json_read_subcolumns_combined_1_wide_merge_tree # [shim-output-format] +# 03519_ttl_extended_data_types # [shim-output-format] +# 03535_system_formats # [shim-output-format] +# 03538_analyzer_lag_lead_functions # [shim-output-format] +# 03548_array_group_last_serialization # [shim-output-format] +# 03566_system_completions_table # [shim-output-format] +# 03571_nullable_format_digit_groups # [shim-output-format] +# 03573_linear_regression_timeseries_functions # [shim-output-format] +# 03577_hash_output_format # [shim-output-format] +# 03595_changes_timeseries_functions # [shim-output-format] +# 03595_set_query_no_eq_set_to_one # [shim-output-format] +# 03640_alter_table_rewrite_parts # [shim-output-format] +# 03640_load_marks_synchronously # [shim-output-format] +# 03640_multiple_mutations_with_error_with_rewrite_parts # [shim-output-format] +# 03640_multiple_mutations_with_rewrite_parts # [shim-output-format] +# 03644_rows_before_aggregation_in_order # [shim-output-format] +# 03700_vertical_format_pretty_print_json # [shim-output-format] +# 03727_named_tuples_pretty_format # [shim-output-format] +# 03729_function_hmac # [shim-output-format] +# 03729_function_hmac_fips # [shim-output-format] +# 03735_async_insert_mergetree # [shim-output-format] +# 03751_fixed_string_escape_quote_with_quote # [shim-output-format] +# 03759_marks_cache_events # [shim-output-format] +# 03794_read_in_order_virtual_row_and_sparse_primary_key_msan # [shim-output-format] +# 03795_hash_output_format_blocks # [shim-output-format] +# 03799_any_left_join_isnotnull_crash # [shim-output-format] +# 03799_avg_date_time_types # [shim-output-format] +# 03890_output_format_trim_fixed_string # [shim-output-format] +# 04049_cuturlparameter_pattern_matching # [shim-output-format] +# 04049_primes_max_rows_to_read # [shim-output-format] +# 04050_join_order_randomize # [shim-output-format] +# 04053_limit_push_down_union # [shim-output-format] +# 04063_negative_limit_fractional_limit_rows_before_limit_at_least # [shim-output-format] +# 04067_columns_cache_partial_granule_reads # [shim-output-format] +# 04122_serialization_time64_formats # [shim-output-format] +# 04141_json_extract_variant_no_int_truncation # [shim-output-format] +# 04233_right_utf8_invalid_utf8_determinism # [shim-output-format] +# 04238_incomplete_utf8_column_name_json # [shim-output-format] +# 04261_105441_dynamic_quoted_empty_array_map_key # [shim-output-format] +# 04294_102812_inject_random_order_preserve_column_names # [shim-output-format] +# 04303_limit_after_until_side_effects # [shim-output-format] +# 04327_always_write_decimal_point_in_float_and_decimal # [shim-output-format] +# 04329_array_tuple_fill_missing_column_bad_cast # [shim-output-format] +# 04337_jsonl_input_output_format # [shim-output-format] +# 04346_limit_after_rows_before_limit # [shim-output-format] +# 04355_limit_after_rows_before_limit_counter # [shim-output-format] +# 04402_geojson_output_format # [shim-output-format] +# 04404_geojson_output_geometry # [shim-output-format] +# 04405_geojson_output_properties # [shim-output-format] +# 04406_geojson_output_validation # [shim-output-format] +# 04410_geojson_input_ignored_nonfinite_numbers # [shim-output-format] +# 04411_geojson_validate_geometry # [shim-output-format] +# 04420_vertical_format_display_control_characters # [shim-output-format] +# 04628_timeseries_sum_avg_count_over_time # [shim-output-format] +# 04628_variance_timeseries_functions # [shim-output-format] +# 04671_datetime64_time64_cut_trailing_zeros_scale_gt6 # [shim-output-format] +# 04845_distinct_limit_hint_with_ties # [shim-output-format] +# 04927_substreams_cache_key_collision # [shim-output-format] +# 05024_pretty_named_tuples_as_subcolumns # [shim-output-format] +# 05043_pretty_named_tuples_subcolumns_nullable_and_single_value # [shim-output-format] +# 05045_vertical_control_pictures_highlight_trailing_whitespace # [shim-output-format] +# 05055_pretty_uncut_single_value_grid_width # [shim-output-format] +# 05056_pretty_tab_alignment_after_widening # [shim-output-format] +# 05056_timeseries_group_array_merge_states # [shim-output-format] +# 05067_serialization_interval_json_csv # [shim-output-format] +# 05068_limit_after_exact_rows_before_limit_early_finish # [shim-output-format] +# 05141_max_min_over_time_timeseries_functions # [shim-output-format] +# 05153_domain_rfc_multiple_at_sign # [shim-output-format] +# 05153_limit_by_const_with_totals # [shim-output-format] +# 05155_domain_rfc_ipvfuture # [shim-output-format] +# 05156_domain_rfc_dot_after_port # [shim-output-format] +# 05212_domain_rfc_invalid_scheme # [shim-output-format] +# 05213_domain_without_www_leading_dot # [shim-output-format] +# 05218_pretty_named_tuple_subcolumns_glue_chunks_row_number_width # [shim-output-format] +# 05229_pretty_format_display_control_characters # [shim-output-format] +# 05259_pretty_multiline_tab_in_later_column # [shim-output-format] +# 05325_analyzer_lazy_alias_columns # [shim-output-format] +# 05617_limit_zero_skips_range_analysis # [shim-output-format] + +#----------------------------------------------------------------------------- +# [shim-render-json] shim: HTTP: no TabSeparated renderer for JSON +# The HTTP client gives a JSON value as a JsonObject, without the types +# of the paths. +# Protocols: http +# Tests: http 109 +01825_json_type_18 # known=http: [shim-render-json] +01825_json_type_bools # known=http: [shim-render-json] +01825_json_type_ephemeral # known=http: [shim-render-json] +# 01825_json_type_insert_select # [shim-render-json] +01825_json_type_mutations # known=http: [shim-render-json] +01825_json_type_order_by # known=http: [shim-render-json] +02969_mysql_cast_type_aliases # known=http: [shim-render-json] +03100_lwu_26_subcolumns # known=http: [shim-render-json] +03157_dynamic_type_json # known=http: [shim-render-json] +03205_json_cast_from_string # known=http: [shim-render-json] +03214_json_typed_dynamic_path # known=http: [shim-render-json] +03228_variant_permutation_issue # known=http: [shim-render-json] +03229_json_structure_comparison # known=http: [shim-render-json] +03232_json_uniq_group_by # known=http: [shim-render-json] +03250_json_group_by_sub_object_subcolumn # known=http: [shim-render-json] +03257_json_escape_file_names # known=http: [shim-render-json] +03261_tuple_map_to_json_cast # known=http: [shim-render-json] +03272_json_to_json_cast_1 # known=http: [shim-render-json] +03272_json_to_json_cast_3 # known=http: [shim-render-json] +03272_json_to_json_cast_4 # known=http: [shim-render-json] +03272_json_to_json_cast_5 # known=http: [shim-render-json] +03279_not_empty_json # known=http: [shim-render-json] +03280_json_subcolumns_in_primary_key_select_final # known=http: [shim-render-json] +03282_json_equal_comparison # known=http: [shim-render-json] +03283_json_binary_serialization_use_default_settings # known=http: [shim-render-json] +03292_nullable_json_schema_inference # known=http: [shim-render-json] +03300_nested_json_empty_keys # known=http: [shim-render-json] +03311_constantnode # known=http: [shim-render-json] +03311_subcolumns_in_default_and_materialized_expressions # known=http: [shim-render-json] +03312_json_literal_remote # known=http: [shim-render-json] +03363_read_json_and_subcolumns_from_view # known=http: [shim-render-json] +03376_json_comparison # known=http: [shim-render-json] +03382_dynamic_serialization_default_settings # known=http: [shim-render-json] +03412_dynamic_in_arg_min_max # known=http: [shim-render-json] +03442_json_duplicate_path # known=http: [shim-render-json] +03445_subcolumns_prewhere_pushdown # known=http: [shim-render-json] +03447_order_by_json_and_other_column # known=http: [shim-render-json] +03525_json_extract_datetime64_from_numbers # known=http: [shim-render-json] +03532_dynamic_flattened_serialization_bug # known=http: [shim-render-json] +03550_variant_extend_union # known=http: [shim-render-json] +03553_json_shared_data_map_serialization # known=http: [shim-render-json] +03561_materialized_subcolumns_materialized_view # known=http: [shim-render-json] +03573_json_keys_with_dots # known=http: [shim-render-json] +03577_dynamic_json_update_issue # known=http: [shim-render-json] +03579_zero_copy_aggregating_final_anyLast # known=http: [shim-render-json] +03596_alter_update_column_with_subcolumn_used_in_materialized_expression # known=http: [shim-render-json] +03598_json_enum_default_value_in_typed_path # known=http: [shim-render-json] +03601_json_from_string_accurate_cast_or_null # known=http: [shim-render-json] +03606_nullable_json_group_by # known=http: [shim-render-json] +03628_subcolumns_of_columns_with_dot_in_name # known=http: [shim-render-json] +03639_hash_of_json_column # known=http: [shim-render-json] +03641_json_array_of_float_and_bool # known=http: [shim-render-json] +03701_json_duplicate_path_insert_select # known=http: [shim-render-json] +03702_json_datetime_format_settings # known=http: [shim-render-json] +03711_json_skip_invalid_fields # known=http: [shim-render-json] +03712_json_advanced_shared_data_bug # known=http: [shim-render-json] +03722_json_compact_part_substreams_cache_bug # known=http: [shim-render-json] +03750_json_in_tuple_element # known=http: [shim-render-json] +03762_has_in_function_key_condition_deterministic_function_chain # known=http: [shim-render-json] +03762_parquet_cast_to_json # known=http: [shim-render-json] +03773_json_with_typed_path_skip # known=http: [shim-render-json] +03774_json_skip_regexp_partial_match # known=http: [shim-render-json] +03776_subcolumns_in_partition_by # known=http: [shim-render-json] +03815_array_of_json_in_tuple_element # known=http: [shim-render-json] +03815_tuple_element_with_json # known=http: [shim-render-json] +03821_json_skip_path_fix # known=http: [shim-render-json] +03925_json_shared_data_buckets_missing_stream_bug # known=http: [shim-render-json] +03928_json_advanced_shared_data_bug # known=http: [shim-render-json] +04032_json_subcolumn_in_projection_sorting_key # known=http: [shim-render-json] +04039_json_typed_path_nested_subcolumn # known=http: [shim-render-json] +04057_json_variant_offsets_cache_bug # known=http: [shim-render-json] +04058_json_all_values # known=http: [shim-render-json] +04096_text_index_json_subcolumn # known=http: [shim-render-json] +04103_accurate_cast_or_null_json # known=http: [shim-render-json] +04103_full_sorting_merge_left_join_nullable_json # known=http: [shim-render-json] +04115_json_combined_subcolumn_empty_json # known=http: [shim-render-json] +04117_join_equi_key_filter_pushdown_right_full # known=http: [shim-render-json] +04121_json_extract_types_edges # known=http: [shim-render-json] +04262_singleValueOrNull_json_deserialize # known=http: [shim-render-json] +04326_json_array_element # known=http: [shim-render-json] +# 04326_json_skip_null_typed_paths # [shim-render-json] +04423_json_advanced_chunked_shared_data_bug_1 # known=http: [shim-render-json] +04424_json_advanced_chunked_shared_data_bug_2 # known=http: [shim-render-json] +04508_datetime_number_input_raw_value_compatibility # known=http: [shim-render-json] +04510_accurateCastOrDefault_settings # known=http: [shim-render-json] +04522_json_extract_datetime64_fractional_precision # known=http: [shim-render-json] +04611_substreams_cache_ownership_validator_whole_path # known=http: [shim-render-json] +04628_json_order_by_shared_data # known=http: [shim-render-json] +04628_logical_optimizer_in_rewrite_variant_type # known=http: [shim-render-json] +04648_replicate_generic_no_quadratic_realloc # known=http: [shim-render-json] +04692_insert_dedup_json_path_names # known=http: [shim-render-json] +04811_json_big_integers # known=http: [shim-render-json] +04811_json_shared_data_advanced_compact_empty_nested_granule # known=http: [shim-render-json] +04813_json_typed_paths_default_insert # known=http: [shim-render-json] +05019_trino_dialect # known=http: [shim-render-json] +05020_json_max_dynamic_subcolumns_in_parsing_squashing # known=http: [shim-render-json] +05182_json_bracket_nullable_and_chain_semantics # known=http: [shim-render-json] +05210_json_bracket_nullable_key # known=http: [shim-render-json] +05210_json_compact_full_and_subcolumn_cache # known=http: [shim-render-json] +05218_dynamic_json_constant_deep_recursion # known=http: [shim-render-json] +05218_json_has_null_typed_path_subobject # known=http: [shim-render-json] +05218_json_type_deep_recursion # known=http: [shim-render-json] +05229_cast_array_of_map_to_variant # known=http: [shim-render-json] +05238_generate_random_json # known=http: [shim-render-json] +05291_json_shared_typed_paths_type # known=http: [shim-render-json] +05292_json_shared_typed_paths_resolution # known=http: [shim-render-json] +05316_json_lazy_type_hints_mutations # known=http: [shim-render-json] +05317_json_lazy_type_hints_non_hint_changes # known=http: [shim-render-json] +05325_rename_nested_leaf_json_dynamic_mutation # known=http: [shim-render-json] + +#----------------------------------------------------------------------------- +# [shim-kql-split] shim: KQL statements are split by SQL rules +# In KQL, a statement can end at a newline. +# Protocols: http, tcp +# Tests: http 11, tcp 13 +# Also: 04759_kql_bin_floor_timespan_type_defaults [http-type-interval], +# 05044_kql_exact_scaling_and_tabular_contract [http-type-interval] +# (listed under the other group). +# 02366_kql_datatype # [shim-kql-split] +# 04670_kql_pipeline # [shim-kql-split] +# 04675_kql_user_defined_functions # [shim-kql-split] +# 04700_kql_join_let_bin_regressions # [shim-kql-split] +# 04813_kql_bin_negative_and_tabular_body # [shim-kql-split] +# 04823_kql_dynamic_column_type_rejected # [shim-kql-split] +# 04825_kql_let_tabular_in_subquery_bin_at_negative # [shim-kql-split] +# 04836_kql_aggregate_gate_bare_table_range_exact # [shim-kql-split] +# 04839_kql_db_qualified_table_carriers # [shim-kql-split] +# 04870_kql_in_column_bin_column_size_interval_division # [shim-kql-split] +# 05047_kql_typed_parameter_enforcement # [shim-kql-split] + +#----------------------------------------------------------------------------- +# [shim-http-string-bytes] shim: HTTP: Dynamic and Variant String values that are not UTF-8 +# The shim reads HTTP String values as .NET strings, so that the type of +# a Dynamic or Variant value stays known; bytes that are not UTF-8 then +# change. +# Protocols: http +# Tests: http 8 +01905_to_json_string # known=http: [shim-http-string-bytes] +02234_cast_to_ip_address # known=http: [shim-http-string-bytes] +02586_generate_random_structure # known=http: [shim-http-string-bytes] +02998_analyzer_secret_args_tree_node # known=http: [shim-http-string-bytes] +02998_ipv6_hashing # known=http: [shim-http-string-bytes] +03095_msan_uuid_string_to_num # known=http: [shim-http-string-bytes] +03447_base32_encode_decode # known=http: [shim-http-string-bytes] +05175_extract_key_value_pairs_escaping_and_long_tokens # known=http: [shim-http-string-bytes] + +#----------------------------------------------------------------------------- +# [shim-render-dynamic] shim: HTTP: no TabSeparated renderer for some Dynamic values +# The HTTP client gives a Dynamic DateTime value without its type. +# Protocols: http +# Tests: http 6 +03158_dynamic_type_from_variant # known=http: [shim-render-dynamic] +03199_json_extract_dynamic # known=http: [shim-render-dynamic] +03371_dynamic_values_parsing_templates # known=http: [shim-render-dynamic] +03381_remote_constants # known=http: [shim-render-dynamic] +03457_merge_engine_subcolumns # known=http: [shim-render-dynamic] +05104_array_intersect_nullable_overflow # known=http: [shim-render-dynamic] + +#----------------------------------------------------------------------------- +# [shim-interval-output-format] shim: TCP: interval_output_format = 'kusto' +# The shim writes Interval values itself, in the default format. +# Protocols: tcp +# Tests: tcp 6 +# Also: 02366_kql_native_interval_format [http-type-interval], +# 04092_kql_conformance_baby_kusto [http-type-interval], +# 04093_kql_conformance_kusto_loco [http-type-interval], +# 04672_kql_semantics [http-type-interval], 04676_kql_function_families +# [http-type-interval], 05019_kql_review_followups [http-type-interval] +# (listed under the other group). + +#----------------------------------------------------------------------------- +# [shim-client-parse-error] shim: The end of a statement that the client cannot parse +# The shim cannot tell a run-time SYNTAX_ERROR from a parse error of +# clickhouse-client. +# Protocols: http, tcp +# Tests: http 1, tcp 1 +# 02165_insert_from_infile # [shim-client-parse-error] diff --git a/tests/clickhouse-test-runner/clickhouse-version b/tests/clickhouse-test-runner/clickhouse-version new file mode 100644 index 000000000..48503c405 --- /dev/null +++ b/tests/clickhouse-test-runner/clickhouse-version @@ -0,0 +1,5 @@ +# The ClickHouse server version that the upstream SQL tests run against. CI +# starts the server image of this version, and takes the tests from its +# release tag (v-stable). Change it only in a pull request of its +# own; see "Bump the server version" in AGENTS.md. +26.10.4.207 diff --git a/tests/clickhouse-test-runner/scripts/build.sh b/tests/clickhouse-test-runner/scripts/build.sh new file mode 100755 index 000000000..9b99a6542 --- /dev/null +++ b/tests/clickhouse-test-runner/scripts/build.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash +# Builds the shim into ../.bin: publishes ClickHouse.Driver.TestRunner (Release, ReadyToRun) to .bin/publish, +# and writes the `clickhouse` and `clickhouse-client` commands that tests/clickhouse-test calls. Both names +# go to the same program. The program starts once per test, so ReadyToRun code makes each test faster. +# +# Usage: scripts/build.sh +# +# run-upstream-tests.sh runs this script unless SKIP_BUILD=1. The commands find the program relative to their +# own path, so a copy of .bin works in another checkout of the same commit (CI builds once and copies it). +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +RUNNER_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)" +BIN_DIR="${RUNNER_DIR}/.bin" + +case "$(uname -s)-$(uname -m)" in + Linux-x86_64) rid=linux-x64 ;; + Linux-aarch64 | Linux-arm64) rid=linux-arm64 ;; + Darwin-arm64) rid=osx-arm64 ;; + Darwin-x86_64) rid=osx-x64 ;; + *) echo "Error: unknown platform $(uname -s)-$(uname -m)." >&2; exit 1 ;; +esac + +dotnet publish "${RUNNER_DIR}/ClickHouse.Driver.TestRunner/ClickHouse.Driver.TestRunner.csproj" \ + --configuration Release --runtime "${rid}" --self-contained false -p:PublishReadyToRun=true \ + --output "${BIN_DIR}/publish" --nologo --verbosity quiet >&2 + +cat > "${BIN_DIR}/clickhouse" <<'WRAPPER' +#!/usr/bin/env bash +exec "$(dirname "${BASH_SOURCE[0]}")/publish/clickhouse-test-runner" "$@" +WRAPPER +chmod +x "${BIN_DIR}/clickhouse" +ln -sf clickhouse "${BIN_DIR}/clickhouse-client" +echo "Built ${BIN_DIR}/clickhouse (${rid})" >&2 diff --git a/tests/clickhouse-test-runner/scripts/fetch-upstream.sh b/tests/clickhouse-test-runner/scripts/fetch-upstream.sh new file mode 100755 index 000000000..4ddf209bb --- /dev/null +++ b/tests/clickhouse-test-runner/scripts/fetch-upstream.sh @@ -0,0 +1,53 @@ +#!/usr/bin/env bash +# Gets the upstream ClickHouse tests of the pinned server version, and generates +# ClickHouse.Driver.TestRunner/ErrorCodes.g.cs from the same checkout. +# +# Usage: scripts/fetch-upstream.sh [] +# +# Without an argument, the script reads the version from ../clickhouse-version (for example +# 26.10.4.207) and checks out its release tag (v26.10.4.207-stable). The `.reference` files of that tag +# were made by the same server build. A version as the argument selects its release tag; any other +# argument is used as a ref (for example `master`). +# +# The checkout is sparse and shallow. It goes to UPSTREAM_CLICKHOUSE_DIR (default: +# .upstream/ClickHouse). The script needs only bash, git and sed, not the .NET SDK. +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +RUNNER_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)" +UPSTREAM_CLICKHOUSE_DIR="${UPSTREAM_CLICKHOUSE_DIR:-${RUNNER_DIR}/.upstream/ClickHouse}" +default_repo_url="https""://github.com/ClickHouse/ClickHouse.git" +UPSTREAM_REPO_URL="${UPSTREAM_REPO_URL:-${default_repo_url}}" + +ref="${1:-}" +if [[ -z "${ref}" ]]; then + ref="$("${SCRIPT_DIR}/pinned-version.sh")" +fi +if [[ "${ref}" =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + ref="v${ref}-stable" +fi +echo "Upstream ref: ${ref}" >&2 + +if [[ ! -d "${UPSTREAM_CLICKHOUSE_DIR}/.git" ]]; then + mkdir -p "${UPSTREAM_CLICKHOUSE_DIR}" + git -C "${UPSTREAM_CLICKHOUSE_DIR}" init -q + git -C "${UPSTREAM_CLICKHOUSE_DIR}" remote add origin "${UPSTREAM_REPO_URL}" +fi +# Not cone mode: the list has files, and cone mode takes only directories. +git -C "${UPSTREAM_CLICKHOUSE_DIR}" sparse-checkout set --no-cone \ + /tests/clickhouse-test /tests/queries/ /tests/config/ /tests/ci/ /tests/performance/ \ + /docker/test/util/ /src/Common/ErrorCodes.cpp +# A tag and a branch both resolve here, so the same command takes `master`. +if ! git -C "${UPSTREAM_CLICKHOUSE_DIR}" fetch -q --depth 1 --filter=blob:none origin "${ref}"; then + echo "Error: cannot fetch ${ref} from ${UPSTREAM_REPO_URL}." >&2 + exit 1 +fi +git -C "${UPSTREAM_CLICKHOUSE_DIR}" checkout -q --force FETCH_HEAD +chmod +x "${UPSTREAM_CLICKHOUSE_DIR}/tests/clickhouse-test" +echo "${ref}" > "${UPSTREAM_CLICKHOUSE_DIR}/.upstream-ref" + +"${SCRIPT_DIR}/gen-error-codes.sh" "${UPSTREAM_CLICKHOUSE_DIR}" + +if [[ -n "${GITHUB_OUTPUT:-}" ]]; then + echo "ref=${ref}" >> "${GITHUB_OUTPUT}" +fi diff --git a/tests/clickhouse-test-runner/scripts/gen-error-codes.sh b/tests/clickhouse-test-runner/scripts/gen-error-codes.sh new file mode 100755 index 000000000..3a72decd3 --- /dev/null +++ b/tests/clickhouse-test-runner/scripts/gen-error-codes.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +# Generates ClickHouse.Driver.TestRunner/ErrorCodes.g.cs from src/Common/ErrorCodes.cpp of a ClickHouse +# checkout. fetch-upstream.sh runs it after each checkout, so the error names of the test hints always +# match the tests. It needs only bash and sed. +# +# Usage: scripts/gen-error-codes.sh [] +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +RUNNER_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)" +checkout="${1:-${UPSTREAM_CLICKHOUSE_DIR:-${RUNNER_DIR}/.upstream/ClickHouse}}" +src_file="${checkout}/src/Common/ErrorCodes.cpp" + +if [[ ! -f "${src_file}" ]]; then + echo "Error: ${src_file} not found. Run scripts/fetch-upstream.sh first." >&2 + exit 1 +fi +ref="$(cat "${checkout}/.upstream-ref" 2>/dev/null || git -C "${checkout}" rev-parse HEAD)" + +out="${RUNNER_DIR}/ClickHouse.Driver.TestRunner/ErrorCodes.g.cs" +{ + echo "// " + echo "// Generated by scripts/gen-error-codes.sh from src/Common/ErrorCodes.cpp of ClickHouse ${ref}." + echo "// Do not edit." + echo "// " + echo + echo "namespace ClickHouse.Driver.TestRunner;" + echo + echo "internal static partial class ErrorCodes" + echo "{" + echo " // The error names of ClickHouse and their codes. Test hints can name an error instead of giving" + echo " // its code." + echo " private static readonly Dictionary Codes = new(StringComparer.Ordinal)" + echo " {" + sed -n 's/^ *M(\([0-9][0-9]*\), *\([A-Z0-9_][A-Z0-9_]*\)).*/ ["\2"] = \1,/p' "${src_file}" + echo " };" + echo "}" +} > "${out}" +echo "Wrote $(grep -c '^ \["' "${out}") error codes from ${ref} to ${out}" >&2 diff --git a/tests/clickhouse-test-runner/scripts/pinned-version.sh b/tests/clickhouse-test-runner/scripts/pinned-version.sh new file mode 100755 index 000000000..b70b0b388 --- /dev/null +++ b/tests/clickhouse-test-runner/scripts/pinned-version.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +# Prints the pinned ClickHouse server version from ../clickhouse-version. +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +file="${SCRIPT_DIR}/../clickhouse-version" +version="$(grep -v '^[[:space:]]*#' "${file}" | tr -d '[:space:]')" +if ! [[ "${version}" =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "Error: ${file} must contain one version such as 26.10.4.207 (got: '${version}')." >&2 + exit 1 +fi +echo "${version}" diff --git a/tests/clickhouse-test-runner/scripts/run-upstream-tests.sh b/tests/clickhouse-test-runner/scripts/run-upstream-tests.sh new file mode 100755 index 000000000..8c449337e --- /dev/null +++ b/tests/clickhouse-test-runner/scripts/run-upstream-tests.sh @@ -0,0 +1,207 @@ +#!/usr/bin/env bash +# Runs the allowlisted upstream ClickHouse SQL tests through ClickHouse.Driver. +# +# Usage: scripts/run-upstream-tests.sh [...] +# +# See ../README.md for the environment variables. +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +RUNNER_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)" + +UPSTREAM_CLICKHOUSE_DIR="${UPSTREAM_CLICKHOUSE_DIR:-${RUNNER_DIR}/.upstream/ClickHouse}" +UPSTREAM_TEST_LIST="${UPSTREAM_TEST_LIST:-${RUNNER_DIR}/allowlist.txt}" +CLICKHOUSE_TEST_RUNNER_PROTOCOL="${CLICKHOUSE_TEST_RUNNER_PROTOCOL:-http}" +SHARD_INDEX="${SHARD_INDEX:-1}" +SHARD_TOTAL="${SHARD_TOTAL:-1}" + +case "${CLICKHOUSE_TEST_RUNNER_PROTOCOL}" in + http|tcp) ;; + *) + echo "Error: CLICKHOUSE_TEST_RUNNER_PROTOCOL must be http or tcp (got: '${CLICKHOUSE_TEST_RUNNER_PROTOCOL}')." >&2 + exit 1 + ;; +esac + +if [[ ! -f "${UPSTREAM_CLICKHOUSE_DIR}/tests/clickhouse-test" ]]; then + echo "Error: ${UPSTREAM_CLICKHOUSE_DIR}/tests/clickhouse-test not found." >&2 + echo "Run scripts/fetch-upstream.sh, or set UPSTREAM_CLICKHOUSE_DIR to a checkout of ClickHouse/ClickHouse." >&2 + exit 1 +fi + +# The server and the tests must be of the same release: the `.reference` files of another release do not +# match the output of the server. +upstream_ref="$(cat "${UPSTREAM_CLICKHOUSE_DIR}/.upstream-ref" 2>/dev/null || echo unknown)" +server_host="${CLICKHOUSE_HOST:-localhost}" +server_url="http"'://'"${server_host}:${CLICKHOUSE_PORT_HTTP:-8123}/" +if ! server_version="$(curl -fsS --data-binary 'SELECT version()' "${server_url}")"; then + echo "Error: cannot get the server version from ${server_url}. Start the server first." >&2 + exit 1 +fi +if [[ "${upstream_ref}" != "v${server_version}-stable" && "${ALLOW_VERSION_MISMATCH:-0}" != "1" ]]; then + echo "Error: the server is ${server_version}, but the upstream tests are ${upstream_ref}." >&2 + echo "Start the server of scripts/pinned-version.sh and run scripts/fetch-upstream.sh," >&2 + echo "or set ALLOW_VERSION_MISMATCH=1 to run anyway." >&2 + exit 1 +fi +echo "Server ${server_version}, upstream tests ${upstream_ref}" >&2 + +# Read the allowlist: one test name per line; '#' starts a comment. +# +# With KNOWN_FAILURES, read the known failures instead: the comment lines `# # []` of the +# groups in KNOWN_FAILURES (comma-separated IDs, or `all`). Use it to check whether a fix makes the tests +# of a group pass. A known failure of one protocol, ` # known=: []`, runs over the +# other protocol and is selected by KNOWN_FAILURES over its own protocol. +tests=() +if [[ -n "${KNOWN_FAILURES:-}" ]]; then + while IFS= read -r line || [[ -n "${line}" ]]; do + if [[ "${line}" =~ ^#[[:space:]]*([A-Za-z0-9_.-]+)[[:space:]]+#[[:space:]]*\[([a-z0-9-]+)\] ]]; then + id="${BASH_REMATCH[2]}" + name="${BASH_REMATCH[1]}" + elif [[ "${line}" =~ ^([A-Za-z0-9_.-]+)[[:space:]]+#[[:space:]]*known=([a-z]+):[[:space:]]*\[([a-z0-9-]+)\] && + "${BASH_REMATCH[2]}" == "${CLICKHOUSE_TEST_RUNNER_PROTOCOL}" ]]; then + id="${BASH_REMATCH[3]}" + name="${BASH_REMATCH[1]}" + else + continue + fi + if [[ "${KNOWN_FAILURES}" == "all" || ",${KNOWN_FAILURES}," == *",${id},"* ]]; then + tests+=("${name}") + fi + done < "${UPSTREAM_TEST_LIST}" + echo "Selected ${#tests[@]} known failure(s) of ${KNOWN_FAILURES} from ${UPSTREAM_TEST_LIST}" >&2 +else + while IFS= read -r line || [[ -n "${line}" ]]; do + # ` # only=: ` runs over that protocol only. + if [[ "${line}" =~ \#[[:space:]]*only=([a-z]+) && "${BASH_REMATCH[1]}" != "${CLICKHOUSE_TEST_RUNNER_PROTOCOL}" ]]; then + continue + fi + # ` # known=: []` is a known failure over that protocol; it runs over the other. + if [[ "${line}" =~ \#[[:space:]]*known=([a-z]+): && "${BASH_REMATCH[1]}" == "${CLICKHOUSE_TEST_RUNNER_PROTOCOL}" ]]; then + continue + fi + line="${line%%#*}" + line="${line#"${line%%[![:space:]]*}"}" + line="${line%"${line##*[![:space:]]}"}" + [[ -z "${line}" ]] && continue + tests+=("${line}") + done < "${UPSTREAM_TEST_LIST}" + echo "Selected ${#tests[@]} test(s) from ${UPSTREAM_TEST_LIST}" >&2 +fi + +# Upstream renames and removes tests. A name that selects no test file runs nothing and fails nothing, +# so report it. +missing=() +for t in "${tests[@]}"; do + if [[ ! -e "${UPSTREAM_CLICKHOUSE_DIR}/tests/queries/0_stateless/${t}.sql" && + ! -e "${UPSTREAM_CLICKHOUSE_DIR}/tests/queries/0_stateless/${t}.sql.j2" ]]; then + missing+=("${t}") + fi +done +if [[ ${#missing[@]} -gt 0 ]]; then + msg="${#missing[@]} allowlisted test(s) are not in the upstream checkout (${upstream_ref}): ${missing[*]}" + if [[ -n "${GITHUB_ACTIONS:-}" ]]; then echo "::warning::${msg}"; else echo "Warning: ${msg}" >&2; fi +fi + +# Round-robin sharding: keep the tests at positions i where i % SHARD_TOTAL == SHARD_INDEX - 1. +if ! [[ "${SHARD_TOTAL}" =~ ^[1-9][0-9]*$ && "${SHARD_INDEX}" =~ ^[1-9][0-9]*$ ]] || (( SHARD_INDEX > SHARD_TOTAL )); then + echo "Error: SHARD_INDEX and SHARD_TOTAL must be positive integers with SHARD_INDEX <= SHARD_TOTAL (got: ${SHARD_INDEX}/${SHARD_TOTAL})." >&2 + exit 1 +fi +if (( SHARD_TOTAL > 1 )); then + sharded=() + for i in "${!tests[@]}"; do + if (( i % SHARD_TOTAL == SHARD_INDEX - 1 )); then + sharded+=("${tests[$i]}") + fi + done + tests=("${sharded[@]}") + echo "Shard ${SHARD_INDEX}/${SHARD_TOTAL}: ${#tests[@]} test(s)" >&2 +fi + +# tests/clickhouse-test runs ALL tests when it gets no test names. +if [[ ${#tests[@]} -eq 0 ]]; then + echo "Error: no tests selected from ${UPSTREAM_TEST_LIST}. Refusing to run the full upstream suite." >&2 + exit 1 +fi + +# Build the shim. tests/clickhouse-test calls `clickhouse` and `clickhouse-client` from .bin. +BIN_DIR="${RUNNER_DIR}/.bin" +if [[ "${SKIP_BUILD:-0}" != "1" ]]; then + "${SCRIPT_DIR}/build.sh" +fi +if [[ ! -x "${BIN_DIR}/clickhouse" ]]; then + echo "Error: ${BIN_DIR}/clickhouse not found. Run scripts/build.sh, or run without SKIP_BUILD=1." >&2 + exit 1 +fi + +export PATH="${BIN_DIR}:${PATH}" +export CLICKHOUSE_TEST_RUNNER_PROTOCOL +if [[ -n "${CLICKHOUSE_CLIENT_CLI_LOG:-}" ]]; then + mkdir -p "$(dirname "${CLICKHOUSE_CLIENT_CLI_LOG}")" + export CLICKHOUSE_CLIENT_CLI_LOG +fi + +# shellcheck source-path=SCRIPTDIR source=selectors.sh +source "${SCRIPT_DIR}/selectors.sh" +build_selectors "${tests[@]}" + +echo "Protocol: ${CLICKHOUSE_TEST_RUNNER_PROTOCOL}" >&2 +cd "${UPSTREAM_CLICKHOUSE_DIR}" +# --max-failures-chain: by default the runner stops after 20 failures in a row. A failed test is information, +# so the run goes on (a regression, or a run of KNOWN_FAILURES, reaches 20 at once). +runner=(python3 tests/clickhouse-test --no-stateful --no-random-settings --no-random-merge-tree-settings + --max-failures-chain 1000000) + +retries="${RETRY_FAILED:-0}" +if ! [[ "${retries}" =~ ^[0-9]+$ ]]; then + echo "Error: RETRY_FAILED must be a number of retries (got: '${retries}')." >&2 + exit 1 +fi +if (( retries == 0 )); then + exec "${runner[@]}" "$@" -- "${selectors[@]}" +fi + +# RETRY_FAILED=: run the failed tests again, at most n times. A test that passes on a retry is +# reported as a warning; a test that fails on every attempt fails the run. Do not use this to grow or +# check the allowlist: a test that needs a retry is not reliable. + +# run_attempt runs the runner on the current selectors and sets attempt_status, attempt_failed and +# attempt_passed. +run_attempt() { + local log="$1" t + shift + set +e + "${runner[@]}" "$@" -- "${selectors[@]}" 2>&1 | tee "${log}" + attempt_status=${PIPESTATUS[0]} + set -e + attempt_failed=() + while IFS= read -r t; do + attempt_failed+=("${t}") + done < <(sed -nE 's/^\[[ 0-9]+\/[ 0-9]+\] ([^ :]+): +\[ FAIL \].*/\1/p' "${log}" | sort -u) + attempt_passed="$(sed -nE 's/^\[[ 0-9]+\/[ 0-9]+\] ([^ :]+): +\[ OK \].*/\1/p' "${log}" | sort -u | tr '\n' ' ')" +} + +log="$(mktemp)" +trap 'rm -f "${log}"' EXIT +runner_args=("$@") +run_attempt "${log}" "${runner_args[@]}" +passed_on_retry="" +attempt=0 +while (( attempt_status != 0 && attempt < retries )); do + if [[ ${#attempt_failed[@]} -eq 0 ]]; then + echo "Error: the run failed (exit code ${attempt_status}), but no test failed. See the output above." >&2 + exit "${attempt_status}" + fi + attempt=$(( attempt + 1 )) + echo "Retry ${attempt}/${retries}: ${#attempt_failed[@]} failed test(s): ${attempt_failed[*]}" >&2 + build_selectors "${attempt_failed[@]}" + run_attempt "${log}" "${runner_args[@]}" + passed_on_retry="${passed_on_retry}${attempt_passed}" +done + +if [[ -n "${passed_on_retry}" ]]; then + msg="These tests failed and then passed on a retry: ${passed_on_retry}" + if [[ -n "${GITHUB_ACTIONS:-}" ]]; then echo "::warning::${msg}"; else echo "Warning: ${msg}" >&2; fi +fi +exit "${attempt_status}" diff --git a/tests/clickhouse-test-runner/scripts/run-with-real-client.sh b/tests/clickhouse-test-runner/scripts/run-with-real-client.sh new file mode 100755 index 000000000..37de5d3fc --- /dev/null +++ b/tests/clickhouse-test-runner/scripts/run-with-real-client.sh @@ -0,0 +1,68 @@ +#!/usr/bin/env bash +# Runs upstream tests through the REAL clickhouse-client in the server +# container, not through ClickHouse.Driver. Use it as the reference when you +# triage a failure: if a test fails here too, the cause is the environment +# (server config, missing cluster, ...), not the client or the shim. +# +# Usage: scripts/run-with-real-client.sh [...] +# +# It reads the same UPSTREAM_CLICKHOUSE_DIR and UPSTREAM_TEST_LIST as +# run-upstream-tests.sh. CLICKHOUSE_CONTAINER is the name of the server +# container (default: clickhouse). +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +RUNNER_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)" + +UPSTREAM_CLICKHOUSE_DIR="${UPSTREAM_CLICKHOUSE_DIR:-${RUNNER_DIR}/.upstream/ClickHouse}" +UPSTREAM_TEST_LIST="${UPSTREAM_TEST_LIST:-${RUNNER_DIR}/allowlist.txt}" +CLICKHOUSE_CONTAINER="${CLICKHOUSE_CONTAINER:-clickhouse}" + +if ! docker exec "${CLICKHOUSE_CONTAINER}" clickhouse-client --query "SELECT 1" > /dev/null; then + echo "Error: cannot run clickhouse-client in container '${CLICKHOUSE_CONTAINER}'. Set CLICKHOUSE_CONTAINER." >&2 + exit 1 +fi + +# A clickhouse binary that forwards to the real one in the container. +BIN_DIR="${RUNNER_DIR}/.bin-real-client" +mkdir -p "${BIN_DIR}" +cat > "${BIN_DIR}/clickhouse" <&2 + exit 1 +fi +# shellcheck source-path=SCRIPTDIR source=selectors.sh +source "${SCRIPT_DIR}/selectors.sh" +build_selectors "${tests[@]}" + +export PATH="${BIN_DIR}:${PATH}" +cd "${UPSTREAM_CLICKHOUSE_DIR}" +exec python3 tests/clickhouse-test --no-stateful --no-random-settings --no-random-merge-tree-settings "$@" -- "${selectors[@]}" diff --git a/tests/clickhouse-test-runner/scripts/selectors.sh b/tests/clickhouse-test-runner/scripts/selectors.sh new file mode 100755 index 000000000..a737c0ab5 --- /dev/null +++ b/tests/clickhouse-test-runner/scripts/selectors.sh @@ -0,0 +1,29 @@ +# shellcheck shell=bash +# Sourced by run-upstream-tests.sh and run-with-real-client.sh. +# +# build_selectors ... sets the array `selectors` to anchored regular +# expressions that select exactly the given tests. +# +# tests/clickhouse-test reads each test argument as a regular expression and +# selects every file that it matches anywhere in the name, so `00396_uuid` +# would also select `00396_uuid_v7`. An anchored alternation selects exactly +# the listed tests, and is much faster than one expression per test. Linux +# limits one argument to 128 KiB, so the alternation is split into several +# arguments of at most selector_max_bytes. +selector_max_bytes=65536 + +build_selectors() { + selectors=() + local chunk="" t + for t in "$@"; do + t="${t//./\\.}" + if [[ -n "${chunk}" && $(( ${#chunk} + ${#t} + 32 )) -gt ${selector_max_bytes} ]]; then + selectors+=("^(${chunk})\\.(sql|sql\\.j2)\$") + chunk="" + fi + chunk="${chunk:+${chunk}|}${t}" + done + if [[ -n "${chunk}" ]]; then + selectors+=("^(${chunk})\\.(sql|sql\\.j2)\$") + fi +} From bb8ef3afa8452a601380d4bceee39eb602591d14 Mon Sep 17 00:00:00 2001 From: Polyglot AI <293096396+polyglotAI-bot@users.noreply.github.com> Date: Thu, 19 Nov 2026 12:27:30 +0000 Subject: [PATCH 2/3] tests: review fixes for the core SQL harness - 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 --- .github/workflows/upstream-sql-tests.yml | 2 ++ .../LiveTests.cs | 20 ++++++++++++++++++- .../OutputSettingsTests.cs | 13 ++++++++++++ .../StatementsTests.cs | 5 +++++ .../OutputSettings.cs | 11 ++++++++-- .../ResultWriter.cs | 10 +++++++++- .../Statements.cs | 16 +++++++++++---- tests/clickhouse-test-runner/README.md | 7 ++++--- .../scripts/run-upstream-tests.sh | 4 +++- 9 files changed, 76 insertions(+), 12 deletions(-) diff --git a/.github/workflows/upstream-sql-tests.yml b/.github/workflows/upstream-sql-tests.yml index 129c10996..849be9583 100644 --- a/.github/workflows/upstream-sql-tests.yml +++ b/.github/workflows/upstream-sql-tests.yml @@ -288,6 +288,8 @@ jobs: name: upstream-sql-tests-${{ steps.upstream.outputs.ref }}-${{ matrix.protocol }}-shard-${{ matrix.shard }} retention-days: 14 if-no-files-found: ignore + # The test outputs are in the hidden directory .upstream. The path list limits the upload to them. + include-hidden-files: true path: | upstream-tests.log upstream-run.log diff --git a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/LiveTests.cs b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/LiveTests.cs index 2c80d7287..8ca96ef67 100644 --- a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/LiveTests.cs +++ b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/LiveTests.cs @@ -151,13 +151,29 @@ public async Task Run_ExplainFormat_IsAsOnTheServer(Protocol protocol, string qu Assert.That(stdout, Is.EqualTo(await ServerTsvAsync(query))); } + // The header of a Raw format has no escapes, as its rows. Contrast: TSVWithNames escapes the header. + [TestCase(Protocol.Http, "TSVWithNames")] + [TestCase(Protocol.Tcp, "TSVWithNames")] + [TestCase(Protocol.Http, "TSVRawWithNames")] + [TestCase(Protocol.Tcp, "TSVRawWithNames")] + [TestCase(Protocol.Http, "TabSeparatedRawWithNamesAndTypes")] + [TestCase(Protocol.Tcp, "TabSeparatedRawWithNamesAndTypes")] + public async Task Run_HeaderOfFormat_IsAsOnTheServer(Protocol protocol, string format) + { + var query = $"SELECT 1 AS `a\\tb\\\\c'd`, 'x' AS `é\\nf` FORMAT {format}"; + var (stdout, stderr, code) = await RunShimAsync(protocol, query); + Assert.That(code, Is.Zero, stderr); + Assert.That(stdout, Is.EqualTo(await ServerTsvAsync(query))); + } + [TestCase(Protocol.Http)] [TestCase(Protocol.Tcp)] public async Task Run_KillMutation_WritesTheStoppedMutation(Protocol protocol) { // A mutation that cannot finish ('x' is not a UInt64) fails the ALTER and waits until KILL MUTATION stops it; // KILL returns a row for it, as in clickhouse-client. - var table = "shim_kill_" + protocol.ToString().ToLowerInvariant(); + // A name of its own for each run: test runs can share one server. + var table = $"shim_kill_{protocol.ToString().ToLowerInvariant()}_{Guid.NewGuid():N}"; var script = string.Join('\n', $"DROP TABLE IF EXISTS {table};", $"CREATE TABLE {table} (v String) ENGINE = MergeTree ORDER BY tuple();", @@ -328,6 +344,8 @@ public async Task Render_HttpStringNotUtf8_IsTheUtf8DecodingOfTheClient() [TestCase(Protocol.Tcp, "date_time_output_format = 'unix_timestamp'")] [TestCase(Protocol.Http, "format_tsv_null_representation = 'a\\tb'")] [TestCase(Protocol.Tcp, "format_tsv_null_representation = 'XYZ'")] + [TestCase(Protocol.Http, "format_tsv_null_representation = 'it''s'")] + [TestCase(Protocol.Tcp, "format_tsv_null_representation = 'it''s'")] [TestCase(Protocol.Http, "output_format_decimal_trailing_zeros = 1")] [TestCase(Protocol.Tcp, "output_format_decimal_trailing_zeros = 1")] [TestCase(Protocol.Http, "date_time_64_output_format_cut_trailing_zeros_align_to_groups_of_thousands = 1")] diff --git a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/OutputSettingsTests.cs b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/OutputSettingsTests.cs index f285524c2..e2189fb65 100644 --- a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/OutputSettingsTests.cs +++ b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/OutputSettingsTests.cs @@ -15,9 +15,22 @@ public class OutputSettingsTests [TestCase("SELECT 'SETTINGS a = 1' -- SETTINGS b = 1", null)] [TestCase("SELECT t.settings FROM t", null)] [TestCase("SELECT 1", null)] + [TestCase("SELECT $$SETTINGS date_time_output_format = 'iso'$$;", null)] + [TestCase("SELECT $tag$ SETTINGS a = 1 $tag$ FORMAT TSV", null)] + [TestCase("SELECT $$ SETTINGS a = 1 $$ SETTINGS b = 2", "b = 2")] + [TestCase("SELECT 1 AS $a$b$ SETTINGS a = 1", "a = 1")] public void TrailingSettingsClause_Query_FindsTheClauseOfTheQuery(string sql, string? expected) => Assert.That(Statements.TrailingSettingsClause(sql), Is.EqualTo(expected)); + // The value of a string literal without its quotes, as the server reads it. + [TestCase("XYZ", "XYZ")] + [TestCase("a\\tb\\\\c\\'d", "a\tb\\c'd")] + [TestCase("it''s", "it's")] + [TestCase("''''", "''")] + [TestCase("a\\\\''b", "a\\'b")] + public void Unescape_StringLiteral_ResolvesTheEscapes(string literal, string expected) => + Assert.That(OutputSettings.Unescape(literal), Is.EqualTo(expected)); + [Test] public void From_Values_ReadsEachSetting() { diff --git a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/StatementsTests.cs b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/StatementsTests.cs index de6f9badf..3a0a699d2 100644 --- a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/StatementsTests.cs +++ b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner.Tests/StatementsTests.cs @@ -129,6 +129,11 @@ public void LeadingKeyword_CommentsAndParentheses_AreSkipped() public void ParameterNames_Sql_GivesThePlaceholdersInCode(string sql, string[] expected) => Assert.That(Statements.ParameterNames(sql), Is.EquivalentTo(expected)); + [TestCase("SELECT a, 'b c', `d`, \"e\", $$f g$$, $t$h$t$ -- i\nFROM (SELECT j) /* k */", false, "SELECT a FROM")] + [TestCase("INSERT INTO t SELECT $$x FROM y$$ FROM (SELECT z)", true, "INSERT INTO t SELECT FROM SELECT z")] + public void TopLevelWords_Sql_SkipsLiteralsAndComments(string sql, bool nested, string expected) => + Assert.That(string.Join(' ', Statements.TopLevelWords(sql, nested)), Is.EqualTo(expected)); + [Test] public void Split_Statement_KeepsItsSemicolon() { diff --git a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/OutputSettings.cs b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/OutputSettings.cs index 1bfcbf053..8828b79d9 100644 --- a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/OutputSettings.cs +++ b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/OutputSettings.cs @@ -69,10 +69,11 @@ public static OutputSettings From(IReadOnlyDictionary values) private static bool IsTrue(string value) => value == "1" || string.Equals(value, "true", StringComparison.OrdinalIgnoreCase); - // Resolves the backslash escapes of a SQL string literal (the quotes are already removed). + // Resolves the escapes of a SQL string literal (the quotes are already removed): the backslash escapes and a + // doubled quote (`'it''s'`). internal static string Unescape(string literal) { - if (!literal.Contains('\\', StringComparison.Ordinal)) + if (literal.AsSpan().IndexOfAny('\\', '\'') < 0) { return literal; } @@ -80,6 +81,12 @@ internal static string Unescape(string literal) for (var i = 0; i < literal.Length; i++) { var c = literal[i]; + if (c == '\'' && i + 1 < literal.Length && literal[i + 1] == '\'') + { + sb.Append('\''); + i++; + continue; + } if (c != '\\' || i + 1 == literal.Length) { sb.Append(c); diff --git a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ResultWriter.cs b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ResultWriter.cs index 6fef2f529..44c8a95d5 100644 --- a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ResultWriter.cs +++ b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/ResultWriter.cs @@ -92,6 +92,7 @@ public void Separator() } } + // A Raw format writes the header without escapes, as the server does (TabSeparatedRowOutputFormat::writeLine). private void HeaderLine(IReadOnlyList values) { for (var i = 0; i < values.Count; i++) @@ -100,7 +101,14 @@ private void HeaderLine(IReadOnlyList values) { output.Append((byte)'\t'); } - output.AppendEscaped(values[i], false); + if (format.Raw) + { + output.Append(values[i]); + } + else + { + output.AppendEscaped(values[i], false); + } } output.Append((byte)'\n'); } diff --git a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/Statements.cs b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/Statements.cs index 9d8ac763b..1d4b2c7cd 100644 --- a/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/Statements.cs +++ b/tests/clickhouse-test-runner/ClickHouse.Driver.TestRunner/Statements.cs @@ -415,9 +415,9 @@ public static HashSet ParameterNames(string sql) } /// - /// Returns the text after the last SETTINGS keyword outside quotes, comments and parentheses (the - /// settings clause of the query), up to a following top-level FORMAT or the end, or null when there is - /// none. + /// Returns the text after the last SETTINGS keyword outside quotes, heredocs, comments and parentheses + /// (the settings clause of the query), up to a following top-level FORMAT or the end, or null when there + /// is none. /// public static string? TrailingSettingsClause(string sql) { @@ -429,6 +429,10 @@ public static HashSet ParameterNames(string sql) { i = SkipQuoted(sql, i); } + else if (c == '$' && HeredocEnd(sql, i) is var heredocEnd and > 0) + { + i = heredocEnd; + } else if (StartsLineComment(sql, i)) { i = SkipLineComment(sql, i); @@ -481,7 +485,7 @@ public static HashSet ParameterNames(string sql) return clause.EndsWith(';') ? clause[..^1] : clause; } - /// Returns the words of outside quotes, comments and (unless + /// Returns the words of outside quotes, heredocs, comments and (unless /// ) parentheses. public static List TopLevelWords(string sql, bool nested = false) { @@ -494,6 +498,10 @@ public static List TopLevelWords(string sql, bool nested = false) { i = SkipQuoted(sql, i); } + else if (c == '$' && HeredocEnd(sql, i) is var heredocEnd and > 0) + { + i = heredocEnd; + } else if (StartsLineComment(sql, i)) { i = SkipLineComment(sql, i); diff --git a/tests/clickhouse-test-runner/README.md b/tests/clickhouse-test-runner/README.md index cd8e14ea3..97a5e1aeb 100644 --- a/tests/clickhouse-test-runner/README.md +++ b/tests/clickhouse-test-runner/README.md @@ -290,9 +290,10 @@ changes only the clients does not start it; the nightly run tests the clients of - CI does not stop a shard after 20 failures in a row (`--max-failures-chain`, see above), so a failed run shows all the failures of its shard. - CI does not run the failed tests again: no known client bug makes random tests fail, so a failed test fails - the job. If such a bug appears, `RETRY_FAILED=` runs the failed tests again, at most `n` times: a test - that passes on a retry shows as a warning, and a test that fails every time fails the job. Do not set - `RETRY_FAILED` when you grow or check the allowlist: a test that needs a retry is not reliable. + the job. The script also turns off the runner's own retries (`--dont_retry_failures`). If such a bug + appears, `RETRY_FAILED=` runs the failed tests again, at most `n` times: a test that passes on a retry + shows as a warning, and a test that fails every time fails the job. Do not set `RETRY_FAILED` when you grow + or check the allowlist: a test that needs a retry is not reliable. - The server version and the upstream tests are pinned together in [`clickhouse-version`](clickhouse-version). A new ClickHouse release changes nothing in CI, so a pull request never fails because of a release that it does not touch. A bump is a pull request of its own; see [`AGENTS.md`](AGENTS.md#bump-the-server-version). diff --git a/tests/clickhouse-test-runner/scripts/run-upstream-tests.sh b/tests/clickhouse-test-runner/scripts/run-upstream-tests.sh index 8c449337e..c16110a2d 100755 --- a/tests/clickhouse-test-runner/scripts/run-upstream-tests.sh +++ b/tests/clickhouse-test-runner/scripts/run-upstream-tests.sh @@ -150,8 +150,10 @@ echo "Protocol: ${CLICKHOUSE_TEST_RUNNER_PROTOCOL}" >&2 cd "${UPSTREAM_CLICKHOUSE_DIR}" # --max-failures-chain: by default the runner stops after 20 failures in a row. A failed test is information, # so the run goes on (a regression, or a run of KNOWN_FAILURES, reaches 20 at once). +# --dont_retry_failures: by default the runner runs a failed test again when its output has one of its +# MESSAGES_TO_RETRY (for example "No such file or directory"). RETRY_FAILED is the only retry here. runner=(python3 tests/clickhouse-test --no-stateful --no-random-settings --no-random-merge-tree-settings - --max-failures-chain 1000000) + --max-failures-chain 1000000 --dont_retry_failures) retries="${RETRY_FAILED:-0}" if ! [[ "${retries}" =~ ^[0-9]+$ ]]; then From 9bbfd7b797ded4f8c2e9798a7439dc4b86f8991c Mon Sep 17 00:00:00 2001 From: Polyglot AI <293096396+polyglotAI-bot@users.noreply.github.com> Date: Thu, 19 Nov 2026 12:48:07 +0000 Subject: [PATCH 3/3] tests: drop include-hidden-files from the artifact upload 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 --- .github/workflows/upstream-sql-tests.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/upstream-sql-tests.yml b/.github/workflows/upstream-sql-tests.yml index 849be9583..129c10996 100644 --- a/.github/workflows/upstream-sql-tests.yml +++ b/.github/workflows/upstream-sql-tests.yml @@ -288,8 +288,6 @@ jobs: name: upstream-sql-tests-${{ steps.upstream.outputs.ref }}-${{ matrix.protocol }}-shard-${{ matrix.shard }} retention-days: 14 if-no-files-found: ignore - # The test outputs are in the hidden directory .upstream. The path list limits the upload to them. - include-hidden-files: true path: | upstream-tests.log upstream-run.log