kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liy...@apache.org
Subject kylin git commit: minor, keep same column in Rowkey and AggrGroup
Date Fri, 25 Nov 2016 07:05:25 GMT
Repository: kylin
Updated Branches:
  refs/heads/master 89875fae7 -> d367bf56d


minor, keep same column in Rowkey and AggrGroup


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

Branch: refs/heads/master
Commit: d367bf56df8cf6581cc3dbdae57b5ed167be47f7
Parents: 89875fa
Author: Li Yang <liyang@apache.org>
Authored: Fri Nov 25 15:05:19 2016 +0800
Committer: Li Yang <liyang@apache.org>
Committed: Fri Nov 25 15:05:19 2016 +0800

----------------------------------------------------------------------
 .../java/org/apache/kylin/cube/model/AggregationGroup.java    | 2 +-
 .../main/java/org/apache/kylin/cube/model/RowKeyColDesc.java  | 2 +-
 .../main/java/org/apache/kylin/metadata/model/TblColRef.java  | 7 +++++++
 3 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/d367bf56/core-cube/src/main/java/org/apache/kylin/cube/model/AggregationGroup.java
----------------------------------------------------------------------
diff --git a/core-cube/src/main/java/org/apache/kylin/cube/model/AggregationGroup.java b/core-cube/src/main/java/org/apache/kylin/cube/model/AggregationGroup.java
index 12c0574..9bd082f 100644
--- a/core-cube/src/main/java/org/apache/kylin/cube/model/AggregationGroup.java
+++ b/core-cube/src/main/java/org/apache/kylin/cube/model/AggregationGroup.java
@@ -107,7 +107,7 @@ public class AggregationGroup {
         
         for (int i = 0; i < names.length; i++) {
             TblColRef col = cubeDesc.getModel().findColumn(names[i]);
-            names[i] = col.getTableAlias() + "." + col.getName();
+            names[i] = col.getIdentity();
         }
         
         // check no dup

http://git-wip-us.apache.org/repos/asf/kylin/blob/d367bf56/core-cube/src/main/java/org/apache/kylin/cube/model/RowKeyColDesc.java
----------------------------------------------------------------------
diff --git a/core-cube/src/main/java/org/apache/kylin/cube/model/RowKeyColDesc.java b/core-cube/src/main/java/org/apache/kylin/cube/model/RowKeyColDesc.java
index 326052e..3b49323 100644
--- a/core-cube/src/main/java/org/apache/kylin/cube/model/RowKeyColDesc.java
+++ b/core-cube/src/main/java/org/apache/kylin/cube/model/RowKeyColDesc.java
@@ -62,9 +62,9 @@ public class RowKeyColDesc {
     private TblColRef colRef;
 
     public void init(int index, CubeDesc cubeDesc) {
-        column = column.toUpperCase();
         bitIndex = index;
         colRef = cubeDesc.getModel().findColumn(column);
+        column = colRef.getIdentity();
         Preconditions.checkArgument(colRef != null, "Cannot find rowkey column %s in cube
%s", column, cubeDesc);
 
         Preconditions.checkState(StringUtils.isNotEmpty(this.encoding));

http://git-wip-us.apache.org/repos/asf/kylin/blob/d367bf56/core-metadata/src/main/java/org/apache/kylin/metadata/model/TblColRef.java
----------------------------------------------------------------------
diff --git a/core-metadata/src/main/java/org/apache/kylin/metadata/model/TblColRef.java b/core-metadata/src/main/java/org/apache/kylin/metadata/model/TblColRef.java
index 9b71524..2cfbafc 100644
--- a/core-metadata/src/main/java/org/apache/kylin/metadata/model/TblColRef.java
+++ b/core-metadata/src/main/java/org/apache/kylin/metadata/model/TblColRef.java
@@ -99,6 +99,7 @@ public class TblColRef implements Serializable {
 
     private TableRef table;
     private ColumnDesc column;
+    private String identity;
 
     TblColRef(ColumnDesc column) {
         this.column = column;
@@ -188,6 +189,12 @@ public class TblColRef implements Serializable {
         return true;
     }
 
+    public String getIdentity() {
+        if (identity == null)
+            identity = getTableAlias() + "." + getName();
+        return identity;
+    }
+
     @Override
     public String toString() {
         String alias = table == null ? "UNKNOWN_MODEL" : table.getAlias();


Mime
View raw message