From dcefe1b6508c8e07f1b537078e913fa0f4cda97e Mon Sep 17 00:00:00 2001 From: kangkaisen Date: Mon, 22 May 2017 17:06:47 +0800 Subject: [PATCH] KYLIN-2642 Relax check in RowKeyColDesc to keep backward compatibility --- .../src/main/java/org/apache/kylin/cube/model/RowKeyColDesc.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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 b6f0a2766..1c526bcfb 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() { -- 2.11.0 (Apple Git-81)