Repository: kylin Updated Branches: refs/heads/master 07f0c99f9 -> f9957f1be
KYLIN-2642 Relax check in RowKeyColDesc to keep backward compatibility Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/f9957f1b Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/f9957f1b Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/f9957f1b Branch: refs/heads/master Commit: f9957f1be3c2cb307974e3e9bd9592f1a1ee651f Parents: 07f0c99 Author: kangkaisen <[email protected]> Authored: Mon May 22 17:06:47 2017 +0800 Committer: kangkaisen <[email protected]> Committed: Fri Jun 9 17:31:22 2017 +0800 ---------------------------------------------------------------------- .../java/org/apache/kylin/cube/model/RowKeyColDesc.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/f9957f1b/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 b6f0a27..1c526bc 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 @@ -34,6 +34,8 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.base.Objects; import com.google.common.base.Preconditions; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @author yangli9 @@ -41,6 +43,7 @@ import com.google.common.base.Preconditions; */ @JsonAutoDetect(fieldVisibility = Visibility.NONE, getterVisibility = Visibility.NONE, isGetterVisibility = Visibility.NONE, setterVisibility = Visibility.NONE) public class RowKeyColDesc implements java.io.Serializable { + private static final Logger logger = LoggerFactory.getLogger(RowKeyColDesc.class); @JsonProperty("column") private String column; @@ -88,9 +91,9 @@ public class RowKeyColDesc implements java.io.Serializable { } encodingArgs = DateDimEnc.replaceEncodingArgs(encoding, encodingArgs, encodingName, type); - - if (encodingName.startsWith(FixedLenDimEnc.ENCODING_NAME) && (type.isIntegerFamily() || type.isNumberFamily())) - throw new IllegalArgumentException(colRef + " type is " + type + " and cannot apply fixed_length encoding"); + if (encodingName.startsWith(FixedLenDimEnc.ENCODING_NAME) && (type.isIntegerFamily() || type.isNumberFamily())) { + logger.warn(colRef + " type is " + type + " and cannot apply fixed_length encoding"); + } } public String getEncoding() {
