[frontend] Check complexity for all dialects when configured in editor V2
@@ -823,7 +823,8 @@ export default class Snippet {
}
});
- if (HAS_OPTIMIZER && !this.parentVm.isNotificationManager()) {
+ // TODO: Add optimizer check per connector?
+ if (window.HAS_OPTIMIZER && !this.parentVm.isNotificationManager()) {
let lastComplexityRequest;
let lastCheckedComplexityStatement;
const knownResponses = [];
@@ -933,17 +934,16 @@ export default class Snippet {
}
};
- if (this.dialect() === DIALECT.hive || this.dialect() === DIALECT.impala) {
if (this.statement_raw()) {
window.setTimeout(() => {
this.checkComplexity();
}, 2000);
}
+
this.delayedStatement.subscribe(() => {
this.checkComplexity();
});
}
- }
this.wasBatchExecuted = ko.observable(!!snippetRaw.wasBatchExecuted);
this.isReady = ko.pureComputed(
