You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by ma...@apache.org on 2015/08/06 11:18:41 UTC

incubator-kylin git commit: KYLIN-934 revert, going to fix this on 0.8 and backport

Repository: incubator-kylin
Updated Branches:
  refs/heads/0.7-staging e057e2210 -> 86ddd253c


KYLIN-934 revert, going to fix this on 0.8 and backport


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

Branch: refs/heads/0.7-staging
Commit: 86ddd253c4c46234d897b53cd4501b955092ea16
Parents: e057e22
Author: honma <ho...@ebay.com>
Authored: Thu Aug 6 17:19:14 2015 +0800
Committer: honma <ho...@ebay.com>
Committed: Thu Aug 6 17:19:14 2015 +0800

----------------------------------------------------------------------
 .../kylin/cube/CubeSizeEstimationCLITest.java   | 111 +++++
 .../kylin/cube/kv/RowValueDecoderTest.java      |   7 +-
 .../test_kylin_cube_with_slr_desc.json          | 384 +++++++---------
 ...test_kylin_cube_with_slr_left_join_desc.json | 384 +++++++---------
 .../test_kylin_cube_without_slr_desc.json       | 457 ++++++++-----------
 ...t_kylin_cube_without_slr_left_join_desc.json | 457 ++++++++-----------
 .../localmeta/data/data_gen_config.json         |  48 +-
 .../table/DEFAULT.TEST_KYLIN_FACT.json          |   2 +-
 .../java/org/apache/kylin/job/DataGenTest.java  |   1 +
 .../kylin/metadata/model/FunctionDesc.java      |   1 -
 10 files changed, 821 insertions(+), 1031 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/86ddd253/cube/src/test/java/org/apache/kylin/cube/CubeSizeEstimationCLITest.java
----------------------------------------------------------------------
diff --git a/cube/src/test/java/org/apache/kylin/cube/CubeSizeEstimationCLITest.java b/cube/src/test/java/org/apache/kylin/cube/CubeSizeEstimationCLITest.java
new file mode 100644
index 0000000..04eb9b1
--- /dev/null
+++ b/cube/src/test/java/org/apache/kylin/cube/CubeSizeEstimationCLITest.java
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+package org.apache.kylin.cube;
+
+import org.apache.kylin.common.util.LocalFileMetadataTestCase;
+import org.apache.kylin.cube.estimation.CubeSizeEstimationCLI;
+import org.apache.kylin.cube.model.CubeDesc;
+import org.apache.kylin.metadata.MetadataManager;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Created by honma on 9/1/14.
+ */
+public class CubeSizeEstimationCLITest extends LocalFileMetadataTestCase {
+
+    String cubeName = "test_kylin_cube_with_slr_ready";
+    long[] cardinality;
+    CubeDesc cubeDesc;
+
+    @Before
+    public void setUp() throws Exception {
+        this.createTestMetadata();
+        MetadataManager.clearCache();
+
+        String cubeName = "test_kylin_cube_with_slr_ready";
+        CubeManager cubeManager = CubeManager.getInstance(getTestConfig());
+        CubeInstance cubeInstance = cubeManager.getCube(cubeName);
+        cubeDesc = cubeInstance.getDescriptor();
+        cardinality = new long[] { 100, 100, 100, 10000, 1000, 100, 100, 100, 100 };
+
+    }
+
+    @After
+    public void after() throws Exception {
+        this.cleanupTestMetadata();
+    }
+
+    @Test
+    public void test() {
+        long[] x = new long[] { 5, 8, 5, 115, 122, 127, 137, 236, 101 };
+        CubeSizeEstimationCLI.estimatedCubeSize(cubeName, x);
+    }
+
+    @Test
+    public void baseCuboidTest() {
+        long cuboidID = getCuboidID(0, 1, 2, 3, 4, 5, 6, 7, 8);
+        long size = CubeSizeEstimationCLI.estimateCuboidSpace(cuboidID, cardinality, cubeDesc);
+
+        assert size == (10000000000000000L * (32 + 39));
+    }
+
+    @Test
+    public void cuboidTest1() {
+        long cuboidID = getCuboidID(0, 1, 2, 4, 5, 6, 7, 8);
+        long size = CubeSizeEstimationCLI.estimateCuboidSpace(cuboidID, cardinality, cubeDesc);
+
+        assert size == (1000000000000000L * (32 + 37));
+    }
+
+    @Test
+    public void cuboidTest2() {
+
+        long cuboidID = getCuboidID(0);
+        long size = CubeSizeEstimationCLI.estimateCuboidSpace(cuboidID, cardinality, cubeDesc);
+
+        assert size == (100L * (1 + 32));
+    }
+
+    @Test
+    public void cuboidTest3() {
+        long cuboidID = getCuboidID(4, 5);
+        long size = CubeSizeEstimationCLI.estimateCuboidSpace(cuboidID, cardinality, cubeDesc);
+
+        assert size == (1000L * (3 + 32));
+    }
+
+    @Test
+    public void cuboidTest4() {
+        long cuboidID = getCuboidID(4, 5, 6);
+        long size = CubeSizeEstimationCLI.estimateCuboidSpace(cuboidID, cardinality, cubeDesc);
+
+        assert size == (100000L * (4 + 32));
+    }
+
+    private long getCuboidID(int... bitIndice) {
+        long ret = 0;
+        long mask = 1L;
+        for (int index : bitIndice) {
+            ret |= mask << index;
+        }
+        return ret;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/86ddd253/cube/src/test/java/org/apache/kylin/cube/kv/RowValueDecoderTest.java
----------------------------------------------------------------------
diff --git a/cube/src/test/java/org/apache/kylin/cube/kv/RowValueDecoderTest.java b/cube/src/test/java/org/apache/kylin/cube/kv/RowValueDecoderTest.java
index 29bebbd..4e44d13 100644
--- a/cube/src/test/java/org/apache/kylin/cube/kv/RowValueDecoderTest.java
+++ b/cube/src/test/java/org/apache/kylin/cube/kv/RowValueDecoderTest.java
@@ -65,9 +65,8 @@ public class RowValueDecoderTest extends LocalFileMetadataTestCase {
         BigDecimal min = new BigDecimal("333.1111111");
         BigDecimal max = new BigDecimal("333.1999999");
         LongWritable count = new LongWritable(2);
-        LongWritable item_count = new LongWritable(99999);
         ByteBuffer buf = ByteBuffer.allocate(RowConstants.ROWVALUE_BUFFER_SIZE);
-        codec.encode(new Object[] { sum, min, max, count,item_count }, buf);
+        codec.encode(new Object[] { sum, min, max, count }, buf);
 
         buf.flip();
         byte[] valueBytes = new byte[buf.limit()];
@@ -84,8 +83,8 @@ public class RowValueDecoderTest extends LocalFileMetadataTestCase {
         List<String> measureNames = rowValueDecoder.getNames();
         Object[] measureValues = rowValueDecoder.getValues();
 
-        assertEquals("[PRICE, MIN_PRICE_, MAX_PRICE_, COUNT__, ITEM_COUNT]", measureNames.toString());
-        assertEquals("[333.1234567, 333.1111111, 333.1999999, 2, 99999]", Arrays.toString(measureValues));
+        assertEquals("[PRICE, MIN_PRICE_, MAX_PRICE_, COUNT__]", measureNames.toString());
+        assertEquals("[333.1234567, 333.1111111, 333.1999999, 2]", Arrays.toString(measureValues));
     }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/86ddd253/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_slr_desc.json
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_slr_desc.json b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_slr_desc.json
index 4a2a4dd..8d76496 100644
--- a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_slr_desc.json
+++ b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_slr_desc.json
@@ -1,241 +1,167 @@
 {
-  "uuid": "a24ca905-1fc6-4f67-985c-38fa5aeafd92",
-  "name": "test_kylin_cube_with_slr_desc",
-  "description": null,
-  "dimensions": [
-    {
-      "id": 0,
-      "name": "CAL_DT",
-      "table": "EDW.TEST_CAL_DT",
-      "column": null,
-      "derived": [
-        "WEEK_BEG_DT"
-      ],
-      "hierarchy": false
-    },
-    {
-      "id": 1,
-      "name": "CATEGORY",
-      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
-      "column": null,
-      "derived": [
-        "USER_DEFINED_FIELD1",
-        "USER_DEFINED_FIELD3",
-        "UPD_DATE",
-        "UPD_USER"
-      ],
-      "hierarchy": false
-    },
-    {
-      "id": 2,
-      "name": "CATEGORY_HIERARCHY",
-      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
-      "column": [
-        "META_CATEG_NAME",
-        "CATEG_LVL2_NAME",
-        "CATEG_LVL3_NAME"
-      ],
-      "derived": null,
-      "hierarchy": true
-    },
-    {
-      "id": 3,
-      "name": "LSTG_FORMAT_NAME",
-      "table": "DEFAULT.TEST_KYLIN_FACT",
-      "column": [
-        "LSTG_FORMAT_NAME"
-      ],
-      "derived": null,
-      "hierarchy": false
-    },
-    {
-      "id": 4,
-      "name": "SITE_ID",
-      "table": "EDW.TEST_SITES",
-      "column": null,
-      "derived": [
-        "SITE_NAME",
-        "CRE_USER"
-      ],
-      "hierarchy": false
-    },
-    {
-      "id": 5,
-      "name": "SELLER_TYPE_CD",
-      "table": "EDW.TEST_SELLER_TYPE_DIM",
-      "column": null,
-      "derived": [
-        "SELLER_TYPE_DESC"
-      ],
-      "hierarchy": false
-    },
-    {
-      "id": 6,
-      "name": "SELLER_ID",
-      "table": "DEFAULT.TEST_KYLIN_FACT",
-      "column": [
-        "SELLER_ID"
-      ],
-      "derived": null,
-      "hierarchy": false
-    }
-  ],
-  "measures": [
-    {
-      "id": 1,
-      "name": "GMV_SUM",
-      "function": {
-        "expression": "SUM",
-        "parameter": {
-          "type": "column",
-          "value": "PRICE"
-        },
-        "returntype": "decimal(19,4)"
+  "uuid" : "a24ca905-1fc6-4f67-985c-38fa5aeafd92",
+  "name" : "test_kylin_cube_with_slr_desc",
+  "description" : null,
+  "dimensions" : [ {
+    "id" : 0,
+    "name" : "CAL_DT",
+    "table" : "EDW.TEST_CAL_DT",
+    "column" : null,
+    "derived" : [ "WEEK_BEG_DT" ],
+    "hierarchy" : false
+  }, {
+    "id" : 1,
+    "name" : "CATEGORY",
+    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
+    "column" : null,
+    "derived" : [ "USER_DEFINED_FIELD1", "USER_DEFINED_FIELD3", "UPD_DATE", "UPD_USER" ],
+    "hierarchy" : false
+  }, {
+    "id" : 2,
+    "name" : "CATEGORY_HIERARCHY",
+    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
+    "column" : [ "META_CATEG_NAME", "CATEG_LVL2_NAME", "CATEG_LVL3_NAME" ],
+    "derived" : null,
+    "hierarchy" : true
+  }, {
+    "id" : 3,
+    "name" : "LSTG_FORMAT_NAME",
+    "table" : "DEFAULT.TEST_KYLIN_FACT",
+    "column" : [ "LSTG_FORMAT_NAME" ],
+    "derived" : null,
+    "hierarchy" : false
+  }, {
+    "id" : 4,
+    "name" : "SITE_ID",
+    "table" : "EDW.TEST_SITES",
+    "column" : null,
+    "derived" : [ "SITE_NAME", "CRE_USER" ],
+    "hierarchy" : false
+  }, {
+    "id" : 5,
+    "name" : "SELLER_TYPE_CD",
+    "table" : "EDW.TEST_SELLER_TYPE_DIM",
+    "column" : null,
+    "derived" : [ "SELLER_TYPE_DESC" ],
+    "hierarchy" : false
+  }, {
+    "id" : 6,
+    "name" : "SELLER_ID",
+    "table" : "DEFAULT.TEST_KYLIN_FACT",
+    "column" : [ "SELLER_ID" ],
+    "derived" : null,
+    "hierarchy" : false
+  } ],
+  "measures" : [ {
+    "id" : 1,
+    "name" : "GMV_SUM",
+    "function" : {
+      "expression" : "SUM",
+      "parameter" : {
+        "type" : "column",
+        "value" : "PRICE"
       },
-      "dependent_measure_ref": null
+      "returntype" : "decimal(19,4)"
     },
-    {
-      "id": 2,
-      "name": "GMV_MIN",
-      "function": {
-        "expression": "MIN",
-        "parameter": {
-          "type": "column",
-          "value": "PRICE"
-        },
-        "returntype": "decimal(19,4)"
+    "dependent_measure_ref" : null
+  }, {
+    "id" : 2,
+    "name" : "GMV_MIN",
+    "function" : {
+      "expression" : "MIN",
+      "parameter" : {
+        "type" : "column",
+        "value" : "PRICE"
       },
-      "dependent_measure_ref": null
+      "returntype" : "decimal(19,4)"
     },
-    {
-      "id": 3,
-      "name": "GMV_MAX",
-      "function": {
-        "expression": "MAX",
-        "parameter": {
-          "type": "column",
-          "value": "PRICE"
-        },
-        "returntype": "decimal(19,4)"
+    "dependent_measure_ref" : null
+  }, {
+    "id" : 3,
+    "name" : "GMV_MAX",
+    "function" : {
+      "expression" : "MAX",
+      "parameter" : {
+        "type" : "column",
+        "value" : "PRICE"
       },
-      "dependent_measure_ref": null
+      "returntype" : "decimal(19,4)"
     },
-    {
-      "id": 4,
-      "name": "TRANS_CNT",
-      "function": {
-        "expression": "COUNT",
-        "parameter": {
-          "type": "constant",
-          "value": "1"
-        },
-        "returntype": "bigint"
+    "dependent_measure_ref" : null
+  }, {
+    "id" : 4,
+    "name" : "TRANS_CNT",
+    "function" : {
+      "expression" : "COUNT",
+      "parameter" : {
+        "type" : "constant",
+        "value" : "1"
       },
-      "dependent_measure_ref": null
+      "returntype" : "bigint"
     },
-    {
-      "id": 5,
-      "name": "ITEM_COUNT_SUM",
-      "function": {
-        "expression": "SUM",
-        "parameter": {
-          "type": "column",
-          "value": "ITEM_COUNT"
-        },
-        "returntype": "bigint"
-      },
-      "dependent_measure_ref": null
-    }
-  ],
-  "rowkey": {
-    "rowkey_columns": [
-      {
-        "column": "seller_id",
-        "length": 18,
-        "dictionary": null,
-        "mandatory": true
-      },
-      {
-        "column": "cal_dt",
-        "length": 0,
-        "dictionary": "true",
-        "mandatory": false
-      },
-      {
-        "column": "leaf_categ_id",
-        "length": 0,
-        "dictionary": "true",
-        "mandatory": false
-      },
-      {
-        "column": "meta_categ_name",
-        "length": 0,
-        "dictionary": "true",
-        "mandatory": false
-      },
-      {
-        "column": "categ_lvl2_name",
-        "length": 0,
-        "dictionary": "true",
-        "mandatory": false
-      },
-      {
-        "column": "categ_lvl3_name",
-        "length": 0,
-        "dictionary": "true",
-        "mandatory": false
-      },
-      {
-        "column": "lstg_format_name",
-        "length": 12,
-        "dictionary": null,
-        "mandatory": false
-      },
-      {
-        "column": "lstg_site_id",
-        "length": 0,
-        "dictionary": "true",
-        "mandatory": false
-      },
-      {
-        "column": "slr_segment_cd",
-        "length": 0,
-        "dictionary": "true",
-        "mandatory": false
-      }
-    ],
-    "aggregation_groups": [
-      [
-        "leaf_categ_id",
-        "meta_categ_name",
-        "categ_lvl2_name",
-        "categ_lvl3_name",
-        "cal_dt"
-      ]
-    ]
+    "dependent_measure_ref" : null
+  } ],
+  "rowkey" : {
+    "rowkey_columns" : [ {
+      "column" : "seller_id",
+      "length" : 18,
+      "dictionary" : null,
+      "mandatory" : true
+    }, {
+      "column" : "cal_dt",
+      "length" : 0,
+      "dictionary" : "true",
+      "mandatory" : false
+    }, {
+      "column" : "leaf_categ_id",
+      "length" : 0,
+      "dictionary" : "true",
+      "mandatory" : false
+    }, {
+      "column" : "meta_categ_name",
+      "length" : 0,
+      "dictionary" : "true",
+      "mandatory" : false
+    }, {
+      "column" : "categ_lvl2_name",
+      "length" : 0,
+      "dictionary" : "true",
+      "mandatory" : false
+    }, {
+      "column" : "categ_lvl3_name",
+      "length" : 0,
+      "dictionary" : "true",
+      "mandatory" : false
+    }, {
+      "column" : "lstg_format_name",
+      "length" : 12,
+      "dictionary" : null,
+      "mandatory" : false
+    }, {
+      "column" : "lstg_site_id",
+      "length" : 0,
+      "dictionary" : "true",
+      "mandatory" : false
+    }, {
+      "column" : "slr_segment_cd",
+      "length" : 0,
+      "dictionary" : "true",
+      "mandatory" : false
+    } ],
+    "aggregation_groups" : [ [ "leaf_categ_id", "meta_categ_name", "categ_lvl2_name", "categ_lvl3_name", "cal_dt" ] ]
   },
-  "signature": "lsLAl2jL62ZApmOLZqWU3g==",
-  "last_modified": 1422435345330,
-  "model_name": "test_kylin_with_slr_model_desc",
-  "null_string": null,
-  "hbase_mapping": {
-    "column_family": [
-      {
-        "name": "f1",
-        "columns": [
-          {
-            "qualifier": "m",
-            "measure_refs": [
-              "gmv_sum",
-              "gmv_min",
-              "gmv_max",
-              "trans_cnt",
-              "item_count_sum"
-            ]
-          }
-        ]
-      }
-    ]
+  "signature" : "lsLAl2jL62ZApmOLZqWU3g==",
+  "last_modified" : 1422435345330,
+  "model_name" : "test_kylin_with_slr_model_desc",
+  "null_string" : null,
+  "hbase_mapping" : {
+    "column_family" : [ {
+      "name" : "f1",
+      "columns" : [ {
+        "qualifier" : "m",
+        "measure_refs" : [ "gmv_sum", "gmv_min", "gmv_max", "trans_cnt" ]
+      } ]
+    } ]
   },
-  "notify_list": null
+  "notify_list" : null
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/86ddd253/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_slr_left_join_desc.json
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_slr_left_join_desc.json b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_slr_left_join_desc.json
index 8e6b2ff..b59193e 100644
--- a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_slr_left_join_desc.json
+++ b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_slr_left_join_desc.json
@@ -1,241 +1,167 @@
 {
-  "uuid": "bbbba905-1fc6-4f67-985c-38fa5aeafd92",
-  "name": "test_kylin_cube_with_slr_left_join_desc",
-  "description": null,
-  "dimensions": [
-    {
-      "id": 0,
-      "name": "CAL_DT",
-      "table": "EDW.TEST_CAL_DT",
-      "column": null,
-      "derived": [
-        "WEEK_BEG_DT"
-      ],
-      "hierarchy": false
-    },
-    {
-      "id": 1,
-      "name": "CATEGORY",
-      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
-      "column": [
-        "META_CATEG_NAME",
-        "CATEG_LVL2_NAME",
-        "CATEG_LVL3_NAME"
-      ],
-      "derived": null,
-      "hierarchy": true
-    },
-    {
-      "id": 2,
-      "name": "CATEGORY_DERIVED",
-      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
-      "column": null,
-      "derived": [
-        "USER_DEFINED_FIELD1",
-        "USER_DEFINED_FIELD3",
-        "UPD_DATE",
-        "UPD_USER"
-      ],
-      "hierarchy": false
-    },
-    {
-      "id": 3,
-      "name": "LSTG_FORMAT_NAME",
-      "table": "DEFAULT.TEST_KYLIN_FACT",
-      "column": [
-        "LSTG_FORMAT_NAME"
-      ],
-      "derived": null,
-      "hierarchy": false
-    },
-    {
-      "id": 4,
-      "name": "SITE_ID",
-      "table": "EDW.TEST_SITES",
-      "column": null,
-      "derived": [
-        "SITE_NAME",
-        "CRE_USER"
-      ],
-      "hierarchy": false
-    },
-    {
-      "id": 5,
-      "name": "SELLER_TYPE_CD",
-      "table": "EDW.TEST_SELLER_TYPE_DIM",
-      "column": null,
-      "derived": [
-        "SELLER_TYPE_DESC"
-      ],
-      "hierarchy": false
-    },
-    {
-      "id": 6,
-      "name": "SELLER_ID",
-      "table": "DEFAULT.TEST_KYLIN_FACT",
-      "column": [
-        "SELLER_ID"
-      ],
-      "derived": null,
-      "hierarchy": false
-    }
-  ],
-  "measures": [
-    {
-      "id": 1,
-      "name": "GMV_SUM",
-      "function": {
-        "expression": "SUM",
-        "parameter": {
-          "type": "column",
-          "value": "PRICE"
-        },
-        "returntype": "decimal(19,4)"
+  "uuid" : "bbbba905-1fc6-4f67-985c-38fa5aeafd92",
+  "name" : "test_kylin_cube_with_slr_left_join_desc",
+  "description" : null,
+  "dimensions" : [ {
+    "id" : 0,
+    "name" : "CAL_DT",
+    "table" : "EDW.TEST_CAL_DT",
+    "column" : null,
+    "derived" : [ "WEEK_BEG_DT" ],
+    "hierarchy" : false
+  }, {
+    "id" : 1,
+    "name" : "CATEGORY",
+    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
+    "column" : [ "META_CATEG_NAME", "CATEG_LVL2_NAME", "CATEG_LVL3_NAME" ],
+    "derived" : null,
+    "hierarchy" : true
+  }, {
+    "id" : 2,
+    "name" : "CATEGORY_DERIVED",
+    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
+    "column" : null,
+    "derived" : [ "USER_DEFINED_FIELD1", "USER_DEFINED_FIELD3", "UPD_DATE", "UPD_USER" ],
+    "hierarchy" : false
+  }, {
+    "id" : 3,
+    "name" : "LSTG_FORMAT_NAME",
+    "table" : "DEFAULT.TEST_KYLIN_FACT",
+    "column" : [ "LSTG_FORMAT_NAME" ],
+    "derived" : null,
+    "hierarchy" : false
+  }, {
+    "id" : 4,
+    "name" : "SITE_ID",
+    "table" : "EDW.TEST_SITES",
+    "column" : null,
+    "derived" : [ "SITE_NAME", "CRE_USER" ],
+    "hierarchy" : false
+  }, {
+    "id" : 5,
+    "name" : "SELLER_TYPE_CD",
+    "table" : "EDW.TEST_SELLER_TYPE_DIM",
+    "column" : null,
+    "derived" : [ "SELLER_TYPE_DESC" ],
+    "hierarchy" : false
+  }, {
+    "id" : 6,
+    "name" : "SELLER_ID",
+    "table" : "DEFAULT.TEST_KYLIN_FACT",
+    "column" : [ "SELLER_ID" ],
+    "derived" : null,
+    "hierarchy" : false
+  } ],
+  "measures" : [ {
+    "id" : 1,
+    "name" : "GMV_SUM",
+    "function" : {
+      "expression" : "SUM",
+      "parameter" : {
+        "type" : "column",
+        "value" : "PRICE"
       },
-      "dependent_measure_ref": null
+      "returntype" : "decimal(19,4)"
     },
-    {
-      "id": 2,
-      "name": "GMV_MIN",
-      "function": {
-        "expression": "MIN",
-        "parameter": {
-          "type": "column",
-          "value": "PRICE"
-        },
-        "returntype": "decimal(19,4)"
+    "dependent_measure_ref" : null
+  }, {
+    "id" : 2,
+    "name" : "GMV_MIN",
+    "function" : {
+      "expression" : "MIN",
+      "parameter" : {
+        "type" : "column",
+        "value" : "PRICE"
       },
-      "dependent_measure_ref": null
+      "returntype" : "decimal(19,4)"
     },
-    {
-      "id": 3,
-      "name": "GMV_MAX",
-      "function": {
-        "expression": "MAX",
-        "parameter": {
-          "type": "column",
-          "value": "PRICE"
-        },
-        "returntype": "decimal(19,4)"
+    "dependent_measure_ref" : null
+  }, {
+    "id" : 3,
+    "name" : "GMV_MAX",
+    "function" : {
+      "expression" : "MAX",
+      "parameter" : {
+        "type" : "column",
+        "value" : "PRICE"
       },
-      "dependent_measure_ref": null
+      "returntype" : "decimal(19,4)"
     },
-    {
-      "id": 4,
-      "name": "TRANS_CNT",
-      "function": {
-        "expression": "COUNT",
-        "parameter": {
-          "type": "constant",
-          "value": "1"
-        },
-        "returntype": "bigint"
+    "dependent_measure_ref" : null
+  }, {
+    "id" : 4,
+    "name" : "TRANS_CNT",
+    "function" : {
+      "expression" : "COUNT",
+      "parameter" : {
+        "type" : "constant",
+        "value" : "1"
       },
-      "dependent_measure_ref": null
+      "returntype" : "bigint"
     },
-    {
-      "id": 5,
-      "name": "ITEM_COUNT_SUM",
-      "function": {
-        "expression": "SUM",
-        "parameter": {
-          "type": "column",
-          "value": "ITEM_COUNT"
-        },
-        "returntype": "bigint"
-      },
-      "dependent_measure_ref": null
-    }
-  ],
-  "rowkey": {
-    "rowkey_columns": [
-      {
-        "column": "seller_id",
-        "length": 18,
-        "dictionary": null,
-        "mandatory": true
-      },
-      {
-        "column": "cal_dt",
-        "length": 0,
-        "dictionary": "true",
-        "mandatory": false
-      },
-      {
-        "column": "leaf_categ_id",
-        "length": 0,
-        "dictionary": "true",
-        "mandatory": false
-      },
-      {
-        "column": "meta_categ_name",
-        "length": 0,
-        "dictionary": "true",
-        "mandatory": false
-      },
-      {
-        "column": "categ_lvl2_name",
-        "length": 0,
-        "dictionary": "true",
-        "mandatory": false
-      },
-      {
-        "column": "categ_lvl3_name",
-        "length": 0,
-        "dictionary": "true",
-        "mandatory": false
-      },
-      {
-        "column": "lstg_format_name",
-        "length": 12,
-        "dictionary": null,
-        "mandatory": false
-      },
-      {
-        "column": "lstg_site_id",
-        "length": 0,
-        "dictionary": "true",
-        "mandatory": false
-      },
-      {
-        "column": "slr_segment_cd",
-        "length": 0,
-        "dictionary": "true",
-        "mandatory": false
-      }
-    ],
-    "aggregation_groups": [
-      [
-        "leaf_categ_id",
-        "meta_categ_name",
-        "categ_lvl2_name",
-        "categ_lvl3_name",
-        "cal_dt"
-      ]
-    ]
+    "dependent_measure_ref" : null
+  } ],
+  "rowkey" : {
+    "rowkey_columns" : [ {
+      "column" : "seller_id",
+      "length" : 18,
+      "dictionary" : null,
+      "mandatory" : true
+    }, {
+      "column" : "cal_dt",
+      "length" : 0,
+      "dictionary" : "true",
+      "mandatory" : false
+    }, {
+      "column" : "leaf_categ_id",
+      "length" : 0,
+      "dictionary" : "true",
+      "mandatory" : false
+    }, {
+      "column" : "meta_categ_name",
+      "length" : 0,
+      "dictionary" : "true",
+      "mandatory" : false
+    }, {
+      "column" : "categ_lvl2_name",
+      "length" : 0,
+      "dictionary" : "true",
+      "mandatory" : false
+    }, {
+      "column" : "categ_lvl3_name",
+      "length" : 0,
+      "dictionary" : "true",
+      "mandatory" : false
+    }, {
+      "column" : "lstg_format_name",
+      "length" : 12,
+      "dictionary" : null,
+      "mandatory" : false
+    }, {
+      "column" : "lstg_site_id",
+      "length" : 0,
+      "dictionary" : "true",
+      "mandatory" : false
+    }, {
+      "column" : "slr_segment_cd",
+      "length" : 0,
+      "dictionary" : "true",
+      "mandatory" : false
+    } ],
+    "aggregation_groups" : [ [ "leaf_categ_id", "meta_categ_name", "categ_lvl2_name", "categ_lvl3_name", "cal_dt" ] ]
   },
-  "signature": "ljba0vaTnt00lU4rdhG9Xw==",
-  "last_modified": 1422435345352,
-  "model_name": "test_kylin_with_slr_left_join_model_desc",
-  "null_string": null,
-  "hbase_mapping": {
-    "column_family": [
-      {
-        "name": "f1",
-        "columns": [
-          {
-            "qualifier": "m",
-            "measure_refs": [
-              "gmv_sum",
-              "gmv_min",
-              "gmv_max",
-              "trans_cnt",
-              "item_count_sum"
-            ]
-          }
-        ]
-      }
-    ]
+  "signature" : "ljba0vaTnt00lU4rdhG9Xw==",
+  "last_modified" : 1422435345352,
+  "model_name" : "test_kylin_with_slr_left_join_model_desc",
+  "null_string" : null,
+  "hbase_mapping" : {
+    "column_family" : [ {
+      "name" : "f1",
+      "columns" : [ {
+        "qualifier" : "m",
+        "measure_refs" : [ "gmv_sum", "gmv_min", "gmv_max", "trans_cnt" ]
+      } ]
+    } ]
   },
-  "notify_list": null
+  "notify_list" : null
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/86ddd253/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_desc.json
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_desc.json b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_desc.json
index 485170b..cc40bb7 100644
--- a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_desc.json
+++ b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_desc.json
@@ -1,282 +1,197 @@
 {
-  "uuid": "9ac9b7a8-3929-4dff-b59d-2100aadc8dbf",
-  "name": "test_kylin_cube_without_slr_desc",
-  "description": null,
-  "dimensions": [
-    {
-      "id": 0,
-      "name": "CAL_DT",
-      "table": "EDW.TEST_CAL_DT",
-      "column": null,
-      "derived": [
-        "WEEK_BEG_DT"
-      ],
-      "hierarchy": false
+  "uuid" : "9ac9b7a8-3929-4dff-b59d-2100aadc8dbf",
+  "name" : "test_kylin_cube_without_slr_desc",
+  "description" : null,
+  "dimensions" : [ {
+    "id" : 0,
+    "name" : "CAL_DT",
+    "table" : "EDW.TEST_CAL_DT",
+    "column" : null,
+    "derived" : [ "WEEK_BEG_DT" ],
+    "hierarchy" : false
+  }, {
+    "id" : 1,
+    "name" : "CATEGORY",
+    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
+    "column" : null,
+    "derived" : [ "USER_DEFINED_FIELD1", "USER_DEFINED_FIELD3", "UPD_DATE", "UPD_USER" ],
+    "hierarchy" : false
+  }, {
+    "id" : 2,
+    "name" : "CATEGORY_HIERARCHY",
+    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
+    "column" : [ "META_CATEG_NAME", "CATEG_LVL2_NAME", "CATEG_LVL3_NAME" ],
+    "derived" : null,
+    "hierarchy" : true
+  }, {
+    "id" : 3,
+    "name" : "LSTG_FORMAT_NAME",
+    "table" : "DEFAULT.TEST_KYLIN_FACT",
+    "column" : [ "LSTG_FORMAT_NAME" ],
+    "derived" : null,
+    "hierarchy" : false
+  }, {
+    "id" : 4,
+    "name" : "SITE_ID",
+    "table" : "EDW.TEST_SITES",
+    "column" : null,
+    "derived" : [ "SITE_NAME", "CRE_USER" ],
+    "hierarchy" : false
+  }, {
+    "id" : 5,
+    "name" : "SELLER_TYPE_CD",
+    "table" : "EDW.TEST_SELLER_TYPE_DIM",
+    "column" : null,
+    "derived" : [ "SELLER_TYPE_DESC" ],
+    "hierarchy" : false
+  } ],
+  "measures" : [ {
+    "id" : 1,
+    "name" : "GMV_SUM",
+    "function" : {
+      "expression" : "SUM",
+      "parameter" : {
+        "type" : "column",
+        "value" : "PRICE"
+      },
+      "returntype" : "decimal(19,4)"
     },
-    {
-      "id": 1,
-      "name": "CATEGORY",
-      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
-      "column": null,
-      "derived": [
-        "USER_DEFINED_FIELD1",
-        "USER_DEFINED_FIELD3",
-        "UPD_DATE",
-        "UPD_USER"
-      ],
-      "hierarchy": false
+    "dependent_measure_ref" : null
+  }, {
+    "id" : 2,
+    "name" : "GMV_MIN",
+    "function" : {
+      "expression" : "MIN",
+      "parameter" : {
+        "type" : "column",
+        "value" : "PRICE"
+      },
+      "returntype" : "decimal(19,4)"
     },
-    {
-      "id": 2,
-      "name": "CATEGORY_HIERARCHY",
-      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
-      "column": [
-        "META_CATEG_NAME",
-        "CATEG_LVL2_NAME",
-        "CATEG_LVL3_NAME"
-      ],
-      "derived": null,
-      "hierarchy": true
+    "dependent_measure_ref" : null
+  }, {
+    "id" : 3,
+    "name" : "GMV_MAX",
+    "function" : {
+      "expression" : "MAX",
+      "parameter" : {
+        "type" : "column",
+        "value" : "PRICE"
+      },
+      "returntype" : "decimal(19,4)"
     },
-    {
-      "id": 3,
-      "name": "LSTG_FORMAT_NAME",
-      "table": "DEFAULT.TEST_KYLIN_FACT",
-      "column": [
-        "LSTG_FORMAT_NAME"
-      ],
-      "derived": null,
-      "hierarchy": false
+    "dependent_measure_ref" : null
+  }, {
+    "id" : 4,
+    "name" : "TRANS_CNT",
+    "function" : {
+      "expression" : "COUNT",
+      "parameter" : {
+        "type" : "constant",
+        "value" : "1"
+      },
+      "returntype" : "bigint"
     },
-    {
-      "id": 4,
-      "name": "SITE_ID",
-      "table": "EDW.TEST_SITES",
-      "column": null,
-      "derived": [
-        "SITE_NAME",
-        "CRE_USER"
-      ],
-      "hierarchy": false
+    "dependent_measure_ref" : null
+  }, {
+    "id" : 5,
+    "name" : "SELLER_CNT_HLL",
+    "function" : {
+      "expression" : "COUNT_DISTINCT",
+      "parameter" : {
+        "type" : "column",
+        "value" : "SELLER_ID"
+      },
+      "returntype" : "hllc(10)"
     },
-    {
-      "id": 5,
-      "name": "SELLER_TYPE_CD",
-      "table": "EDW.TEST_SELLER_TYPE_DIM",
-      "column": null,
-      "derived": [
-        "SELLER_TYPE_DESC"
-      ],
-      "hierarchy": false
-    }
-  ],
-  "measures": [
-    {
-      "id": 1,
-      "name": "GMV_SUM",
-      "function": {
-        "expression": "SUM",
-        "parameter": {
-          "type": "column",
-          "value": "PRICE"
-        },
-        "returntype": "decimal(19,4)"
-      },
-      "dependent_measure_ref": null
-    },
-    {
-      "id": 2,
-      "name": "GMV_MIN",
-      "function": {
-        "expression": "MIN",
-        "parameter": {
-          "type": "column",
-          "value": "PRICE"
-        },
-        "returntype": "decimal(19,4)"
-      },
-      "dependent_measure_ref": null
+    "dependent_measure_ref" : null
+  }, {
+    "id" : 6,
+    "name" : "SELLER_CNT_LONG",
+    "function" : {
+      "expression" : "COUNT_DISTINCT",
+      "parameter" : {
+        "type" : "column",
+        "value" : "SELLER_ID"
+      },
+      "returntype" : "bigint"
     },
-    {
-      "id": 3,
-      "name": "GMV_MAX",
-      "function": {
-        "expression": "MAX",
-        "parameter": {
-          "type": "column",
-          "value": "PRICE"
-        },
-        "returntype": "decimal(19,4)"
-      },
-      "dependent_measure_ref": null
-    },
-    {
-      "id": 4,
-      "name": "TRANS_CNT",
-      "function": {
-        "expression": "COUNT",
-        "parameter": {
-          "type": "constant",
-          "value": "1"
-        },
-        "returntype": "bigint"
-      },
-      "dependent_measure_ref": null
+    "dependent_measure_ref" : "SELLER_CNT_HLL"
+  }, {
+    "id" : 7,
+    "name" : "SELLER_FORMAT_CNT",
+    "function" : {
+      "expression" : "COUNT_DISTINCT",
+      "parameter" : {
+        "type" : "column",
+        "value" : "LSTG_FORMAT_NAME,SELLER_ID"
+      },
+      "returntype" : "hllc(10)"
     },
-    {
-      "id": 5,
-      "name": "ITEM_COUNT_SUM",
-      "function": {
-        "expression": "SUM",
-        "parameter": {
-          "type": "column",
-          "value": "ITEM_COUNT"
-        },
-        "returntype": "bigint"
-      },
-      "dependent_measure_ref": null
-    },
-    {
-      "id": 6,
-      "name": "SELLER_CNT_HLL",
-      "function": {
-        "expression": "COUNT_DISTINCT",
-        "parameter": {
-          "type": "column",
-          "value": "SELLER_ID"
-        },
-        "returntype": "hllc(10)"
-      },
-      "dependent_measure_ref": null
-    },
-    {
-      "id": 7,
-      "name": "SELLER_CNT_LONG",
-      "function": {
-        "expression": "COUNT_DISTINCT",
-        "parameter": {
-          "type": "column",
-          "value": "SELLER_ID"
-        },
-        "returntype": "bigint"
-      },
-      "dependent_measure_ref": "SELLER_CNT_HLL"
-    },
-    {
-      "id": 8,
-      "name": "SELLER_FORMAT_CNT",
-      "function": {
-        "expression": "COUNT_DISTINCT",
-        "parameter": {
-          "type": "column",
-          "value": "LSTG_FORMAT_NAME,SELLER_ID"
-        },
-        "returntype": "hllc(10)"
-      },
-      "dependent_measure_ref": null
-    }
-  ],
-  "rowkey": {
-    "rowkey_columns": [
-      {
-        "column": "cal_dt",
-        "length": 0,
-        "dictionary": "true",
-        "mandatory": true
-      },
-      {
-        "column": "leaf_categ_id",
-        "length": 0,
-        "dictionary": "true",
-        "mandatory": false
-      },
-      {
-        "column": "meta_categ_name",
-        "length": 0,
-        "dictionary": "true",
-        "mandatory": false
-      },
-      {
-        "column": "categ_lvl2_name",
-        "length": 0,
-        "dictionary": "true",
-        "mandatory": false
-      },
-      {
-        "column": "categ_lvl3_name",
-        "length": 0,
-        "dictionary": "true",
-        "mandatory": false
-      },
-      {
-        "column": "lstg_format_name",
-        "length": 12,
-        "dictionary": null,
-        "mandatory": false
-      },
-      {
-        "column": "lstg_site_id",
-        "length": 0,
-        "dictionary": "true",
-        "mandatory": false
-      },
-      {
-        "column": "slr_segment_cd",
-        "length": 0,
-        "dictionary": "true",
-        "mandatory": false
-      }
-    ],
-    "aggregation_groups": [
-      [
-        "lstg_format_name",
-        "lstg_site_id",
-        "slr_segment_cd"
-      ],
-      [
-        "leaf_categ_id",
-        "meta_categ_name",
-        "categ_lvl3_name",
-        "categ_lvl2_name",
-        "lstg_format_name"
-      ]
-    ]
+    "dependent_measure_ref" : null
+  } ],
+  "rowkey" : {
+    "rowkey_columns" : [ {
+      "column" : "cal_dt",
+      "length" : 0,
+      "dictionary" : "true",
+      "mandatory" : true
+    }, {
+      "column" : "leaf_categ_id",
+      "length" : 0,
+      "dictionary" : "true",
+      "mandatory" : false
+    }, {
+      "column" : "meta_categ_name",
+      "length" : 0,
+      "dictionary" : "true",
+      "mandatory" : false
+    }, {
+      "column" : "categ_lvl2_name",
+      "length" : 0,
+      "dictionary" : "true",
+      "mandatory" : false
+    }, {
+      "column" : "categ_lvl3_name",
+      "length" : 0,
+      "dictionary" : "true",
+      "mandatory" : false
+    }, {
+      "column" : "lstg_format_name",
+      "length" : 12,
+      "dictionary" : null,
+      "mandatory" : false
+    }, {
+      "column" : "lstg_site_id",
+      "length" : 0,
+      "dictionary" : "true",
+      "mandatory" : false
+    }, {
+      "column" : "slr_segment_cd",
+      "length" : 0,
+      "dictionary" : "true",
+      "mandatory" : false
+    } ],
+    "aggregation_groups" : [ [ "lstg_format_name", "lstg_site_id", "slr_segment_cd" ], [ "leaf_categ_id", "meta_categ_name", "categ_lvl3_name", "categ_lvl2_name", "lstg_format_name" ] ]
   },
-  "signature": "7qJiv2MEGoGf1AAgksQmZw==",
-  "last_modified": 1422435345362,
-  "model_name": "test_kylin_without_slr_model_desc",
-  "null_string": null,
-  "hbase_mapping": {
-    "column_family": [
-      {
-        "name": "f1",
-        "columns": [
-          {
-            "qualifier": "m",
-            "measure_refs": [
-              "gmv_sum",
-              "gmv_min",
-              "gmv_max",
-              "trans_cnt",
-              "item_count_sum",
-              "seller_cnt_long"
-            ]
-          }
-        ]
-      },
-      {
-        "name": "f2",
-        "columns": [
-          {
-            "qualifier": "m",
-            "measure_refs": [
-              "seller_cnt_hll",
-              "seller_format_cnt"
-            ]
-          }
-        ]
-      }
-    ]
+  "signature" : "7qJiv2MEGoGf1AAgksQmZw==",
+  "last_modified" : 1422435345362,
+  "model_name" : "test_kylin_without_slr_model_desc",
+  "null_string" : null,
+  "hbase_mapping" : {
+    "column_family" : [ {
+      "name" : "f1",
+      "columns" : [ {
+        "qualifier" : "m",
+        "measure_refs" : [ "gmv_sum", "gmv_min", "gmv_max", "trans_cnt", "seller_cnt_long" ]
+      } ]
+    }, {
+      "name" : "f2",
+      "columns" : [ {
+        "qualifier" : "m",
+        "measure_refs" : [ "seller_cnt_hll", "seller_format_cnt" ]
+      } ]
+    } ]
   },
-  "notify_list": null
+  "notify_list" : null
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/86ddd253/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json
index c6bd12f..d677568 100644
--- a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json
+++ b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json
@@ -1,282 +1,197 @@
 {
-  "uuid": "9ac9b7a8-3929-4dff-b59d-2100aadc8dbf",
-  "name": "test_kylin_cube_without_slr_left_join_desc",
-  "description": null,
-  "dimensions": [
-    {
-      "id": 0,
-      "name": "CAL_DT",
-      "table": "EDW.TEST_CAL_DT",
-      "column": null,
-      "derived": [
-        "WEEK_BEG_DT"
-      ],
-      "hierarchy": false
+  "uuid" : "9ac9b7a8-3929-4dff-b59d-2100aadc8dbf",
+  "name" : "test_kylin_cube_without_slr_left_join_desc",
+  "description" : null,
+  "dimensions" : [ {
+    "id" : 0,
+    "name" : "CAL_DT",
+    "table" : "EDW.TEST_CAL_DT",
+    "column" : null,
+    "derived" : [ "WEEK_BEG_DT" ],
+    "hierarchy" : false
+  }, {
+    "id" : 1,
+    "name" : "CATEGORY",
+    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
+    "column" : null,
+    "derived" : [ "USER_DEFINED_FIELD1", "USER_DEFINED_FIELD3", "UPD_DATE", "UPD_USER" ],
+    "hierarchy" : false
+  }, {
+    "id" : 2,
+    "name" : "CATEGORY_HIERARCHY",
+    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
+    "column" : [ "META_CATEG_NAME", "CATEG_LVL2_NAME", "CATEG_LVL3_NAME" ],
+    "derived" : null,
+    "hierarchy" : true
+  }, {
+    "id" : 3,
+    "name" : "LSTG_FORMAT_NAME",
+    "table" : "DEFAULT.TEST_KYLIN_FACT",
+    "column" : [ "LSTG_FORMAT_NAME" ],
+    "derived" : null,
+    "hierarchy" : false
+  }, {
+    "id" : 4,
+    "name" : "SITE_ID",
+    "table" : "EDW.TEST_SITES",
+    "column" : null,
+    "derived" : [ "SITE_NAME", "CRE_USER" ],
+    "hierarchy" : false
+  }, {
+    "id" : 5,
+    "name" : "SELLER_TYPE_CD",
+    "table" : "EDW.TEST_SELLER_TYPE_DIM",
+    "column" : null,
+    "derived" : [ "SELLER_TYPE_DESC" ],
+    "hierarchy" : false
+  } ],
+  "measures" : [ {
+    "id" : 1,
+    "name" : "GMV_SUM",
+    "function" : {
+      "expression" : "SUM",
+      "parameter" : {
+        "type" : "column",
+        "value" : "PRICE"
+      },
+      "returntype" : "decimal(19,4)"
     },
-    {
-      "id": 1,
-      "name": "CATEGORY",
-      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
-      "column": null,
-      "derived": [
-        "USER_DEFINED_FIELD1",
-        "USER_DEFINED_FIELD3",
-        "UPD_DATE",
-        "UPD_USER"
-      ],
-      "hierarchy": false
+    "dependent_measure_ref" : null
+  }, {
+    "id" : 2,
+    "name" : "GMV_MIN",
+    "function" : {
+      "expression" : "MIN",
+      "parameter" : {
+        "type" : "column",
+        "value" : "PRICE"
+      },
+      "returntype" : "decimal(19,4)"
     },
-    {
-      "id": 2,
-      "name": "CATEGORY_HIERARCHY",
-      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
-      "column": [
-        "META_CATEG_NAME",
-        "CATEG_LVL2_NAME",
-        "CATEG_LVL3_NAME"
-      ],
-      "derived": null,
-      "hierarchy": true
+    "dependent_measure_ref" : null
+  }, {
+    "id" : 3,
+    "name" : "GMV_MAX",
+    "function" : {
+      "expression" : "MAX",
+      "parameter" : {
+        "type" : "column",
+        "value" : "PRICE"
+      },
+      "returntype" : "decimal(19,4)"
     },
-    {
-      "id": 3,
-      "name": "LSTG_FORMAT_NAME",
-      "table": "DEFAULT.TEST_KYLIN_FACT",
-      "column": [
-        "LSTG_FORMAT_NAME"
-      ],
-      "derived": null,
-      "hierarchy": false
+    "dependent_measure_ref" : null
+  }, {
+    "id" : 4,
+    "name" : "TRANS_CNT",
+    "function" : {
+      "expression" : "COUNT",
+      "parameter" : {
+        "type" : "constant",
+        "value" : "1"
+      },
+      "returntype" : "bigint"
     },
-    {
-      "id": 4,
-      "name": "SITE_ID",
-      "table": "EDW.TEST_SITES",
-      "column": null,
-      "derived": [
-        "SITE_NAME",
-        "CRE_USER"
-      ],
-      "hierarchy": false
+    "dependent_measure_ref" : null
+  }, {
+    "id" : 5,
+    "name" : "SELLER_CNT_HLL",
+    "function" : {
+      "expression" : "COUNT_DISTINCT",
+      "parameter" : {
+        "type" : "column",
+        "value" : "SELLER_ID"
+      },
+      "returntype" : "hllc(10)"
     },
-    {
-      "id": 5,
-      "name": "SELLER_TYPE_CD",
-      "table": "EDW.TEST_SELLER_TYPE_DIM",
-      "column": null,
-      "derived": [
-        "SELLER_TYPE_DESC"
-      ],
-      "hierarchy": false
-    }
-  ],
-  "measures": [
-    {
-      "id": 1,
-      "name": "GMV_SUM",
-      "function": {
-        "expression": "SUM",
-        "parameter": {
-          "type": "column",
-          "value": "PRICE"
-        },
-        "returntype": "decimal(19,4)"
-      },
-      "dependent_measure_ref": null
-    },
-    {
-      "id": 2,
-      "name": "GMV_MIN",
-      "function": {
-        "expression": "MIN",
-        "parameter": {
-          "type": "column",
-          "value": "PRICE"
-        },
-        "returntype": "decimal(19,4)"
-      },
-      "dependent_measure_ref": null
+    "dependent_measure_ref" : null
+  }, {
+    "id" : 6,
+    "name" : "SELLER_CNT_LONG",
+    "function" : {
+      "expression" : "COUNT_DISTINCT",
+      "parameter" : {
+        "type" : "column",
+        "value" : "SELLER_ID"
+      },
+      "returntype" : "bigint"
     },
-    {
-      "id": 3,
-      "name": "GMV_MAX",
-      "function": {
-        "expression": "MAX",
-        "parameter": {
-          "type": "column",
-          "value": "PRICE"
-        },
-        "returntype": "decimal(19,4)"
-      },
-      "dependent_measure_ref": null
-    },
-    {
-      "id": 4,
-      "name": "TRANS_CNT",
-      "function": {
-        "expression": "COUNT",
-        "parameter": {
-          "type": "constant",
-          "value": "1"
-        },
-        "returntype": "bigint"
-      },
-      "dependent_measure_ref": null
+    "dependent_measure_ref" : "SELLER_CNT_HLL"
+  }, {
+    "id" : 7,
+    "name" : "SELLER_FORMAT_CNT",
+    "function" : {
+      "expression" : "COUNT_DISTINCT",
+      "parameter" : {
+        "type" : "column",
+        "value" : "LSTG_FORMAT_NAME,SELLER_ID"
+      },
+      "returntype" : "hllc(10)"
     },
-    {
-      "id": 5,
-      "name": "ITEM_COUNT_SUM",
-      "function": {
-        "expression": "SUM",
-        "parameter": {
-          "type": "column",
-          "value": "ITEM_COUNT"
-        },
-        "returntype": "bigint"
-      },
-      "dependent_measure_ref": null
-    },
-    {
-      "id": 6,
-      "name": "SELLER_CNT_HLL",
-      "function": {
-        "expression": "COUNT_DISTINCT",
-        "parameter": {
-          "type": "column",
-          "value": "SELLER_ID"
-        },
-        "returntype": "hllc(10)"
-      },
-      "dependent_measure_ref": null
-    },
-    {
-      "id": 7,
-      "name": "SELLER_CNT_LONG",
-      "function": {
-        "expression": "COUNT_DISTINCT",
-        "parameter": {
-          "type": "column",
-          "value": "SELLER_ID"
-        },
-        "returntype": "bigint"
-      },
-      "dependent_measure_ref": "SELLER_CNT_HLL"
-    },
-    {
-      "id": 8,
-      "name": "SELLER_FORMAT_CNT",
-      "function": {
-        "expression": "COUNT_DISTINCT",
-        "parameter": {
-          "type": "column",
-          "value": "LSTG_FORMAT_NAME,SELLER_ID"
-        },
-        "returntype": "hllc(10)"
-      },
-      "dependent_measure_ref": null
-    }
-  ],
-  "rowkey": {
-    "rowkey_columns": [
-      {
-        "column": "cal_dt",
-        "length": 0,
-        "dictionary": "true",
-        "mandatory": true
-      },
-      {
-        "column": "leaf_categ_id",
-        "length": 0,
-        "dictionary": "true",
-        "mandatory": false
-      },
-      {
-        "column": "meta_categ_name",
-        "length": 0,
-        "dictionary": "true",
-        "mandatory": false
-      },
-      {
-        "column": "categ_lvl2_name",
-        "length": 0,
-        "dictionary": "true",
-        "mandatory": false
-      },
-      {
-        "column": "categ_lvl3_name",
-        "length": 0,
-        "dictionary": "true",
-        "mandatory": false
-      },
-      {
-        "column": "lstg_format_name",
-        "length": 0,
-        "dictionary": "true",
-        "mandatory": false
-      },
-      {
-        "column": "lstg_site_id",
-        "length": 0,
-        "dictionary": "true",
-        "mandatory": false
-      },
-      {
-        "column": "slr_segment_cd",
-        "length": 0,
-        "dictionary": "true",
-        "mandatory": false
-      }
-    ],
-    "aggregation_groups": [
-      [
-        "lstg_format_name",
-        "lstg_site_id",
-        "slr_segment_cd"
-      ],
-      [
-        "leaf_categ_id",
-        "meta_categ_name",
-        "categ_lvl3_name",
-        "categ_lvl2_name",
-        "lstg_format_name"
-      ]
-    ]
+    "dependent_measure_ref" : null
+  } ],
+  "rowkey" : {
+    "rowkey_columns" : [ {
+      "column" : "cal_dt",
+      "length" : 0,
+      "dictionary" : "true",
+      "mandatory" : true
+    }, {
+      "column" : "leaf_categ_id",
+      "length" : 0,
+      "dictionary" : "true",
+      "mandatory" : false
+    }, {
+      "column" : "meta_categ_name",
+      "length" : 0,
+      "dictionary" : "true",
+      "mandatory" : false
+    }, {
+      "column" : "categ_lvl2_name",
+      "length" : 0,
+      "dictionary" : "true",
+      "mandatory" : false
+    }, {
+      "column" : "categ_lvl3_name",
+      "length" : 0,
+      "dictionary" : "true",
+      "mandatory" : false
+    }, {
+      "column" : "lstg_format_name",
+      "length" : 0,
+      "dictionary" : "true",
+      "mandatory" : false
+    }, {
+      "column" : "lstg_site_id",
+      "length" : 0,
+      "dictionary" : "true",
+      "mandatory" : false
+    }, {
+      "column" : "slr_segment_cd",
+      "length" : 0,
+      "dictionary" : "true",
+      "mandatory" : false
+    } ],
+    "aggregation_groups" : [ [ "lstg_format_name", "lstg_site_id", "slr_segment_cd" ], [ "leaf_categ_id", "meta_categ_name", "categ_lvl3_name", "categ_lvl2_name", "lstg_format_name" ] ]
   },
-  "signature": "TPdd/nnYLZnsI8TtZzoCng==",
-  "last_modified": 1422435345373,
-  "model_name": "test_kylin_without_slr_left_join_model_desc",
-  "null_string": null,
-  "hbase_mapping": {
-    "column_family": [
-      {
-        "name": "f1",
-        "columns": [
-          {
-            "qualifier": "m",
-            "measure_refs": [
-              "gmv_sum",
-              "gmv_min",
-              "gmv_max",
-              "trans_cnt",
-              "item_count_sum",
-              "seller_cnt_long"
-            ]
-          }
-        ]
-      },
-      {
-        "name": "f2",
-        "columns": [
-          {
-            "qualifier": "m",
-            "measure_refs": [
-              "seller_cnt_hll",
-              "seller_format_cnt"
-            ]
-          }
-        ]
-      }
-    ]
+  "signature" : "TPdd/nnYLZnsI8TtZzoCng==",
+  "last_modified" : 1422435345373,
+  "model_name" : "test_kylin_without_slr_left_join_model_desc",
+  "null_string" : null,
+  "hbase_mapping" : {
+    "column_family" : [ {
+      "name" : "f1",
+      "columns" : [ {
+        "qualifier" : "m",
+        "measure_refs" : [ "gmv_sum", "gmv_min", "gmv_max", "trans_cnt", "seller_cnt_long" ]
+      } ]
+    }, {
+      "name" : "f2",
+      "columns" : [ {
+        "qualifier" : "m",
+        "measure_refs" : [ "seller_cnt_hll", "seller_format_cnt" ]
+      } ]
+    } ]
   },
-  "notify_list": null
+  "notify_list" : null
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/86ddd253/examples/test_case_data/localmeta/data/data_gen_config.json
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/data/data_gen_config.json b/examples/test_case_data/localmeta/data/data_gen_config.json
index 6120ead..a19aeae 100644
--- a/examples/test_case_data/localmeta/data/data_gen_config.json
+++ b/examples/test_case_data/localmeta/data/data_gen_config.json
@@ -1,31 +1,29 @@
 {
-  "columnConfigs": [
+"columnConfigs":
+[
     {
-      "columnName": "lstg_format_name",
-      "valueSet": [
-        "FP-GTC",
-        "FP-non GTC",
-        "ABIN",
-        "Auction",
-        "Others"
-      ],
-      "exclusive": true
+        "columnName" : "lstg_format_name",
+        "valueSet"   : 
+            [
+                "FP-GTC",
+                "FP-non GTC",
+                "ABIN",
+                "Auction",
+                "Others"
+            ],
+        "exclusive":true
     },
+    
     {
-      "columnName": "SELLER_ID",
-      "valueSet": [
-        "10000000",
-        "10001000"
-      ],
-      "asRange": true
-    },
-    {
-      "columnName": "ITEM_COUNT",
-      "valueSet": [
-        "1000000",
-        "2000000"
-      ],
-      "asRange": true
+        "columnName" : "SELLER_ID",
+        "valueSet"   : 
+            [
+                "10000000" ,
+                "10001000"
+            ],
+        "asRange":true
     }
-  ]
+]
+
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/86ddd253/examples/test_case_data/localmeta/table/DEFAULT.TEST_KYLIN_FACT.json
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/table/DEFAULT.TEST_KYLIN_FACT.json b/examples/test_case_data/localmeta/table/DEFAULT.TEST_KYLIN_FACT.json
index c0dff16..a62a576 100644
--- a/examples/test_case_data/localmeta/table/DEFAULT.TEST_KYLIN_FACT.json
+++ b/examples/test_case_data/localmeta/table/DEFAULT.TEST_KYLIN_FACT.json
@@ -32,7 +32,7 @@
   }, {
     "id" : "8",
     "name" : "ITEM_COUNT",
-    "datatype" : "int"
+    "datatype" : "bigint"
   }, {
     "id" : "9",
     "name" : "SELLER_ID",

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/86ddd253/job/src/test/java/org/apache/kylin/job/DataGenTest.java
----------------------------------------------------------------------
diff --git a/job/src/test/java/org/apache/kylin/job/DataGenTest.java b/job/src/test/java/org/apache/kylin/job/DataGenTest.java
index c8a9915..264e9e6 100644
--- a/job/src/test/java/org/apache/kylin/job/DataGenTest.java
+++ b/job/src/test/java/org/apache/kylin/job/DataGenTest.java
@@ -28,6 +28,7 @@ import org.junit.Before;
 import org.junit.Test;
 
 /**
+ * Created by honma on 6/19/14.
  */
 public class DataGenTest extends LocalFileMetadataTestCase {
 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/86ddd253/metadata/src/main/java/org/apache/kylin/metadata/model/FunctionDesc.java
----------------------------------------------------------------------
diff --git a/metadata/src/main/java/org/apache/kylin/metadata/model/FunctionDesc.java b/metadata/src/main/java/org/apache/kylin/metadata/model/FunctionDesc.java
index 7815e10..ff7c81d 100644
--- a/metadata/src/main/java/org/apache/kylin/metadata/model/FunctionDesc.java
+++ b/metadata/src/main/java/org/apache/kylin/metadata/model/FunctionDesc.java
@@ -61,7 +61,6 @@ public class FunctionDesc {
         }
     }
 
-    //MHB ??? hll why not rewrite
     public boolean needRewrite() {
         return !isSum() && !isHolisticCountDistinct() && !isDimensionAsMetric();
     }