From 0ba82a4d87e6bae54c5addc6ef321f6c49b1eed2 Mon Sep 17 00:00:00 2001 From: Fernando Arreola Date: Thu, 21 Mar 2024 10:17:39 -0600 Subject: [PATCH] Do not fail if server is not not set in env. --- packages/malloy-db-trino/src/trino_connection.ts | 9 ++------- packages/malloy-db-trino/src/trino_executor.ts | 4 ---- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/packages/malloy-db-trino/src/trino_connection.ts b/packages/malloy-db-trino/src/trino_connection.ts index 3e7e53e8d..ede89e426 100644 --- a/packages/malloy-db-trino/src/trino_connection.ts +++ b/packages/malloy-db-trino/src/trino_connection.ts @@ -442,13 +442,8 @@ export class TrinoConnection implements Connection, PersistSQLResults { }*/ public async estimateQueryCost(_sqlCommand: string): Promise { - /*const dryRunResults = await this.dryRunSQLQuery(sqlCommand); - return { - queryCostBytes: Number( - dryRunResults.metadata.statistics.totalBytesProcessed - ), - };*/ - throw new Error('Not impld 6'); + // TODO(figutierrez): Implement. + return {}; } public async executeSQLRaw(_sqlCommand: string): Promise { diff --git a/packages/malloy-db-trino/src/trino_executor.ts b/packages/malloy-db-trino/src/trino_executor.ts index 8bd6eb68d..973414004 100644 --- a/packages/malloy-db-trino/src/trino_executor.ts +++ b/packages/malloy-db-trino/src/trino_executor.ts @@ -48,10 +48,6 @@ export class TrinoExecutor { catalog, schema, }; - } else { - throw new Error( - 'Tried to get Trino connection from Env, no TRINO_SERVER specified.' - ); } return undefined;