Skip to main content
To see how a query or a function behaves on a particular ClickHouse version, without installing anything, use ClickHouse Fiddle. It is a public web page where you write SQL, choose a ClickHouse version, run the query and get a link to the result that you can share. The bug report form of the ClickHouse repository asks for reproducers in this form.

Write a self-contained example

Every run starts on an empty server, so put everything the query needs into one script: the CREATE TABLE, the INSERT and the SELECT.
Including version() in the result makes it obvious which version produced it. On the version this article was checked with, the script returns:
Fiddle is a public service: do not paste confidential data, credentials or addresses of your own servers into it. It is meant for small self-contained examples, not for queries that depend on your own data or servers.

Compare two versions

Run the same script twice with different versions selected. For example, the range of the Date32 type was extended in ClickHouse 22.8 to start at the year 1900; before that it started at 1925 (see the 2022 changelog). This query shows the difference:
On 22.8 and every later version the result is the date you passed:
A version older than 22.8 cannot represent this date and returns a different value.

What the compatibility setting does and does not do

On a server that you already have, the compatibility setting makes the server use the default values of settings from an older version. It does not turn the server into that version: functions, data types and bug fixes stay those of the binary that is running.
The default of async_insert changed in 26.2, so compatibility = '25.12' brings the old default back. The toDate32 query above, however, returns 1912-06-15 with any value of compatibility. To learn which defaults changed in which version, without running anything on the old version, query system.settings_changes:

When you need a real server of that version

For anything that Fiddle cannot run, start the version you need in a container. The official Docker image has a tag for every release and for every monthly version, as described in Install ClickHouse using Docker. Before an upgrade, also read the changelog entries between your version and the target version; Which ClickHouse version to use in production? explains how to test a new version against your own workload.