Skip to content

Commit 3185910

Browse files
committed
feat(clickhouse-driver): Switch from apla-clickhouse to @clickhouse/client
1 parent 54dd605 commit 3185910

File tree

8 files changed

+369
-245
lines changed

8 files changed

+369
-245
lines changed

packages/cubejs-backend-shared/src/env.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ const variables: Record<string, (...args: any) => any> = {
532532
},
533533

534534
/**
535-
* Query timeout. Currently used in BigQuery, Dremio, Postgres, Snowflake
535+
* Query timeout. Currently used in BigQuery, ClickHouse, Dremio, Postgres, Snowflake
536536
* and Athena drivers and the orchestrator (queues, pre-aggs). For the
537537
* orchestrator this variable did not split by the datasource.
538538
*

packages/cubejs-base-driver/src/BaseDriver.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -614,9 +614,14 @@ export abstract class BaseDriver implements DriverInterface {
614614
return [];
615615
}
616616

617-
public createTable(quotedTableName: string, columns: TableColumn[]) {
617+
// This is only for use in tests
618+
public async createTableRaw(query: string): Promise<void> {
619+
await this.query(query);
620+
}
621+
622+
public async createTable(quotedTableName: string, columns: TableColumn[]): Promise<void> {
618623
const createTableSql = this.createTableSql(quotedTableName, columns);
619-
return this.query(createTableSql, []).catch(e => {
624+
await this.query(createTableSql, []).catch(e => {
620625
e.message = `Error during create table: ${createTableSql}: ${e.message}`;
621626
throw e;
622627
});

packages/cubejs-clickhouse-driver/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,9 @@
2727
"integration:clickhouse": "jest dist/test"
2828
},
2929
"dependencies": {
30-
"@cubejs-backend/apla-clickhouse": "^1.7",
30+
"@clickhouse/client": "^1.7.0",
3131
"@cubejs-backend/base-driver": "1.1.4",
3232
"@cubejs-backend/shared": "1.1.4",
33-
"generic-pool": "^3.6.0",
3433
"moment": "^2.24.0",
3534
"sqlstring": "^2.3.1",
3635
"uuid": "^8.3.2"

0 commit comments

Comments
 (0)