Skip to content

Commit

Permalink
[editor] Fix missing predict check for optimizer type
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanAhlen authored and romainr committed Aug 26, 2021
1 parent 0c90103 commit 18a6def
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ import { SqlAnalyzer, SqlAnalyzerProvider, SqlAnalyzerMode } from './types';
const sqlAnalyzerInstances: { [connectorId: string]: SqlAnalyzer | undefined } = {};

const createSqlAnalyzer = (connector: Connector): SqlAnalyzer => {
// TODO: Remove window.SQL_ANALYZER_MODE and hardcoded { optimizer: 'api' } when 'connector.optimizer_mode' works.
if (
(<hueWindow>window).SQL_ANALYZER_MODE === SqlAnalyzerMode.local ||
(<hueWindow>window).SQL_ANALYZER_MODE === SqlAnalyzerMode.api
) {
if (connector.optimizer === 'api') {
return new CombinedSqlAnalyser(connector);
}
return new NoopSqlAnalyzer();
Expand Down

0 comments on commit 18a6def

Please sign in to comment.