瀏覽代碼

PR-2235 [editor] Adding missing ANALYZE to the multi statement execution (#2235)

Mahesh Balakrishnan 4 年之前
父節點
當前提交
cfc4862973

+ 1 - 2
desktop/core/src/desktop/js/apps/editor/execution/sqlExecutable.ts

@@ -23,8 +23,7 @@ import { ParsedSqlStatement } from 'parse/sqlStatementsParser';
 import { VariableIndex } from '../components/variableSubstitution/types';
 
 const BATCHABLE_STATEMENT_TYPES =
-  /ALTER|WITH|REFRESH|CREATE|DELETE|DROP|GRANT|INSERT|INVALIDATE|LOAD|SET|TRUNCATE|UPDATE|UPSERT|USE/i;
-
+  /ALTER|ANALYZE|WITH|REFRESH|CREATE|DELETE|DROP|GRANT|INSERT|INVALIDATE|LOAD|SET|TRUNCATE|UPDATE|UPSERT|USE/i;
 const SELECT_END_REGEX = /([^;]*)([;]?[^;]*)/;
 const ERROR_REGEX = /line ([0-9]+)(:([0-9]+))?/i;
 const TABLE_DDL_REGEX =

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

@@ -2419,7 +2419,7 @@ class Snippet {
     self.checkDdlNotification = function () {
       if (
         self.lastExecutedStatement() &&
-        /ALTER|WITH|REFRESH|CREATE|DELETE|DROP|GRANT|INSERT|INVALIDATE|LOAD|SET|TRUNCATE|UPDATE|UPSERT|USE/i.test(
+        /ALTER|ANALYZE|WITH|REFRESH|CREATE|DELETE|DROP|GRANT|INSERT|INVALIDATE|LOAD|SET|TRUNCATE|UPDATE|UPSERT|USE/i.test(
           self.lastExecutedStatement().firstToken
         )
       ) {