浏览代码

HUE-9573 [editor] Adding missing statements to the multi statement execution (#1429)

Mahesh Balakrishnan 5 年之前
父节点
当前提交
c56165ab94

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

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

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

@@ -19,7 +19,7 @@ import Executable, { ExecutableRaw } from 'apps/notebook2/execution/executable';
 import Executor from 'apps/notebook2/execution/executor';
 import { ParsedSqlStatement } from 'parse/sqlStatementsParser';
 
-const BATCHABLE_STATEMENT_TYPES = /ALTER|CREATE|DELETE|DROP|GRANT|INSERT|INVALIDATE|LOAD|SET|TRUNCATE|UPDATE|UPSERT|USE/i;
+const BATCHABLE_STATEMENT_TYPES = /ALTER|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;