KYLIN-2462 fix CubeDesc.getCopyOf()
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/6692f36a Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/6692f36a Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/6692f36a Branch: refs/heads/2.0.x-hbase0.98 Commit: 6692f36af9e11f3395017260a7e2ecd4a263057d Parents: 79aa545 Author: lidongsjtu <lid...@apache.org> Authored: Fri Apr 21 18:11:08 2017 +0800 Committer: lidongsjtu <lid...@apache.org> Committed: Fri Apr 21 18:11:08 2017 +0800 ---------------------------------------------------------------------- .../src/main/java/org/apache/kylin/cube/model/CubeDesc.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/6692f36a/core-cube/src/main/java/org/apache/kylin/cube/model/CubeDesc.java ---------------------------------------------------------------------- diff --git a/core-cube/src/main/java/org/apache/kylin/cube/model/CubeDesc.java b/core-cube/src/main/java/org/apache/kylin/cube/model/CubeDesc.java index ff65a3c..8af9a6f 100644 --- a/core-cube/src/main/java/org/apache/kylin/cube/model/CubeDesc.java +++ b/core-cube/src/main/java/org/apache/kylin/cube/model/CubeDesc.java @@ -97,7 +97,7 @@ public class CubeDesc extends RootPersistentEntity implements IEngineAware { } } - public enum DeriveType implements java.io.Serializable{ + public enum DeriveType implements java.io.Serializable { LOOKUP, PK_FK, EXTENDED_COLUMN } @@ -485,7 +485,7 @@ public class CubeDesc extends RootPersistentEntity implements IEngineAware { logger.info("checkSignature on {} is skipped as the its version {} is different from kylin version {}", getName(), cubeVersion, kylinVersion); return true; } - + if (kylinVersion.isCompatibleWith(cubeVersion) && !kylinVersion.isSignatureCompatibleWith(cubeVersion)) { logger.info("checkSignature on {} is skipped as the its version is {} (not signature compatible but compatible) ", getName(), cubeVersion); return true; @@ -876,7 +876,7 @@ public class CubeDesc extends RootPersistentEntity implements IEngineAware { } } } - + return initDimensionColRef(col); } @@ -1218,6 +1218,7 @@ public class CubeDesc extends RootPersistentEntity implements IEngineAware { newCubeDesc.setOverrideKylinProps(cubeDesc.getOverrideKylinProps()); newCubeDesc.setConfig((KylinConfigExt) cubeDesc.getConfig()); newCubeDesc.setPartitionOffsetStart(cubeDesc.getPartitionOffsetStart()); + newCubeDesc.setVersion(cubeDesc.getVersion()); newCubeDesc.updateRandomUuid(); return newCubeDesc; }