Files
greptimedb/tests
discord9 c879564671 chore(common-query): drop the raw-series request extension transport (#9815)
* chore(query): drop the prepared raw-series RPC skeleton

The raw-series preparation RPC was merged into `narthex` for a plan that never
landed: no server or frontend dispatches `greptime.prepare_raw_series.v1`, and the
three `Datanode` methods, `bind_raw_series_query` and the `QueryEngine` trio have no
call sites and no implementors. `PreparedNamedRawSeries` had no user outside them.

The wire envelope never shipped -- no tag contains the commit that added it -- so the
compatibility fixtures go with it. The harness drives `wire/` fixtures from the Rust
tests that own their context conversion rather than from SQLness discovery, and has
no retirement mechanism to record instead.

Left in place: `RawSeriesRequest` and its extension key, `raw_series_frame_ordering`,
`unpack_raw_series` and `RawLabelSource`, all of which the surviving series-frame
path still uses.

Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>

* chore(common-query): drop the raw-series request extension transport

The prepared raw-series RPC carried a `RawSeriesRequest` through a
query-context extension, and with that RPC gone (`607de914464`) nothing in
`src/` writes or reads the extension any more. What remains is the binding
the table scan actually uses: `RawSeriesRequest`, `RawSeriesTag`, `bind`,
`validate` and `same_encoding_identity`, unchanged.

Deleted: the extension key, `take_raw_series_request`, and the two
serialization methods that only existed to encode and decode that
transport, plus the wire fixture whose only reader was the test for them.
The fixture never shipped — the commit that introduced it is in no tag.

The tests that covered `validate` are kept, with their rejections now
asserted directly instead of through a JSON round-trip: an unsupported
version, an empty field list, a duplicate field, and a non-field column
id are all still refused. The binding test is untouched, including its
order, identity and `Arc` assertions.

`pub` items in a library crate never trip `dead_code`, so the compiler
could not have found this; the greps above are the evidence.

Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>

---------

Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-21 18:53:57 +08:00
..

Sqlness Test

Sqlness manual

Case file

Sqlness has two types of file:

  • .sql: test input, SQL only
  • .result: expected test output, SQL and its results

.result is the output (execution result) file. If you see .result files is changed, it means this test gets a different result and indicates it fails. You should check change logs to solve the problem.

You only need to write test SQL in .sql file, and run the test.

Case organization

The root dir of input cases is tests/cases. It contains several subdirectories stand for different test modes. E.g., standalone/ contains all the tests to run under greptimedb standalone start mode.

Under the first level of subdirectory (e.g. the cases/standalone), you can organize your cases as you like. Sqlness walks through every file recursively and runs them.

Kafka WAL

Sqlness supports Kafka WAL. You can either provide a Kafka cluster or let sqlness to start one for you.

To run test with kafka, you need to pass the option -w kafka. If no other options are provided, sqlness will use conf/kafka-cluster.yml to start a Kafka cluster. This requires docker and docker-compose commands in your environment.

Otherwise, you can additionally pass the your existing kafka environment to sqlness with -k option. E.g.:

cargo sqlness bare -w kafka -k localhost:9092

In this case, sqlness will not start its own kafka cluster and the one you provided instead.

Run the test

Unlike other tests, this harness is in a binary target form. You can run it with:

cargo sqlness bare

It automatically finishes the following procedures: compile GreptimeDB, start it, grab tests and feed it to the server, then collect and compare the results. You only need to check if the .result files are changed. If not, congratulations, the test is passed 🥳!