ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [2/2] ignite git commit: IGNITE-1870 Fixed minor bugs for agg functions logic.
Date Fri, 13 Nov 2015 08:09:28 GMT
IGNITE-1870 Fixed minor bugs for agg functions logic.


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

Branch: refs/heads/ignite-843-rc1
Commit: d5412a5f79a4ad53679d55bf35d4ed7e2aabb46a
Parents: fbf6a04d
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Fri Nov 13 15:07:46 2015 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Fri Nov 13 15:07:46 2015 +0700

----------------------------------------------------------------------
 .../src/main/js/controllers/sql-controller.js                 | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/d5412a5f/modules/control-center-web/src/main/js/controllers/sql-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/sql-controller.js b/modules/control-center-web/src/main/js/controllers/sql-controller.js
index 48b0976..a4188db 100644
--- a/modules/control-center-web/src/main/js/controllers/sql-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/sql-controller.js
@@ -525,8 +525,11 @@ consoleModule.controller('sqlController',
             curCols.forEach(function (curCol) {
                 var col = _.find(availableCols, {label: curCol.label});
 
-                if (col && acceptableType(col.type))
+                if (col && acceptableType(col.type)) {
+                    col.aggFx = curCol.aggFx;
+
                     retainedCols.push(col);
+                }
             });
 
             // If nothing was restored, add first acceptable column.
@@ -969,7 +972,7 @@ consoleModule.controller('sqlController',
                 return _sum(rows, idx);
 
             case 'AVG':
-                return len > 0 ? _sum(idx) / len : 0;
+                return len > 0 ? _sum(rows, idx) / len : 0;
 
             case 'COUNT':
                 return len;


Mime
View raw message