IGNITE-9566 Web console: Implemented explain of selected part of SQL query.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/f66467cd
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/f66467cd
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/f66467cd

Branch: refs/heads/ignite-7251
Commit: f66467cda21cd81fce8733ed2175698c77e35299
Parents: 39379a3
Author: Alexander Kalinin <[email protected]>
Authored: Thu Sep 13 21:34:53 2018 +0700
Committer: Alexey Kuznetsov <[email protected]>
Committed: Thu Sep 13 21:34:53 2018 +0700

----------------------------------------------------------------------
 .../page-queries/components/queries-notebook/controller.js   | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f66467cd/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.js
----------------------------------------------------------------------
diff --git 
a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.js
 
b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.js
index 10904dc..e2cd114 100644
--- 
a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.js
+++ 
b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.js
@@ -1497,7 +1497,7 @@ export class NotebookCtrl {
             $scope.queryAvailable(paragraph) && 
_chooseNode(paragraph.cacheName, local)
                 .then((nid) => {
                     // If we are executing only selected part of query then 
Notebook shouldn't be saved.
-                    if (!paragraph.partialQuery)
+                        if (!paragraph.partialQuery)
                         
Notebook.save($scope.notebook).catch(Messages.showError);
 
                     paragraph.localQueryMode = local;
@@ -1564,8 +1564,8 @@ export class NotebookCtrl {
             if (!$scope.queryAvailable(paragraph))
                 return;
 
-            Notebook.save($scope.notebook)
-                .catch(Messages.showError);
+            if (!paragraph.partialQuery)
+                Notebook.save($scope.notebook).catch(Messages.showError);
 
             _cancelRefresh(paragraph);
 
@@ -1577,7 +1577,7 @@ export class NotebookCtrl {
                     const args = paragraph.queryArgs = {
                         type: 'EXPLAIN',
                         cacheName: $scope.cacheNameForSql(paragraph),
-                        query: 'EXPLAIN ' + paragraph.query,
+                        query: 'EXPLAIN ' + (paragraph.partialQuery || 
paragraph.query),
                         pageSize: paragraph.pageSize
                     };
 

Reply via email to