Browse Source

[importer_direct_upload] correcting the dialect value when enable_connector=true

ayush.goyal 4 years ago
parent
commit
e65379dd37
1 changed files with 1 additions and 12 deletions
  1. 1 12
      desktop/core/src/desktop/js/apps/notebook/snippet.js

+ 1 - 12
desktop/core/src/desktop/js/apps/notebook/snippet.js

@@ -208,18 +208,7 @@ class Snippet {
     });
     });
 
 
     self.isSqlDialect = ko.pureComputed(() => {
     self.isSqlDialect = ko.pureComputed(() => {
-      return vm.getSnippetViewSettings(self.type()).sqlDialect;
-    });
-
-    self.connector = ko.pureComputed(() => {
-      // To support optimizer changes in editor v2
-      return {
-        optimizer: self.type() === 'hive' || self.type() === 'impala' ? 'api' : 'off',
-        type: self.type(),
-        id: self.type(),
-        dialect: self.type(),
-        is_sql: self.isSqlDialect()
-      };
+      return vm.getSnippetViewSettings(self.dialect()).sqlDialect;
     });
     });
 
 
     self.dialect = ko.pureComputed(() => this.connector().dialect);
     self.dialect = ko.pureComputed(() => this.connector().dialect);