Skip to content

Commit

Permalink
fix types for identIgnoreCase in snowflake driver
Browse files Browse the repository at this point in the history
  • Loading branch information
KSDaemon committed Jan 23, 2025
1 parent d906e0e commit b2402a5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/cubejs-snowflake-driver/src/SnowflakeDriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ interface SnowflakeDriverOptions {
resultPrefetch?: number,
exportBucket?: SnowflakeDriverExportBucket,
executionTimeout?: number,
caseSensitiveIdentifiers?: boolean,
identIgnoreCase?: boolean,
application: string,
readOnly?: boolean,

Expand Down Expand Up @@ -281,7 +281,7 @@ export class SnowflakeDriver extends BaseDriver implements DriverInterface {
exportBucket: this.getExportBucket(dataSource),
resultPrefetch: 1,
executionTimeout: getEnv('dbQueryTimeout', { dataSource }),
ignoreCase: getEnv('snowflakeQuotedIdentIgnoreCase', { dataSource }),
identIgnoreCase: getEnv('snowflakeQuotedIdentIgnoreCase', { dataSource }),
exportBucketCsvEscapeSymbol: getEnv('dbExportBucketCsvEscapeSymbol', { dataSource }),
application: 'CubeDev_Cube',
...config
Expand Down Expand Up @@ -453,10 +453,10 @@ export class SnowflakeDriver extends BaseDriver implements DriverInterface {

await this.execute(connection, 'ALTER SESSION SET TIMEZONE = \'UTC\'', [], false);
await this.execute(connection, `ALTER SESSION SET STATEMENT_TIMEOUT_IN_SECONDS = ${this.config.executionTimeout}`, [], false);

// We only want to ignore the case if someone sets the value to false explicitly since the default assumption
// is that casing matters
if (!this.ignoreCase) {
if (!this.config.identIgnoreCase) {
await this.execute(connection, 'ALTER SESSION SET QUOTED_IDENTIFIERS_IGNORE_CASE = FALSE', [], false);
}
return connection;
Expand Down

0 comments on commit b2402a5

Please sign in to comment.