ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject ignite git commit: IGNITE-2424 Discern columns with the same name.
Date Wed, 24 Feb 2016 11:15:54 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc2 1c7286063 -> d558cc4f3


IGNITE-2424 Discern columns with the same name.


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

Branch: refs/heads/ignite-843-rc2
Commit: d558cc4f39c4c9e028a5f13acf0ea8a0de29ff51
Parents: 1c72860
Author: Vasiliy Sisko <vsisko@gridgain.com>
Authored: Wed Feb 24 18:11:32 2016 +0700
Committer: Andrey <anovikov@gridgain.com>
Committed: Wed Feb 24 18:11:32 2016 +0700

----------------------------------------------------------------------
 .../src/main/js/controllers/sql-controller.js           | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/d558cc4f/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 84773b2..55748cc 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
@@ -486,6 +486,18 @@ consoleModule.controller('sqlController', function ($http, $timeout,
$interval,
     var _rebuildColumns = function (paragraph) {
         var columnDefs = [];
 
+        _.forEach(_.groupBy(paragraph.meta, 'fieldName'), function (colsByName, fieldName)
{
+            var colsByTypes = _.groupBy(colsByName, 'typeName');
+
+            var needType = _.keys(colsByTypes).length > 1;
+
+            _.forEach(colsByTypes, function(colsByType, typeName) {
+                _.forEach(colsByType, function (col, ix) {
+                    col.fieldName = (needType && !$common.isEmptyString(typeName)
? typeName + '.' : '') + fieldName + (ix > 0 ? ix : '');
+                })
+            });
+        });
+
         _.forEach(paragraph.meta, function (col, idx) {
             if (paragraph.columnFilter(col)) {
                 if (_notObjectType(col.fieldTypeName))


Mime
View raw message