Skip to content

Commit 38fc404

Browse files
committed
dev
1 parent cd9d7e6 commit 38fc404

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

packages/cubejs-prestodb-driver/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
},
2929
"dependencies": {
3030
"@cubejs-backend/base-driver": "^0.36.5",
31+
"@cubejs-backend/schema-compiler": "^0.36.7",
3132
"@cubejs-backend/shared": "^0.36.5",
3233
"presto-client": "^0.12.2",
3334
"ramda": "^0.27.0",

packages/cubejs-schema-compiler/src/adapter/PrestodbQuery.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,8 @@ export class PrestodbQuery extends BaseQuery {
129129
templates.types.binary = 'VARBINARY';
130130
return templates;
131131
}
132+
133+
public castToString(sql: any): string {
134+
return `CAST(${sql} as VARCHAR)`;
135+
}
132136
}

packages/cubejs-schema-compiler/src/adapter/QueryBuilder.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ const ADAPTERS = {
3838
elasticsearch: ElasticSearchQuery,
3939
materialize: PostgresQuery,
4040
cubestore: CubeStoreQuery,
41+
trino: PrestodbQuery,
4142
};
4243

4344
export const queryClass = (dbType, dialectClass) => dialectClass || ADAPTERS[dbType];

0 commit comments

Comments
 (0)