Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/src/main/sphinx/connector/clickhouse.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ from different catalogs accessing ClickHouse or any other supported data source.

To connect to a ClickHouse server, you need:

- ClickHouse (version 24.3 or higher) or Altinity (version 22.3 or higher).
- ClickHouse (version 25.3 or higher) or Altinity (version 22.8 or higher).
- Network access from the Trino coordinator and workers to the ClickHouse
server. Port 8123 is the default port.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@
package io.trino.plugin.clickhouse;

import io.trino.testing.QueryRunner;
import org.junit.jupiter.api.Test;

import static io.trino.plugin.clickhouse.TestingClickHouseServer.ALTINITY_DEFAULT_IMAGE;
import static org.assertj.core.api.Assertions.assertThatThrownBy;

final class TestAltinityClickHouseTypeMapping
extends BaseClickHouseTypeMapping
Expand All @@ -29,12 +27,4 @@ protected QueryRunner createQueryRunner()
clickhouseServer = closeAfterClass(new TestingClickHouseServer(ALTINITY_DEFAULT_IMAGE));
return ClickHouseQueryRunner.builder(clickhouseServer).build();
}

@Override
@Test
public void testUnsupportedPoint()
{
assertThatThrownBy(super::testUnsupportedPoint)
.hasMessageContaining("Failed to execute statement: CREATE TABLE");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ public void testDropColumn()
assertUpdate("INSERT INTO " + tableName + "(x,y,a) SELECT 123, 456, 111", 1);

// the columns are referenced by order_by/partition_by property can not be dropped
assertQueryFails("ALTER TABLE " + tableName + " DROP COLUMN x", "(?s).* Missing columns: 'x' while processing query: 'x', required columns: 'x' 'x'.*");
assertQueryFails("ALTER TABLE " + tableName + " DROP COLUMN a", "(?s).* Missing columns: 'a' while processing query: 'a', required columns: 'a' 'a'.*");
assertQueryFails("ALTER TABLE " + tableName + " DROP COLUMN x", "(?s).* Missing columns: 'x' while processing: 'x', required columns: 'x'.*");
assertQueryFails("ALTER TABLE " + tableName + " DROP COLUMN a", "(?s).* Missing columns: 'a' while processing: 'a', required columns: 'a'.*");

assertUpdate("ALTER TABLE " + tableName + " DROP COLUMN IF EXISTS y");
assertUpdate("ALTER TABLE " + tableName + " DROP COLUMN IF EXISTS notExistColumn");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,19 @@ public class TestingClickHouseServer
* <a href="https://kb.altinity.com/altinity-kb-setup-and-maintenance/clickhouse-versions/">Versioning schema</a>
*/
private static final DockerImageName CLICKHOUSE_IMAGE = DockerImageName.parse("clickhouse/clickhouse-server");
// https://clickhouse.com/docs/en/whats-new/changelog#-clickhouse-release-2412-2024-12-19
public static final DockerImageName CLICKHOUSE_LATEST_IMAGE = CLICKHOUSE_IMAGE.withTag("24.12.1.1614"); // EOL in 3 releases after 2024-12-19
// https://clickhouse.com/docs/en/whats-new/changelog#-clickhouse-release-243-lts-2024-03-27
public static final DockerImageName CLICKHOUSE_DEFAULT_IMAGE = CLICKHOUSE_IMAGE.withTag("24.3.14.35"); // EOL in 1 year after 2024-03-27
// https://clickhouse.com/docs/whats-new/changelog#257
public static final DockerImageName CLICKHOUSE_LATEST_IMAGE = CLICKHOUSE_IMAGE.withTag("25.7.7.68"); // EOL in 3 releases after 2025-07-24
// https://clickhouse.com/docs/whats-new/changelog#253
public static final DockerImageName CLICKHOUSE_DEFAULT_IMAGE = CLICKHOUSE_IMAGE.withTag("25.3.6.56"); // EOL in 1 year after 2025-03-27

/**
* <a href="https://docs.altinity.com/altinitystablebuilds/#altinity-stable-builds-life-cycle-table">Altinity Stable Builds Life-Cycle Table</a>
* <p>
* On Mac/arm 23.3.13.7.altinitystable, 23.8.8.21.altinitystable and 22.8.15.25.altinitystable and later versions available on ARM.
*/
private static final DockerImageName ALTINITY_IMAGE = DockerImageName.parse("altinity/clickhouse-server").asCompatibleSubstituteFor("clickhouse/clickhouse-server");
public static final DockerImageName ALTINITY_LATEST_IMAGE = ALTINITY_IMAGE.withTag("24.3.12.76.altinitystable"); // EOL is 23 Jul 2027
public static final DockerImageName ALTINITY_DEFAULT_IMAGE = ALTINITY_IMAGE.withTag("22.3.15.34.altinitystable"); // EOL is 15 Jul 2025
public static final DockerImageName ALTINITY_LATEST_IMAGE = ALTINITY_IMAGE.withTag("25.3.6.10034.altinitystable"); // EOL is 29 Jul 2028
public static final DockerImageName ALTINITY_DEFAULT_IMAGE = ALTINITY_IMAGE.withTag("22.8.20.12.altinitystable"); // EOL is 13 Feb 2026

private final ClickHouseContainer dockerContainer;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class EnvMultinodeClickhouse
private static final String ZOOKEEPER = "zookeeper";

private static final DockerImageName CLICKHOUSE_IMAGE = DockerImageName.parse("clickhouse/clickhouse-server"); // see TestingClickHouseServer for details
private static final DockerImageName CLICKHOUSE_DEFAULT_IMAGE = CLICKHOUSE_IMAGE.withTag("24.3.14.35"); // EOL in 1 year after 2024-03-27
private static final DockerImageName CLICKHOUSE_DEFAULT_IMAGE = CLICKHOUSE_IMAGE.withTag("25.3.6.56"); // EOL in 1 year after 2025-03-27
private static final String CLICKHOUSE = "clickhouse";
private static final String CLICKHOUSE_NTH = CLICKHOUSE + "-";
private static final String CONTAINER_CLICKHOUSE_CONFIG_DIR = "/etc/clickhouse-server/";
Expand Down