Skip to content

Commit

Permalink
Upgrade minimum required ClickHouse to 21.3
Browse files Browse the repository at this point in the history
EOL schedule:
20.3: 31 March 2021
20.8: 31 August 2021
  • Loading branch information
ebyhr committed Jan 20, 2022
1 parent 7261f42 commit 77523b5
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 41 deletions.
2 changes: 1 addition & 1 deletion docs/src/main/sphinx/connector/clickhouse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Requirements

To connect to a ClickHouse server, you need:

* ClickHouse (version 20.8 or higher) or Altinity (version 20.3 or higher).
* ClickHouse (version 21.3 or higher) or Altinity (version 20.3 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 @@ -17,8 +17,6 @@
import io.trino.testing.QueryRunner;

import static io.trino.plugin.clickhouse.ClickHouseQueryRunner.createClickHouseQueryRunner;
import static io.trino.testing.sql.TestTable.randomTableSuffix;
import static org.assertj.core.api.Assertions.assertThatThrownBy;

public class TestClickHouseConnectorSmokeTest
extends BaseClickHouseConnectorSmokeTest
Expand All @@ -38,22 +36,4 @@ protected QueryRunner createQueryRunner()
.buildOrThrow(),
REQUIRED_TPCH_TABLES);
}

@Override
public void testRenameSchema()
{
// Override because the default database engine in version < v20.10.2.20-stable doesn't allow renaming schemas
assertThatThrownBy(super::testRenameSchema)
.hasMessageMatching("ClickHouse exception, code: 48,.* Ordinary: RENAME DATABASE is not supported .*\\n");

String schemaName = "test_rename_schema_" + randomTableSuffix();
try {
clickHouseServer.execute("CREATE DATABASE " + schemaName + " ENGINE = Atomic");
assertUpdate("ALTER SCHEMA " + schemaName + " RENAME TO " + schemaName + "_renamed");
}
finally {
assertUpdate("DROP SCHEMA IF EXISTS " + schemaName);
assertUpdate("DROP SCHEMA IF EXISTS " + schemaName + "_renamed");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -99,25 +99,6 @@ public void testColumnName(String columnName)
throw new SkipException("TODO: test not implemented yet");
}

@Test
@Override
public void testRenameSchema()
{
// Override because the default database engine in version < v20.10.2.20-stable doesn't allow renaming schemas
assertThatThrownBy(super::testRenameSchema)
.hasMessageMatching("ClickHouse exception, code: 48,.* Ordinary: RENAME DATABASE is not supported .*\\n");

String schemaName = "test_rename_schema_" + randomTableSuffix();
try {
onRemoteDatabase().execute("CREATE DATABASE " + schemaName + " ENGINE = Atomic");
assertUpdate("ALTER SCHEMA " + schemaName + " RENAME TO " + schemaName + "_renamed");
}
finally {
assertUpdate("DROP SCHEMA IF EXISTS " + schemaName);
assertUpdate("DROP SCHEMA IF EXISTS " + schemaName + "_renamed");
}
}

@Override
public void testRenameColumn()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class TestingClickHouseServer
{
private static final DockerImageName CLICKHOUSE_IMAGE = DockerImageName.parse("yandex/clickhouse-server");
public static final DockerImageName CLICKHOUSE_LATEST_IMAGE = CLICKHOUSE_IMAGE.withTag("21.11.10.1");
public static final DockerImageName CLICKHOUSE_DEFAULT_IMAGE = CLICKHOUSE_IMAGE.withTag("20.8");
public static final DockerImageName CLICKHOUSE_DEFAULT_IMAGE = CLICKHOUSE_IMAGE.withTag("21.3.2.5"); // EOL is 30 Mar 2022

// Altinity Stable Builds Life-Cycle Table https://docs.altinity.com/altinitystablebuilds/#altinity-stable-builds-life-cycle-table
private static final DockerImageName ALTINITY_IMAGE = DockerImageName.parse("altinity/clickhouse-server").asCompatibleSubstituteFor("yandex/clickhouse-server");
Expand Down

0 comments on commit 77523b5

Please sign in to comment.